[sword-svn] r2496 - trunk/src/modules/filters
chrislit at crosswire.org
chrislit at crosswire.org
Sun Dec 27 15:32:36 MST 2009
Author: chrislit
Date: 2009-12-27 15:32:36 -0700 (Sun, 27 Dec 2009)
New Revision: 2496
Modified:
trunk/src/modules/filters/osishtmlhref.cpp
Log:
applied Ian Wagner's patch to translate glosses (used for our encoding of ruby) to HTML <ruby>
Modified: trunk/src/modules/filters/osishtmlhref.cpp
===================================================================
--- trunk/src/modules/filters/osishtmlhref.cpp 2009-12-24 22:22:16 UTC (rev 2495)
+++ trunk/src/modules/filters/osishtmlhref.cpp 2009-12-27 22:32:36 UTC (rev 2496)
@@ -194,11 +194,17 @@
outText(val, buf, u);
}
if ((attrib = tag.getAttribute("gloss"))) {
+ // I'm sure this is not the cleanest way to do it, but it gets the job done
+ // for rendering ruby chars properly ^_^
+ buf -= lastText.length();
+
+ outText("<ruby><rb>", buf, u);
+ outText(lastText, buf, u);
val = strchr(attrib, ':');
val = (val) ? (val + 1) : attrib;
- outText("(", buf, u);
+ outText("</rb><rp>(</rp><rt>", buf, u);
outText(val, buf, u);
- outText(")", buf, u);
+ outText("</rt><rp>)</rp></ruby>", buf, u);
}
if (!morphFirst) {
processLemma(u->suspendTextPassThru, tag, buf);
More information about the sword-cvs
mailing list