[sword-svn] r3337 - trunk/src/modules/filters
refdoc at crosswire.org
refdoc at crosswire.org
Thu Mar 12 11:21:57 MST 2015
Author: refdoc
Date: 2015-03-12 11:21:57 -0700 (Thu, 12 Mar 2015)
New Revision: 3337
Modified:
trunk/src/modules/filters/osisosis.cpp
Log:
added code to show footnotes. This patch exposes a bug with extraneous verse tags being added into the text stream. But not likely or obviously the fault of the patch.
Modified: trunk/src/modules/filters/osisosis.cpp
===================================================================
--- trunk/src/modules/filters/osisosis.cpp 2015-03-12 16:09:20 UTC (rev 3336)
+++ trunk/src/modules/filters/osisosis.cpp 2015-03-12 18:21:57 UTC (rev 3337)
@@ -149,11 +149,14 @@
else if (!strcmp(tag.getName(), "note")) {
if (!tag.isEndTag()) {
SWBuf type = tag.getAttribute("type");
+ SWBuf footnoteNumber = tag.getAttribute("swordFootnote");
+ SWBuf footnoteBody = u->module->getEntryAttributes()["Footnote"][footnoteNumber]["body"];
+
bool strongsMarkup = (type == "x-strongsMarkup" || type == "strongsMarkup"); // the latter is deprecated
if (strongsMarkup) {
tag.setEmpty(false); // handle bug in KJV2003 module where some note open tags were <note ... />
}
-
+
if (!tag.isEmpty()) {
tag.setAttribute("swordFootnote", 0);
@@ -162,6 +165,13 @@
}
else u->suspendTextPassThru = true;
}
+
+ if (u->module) {
+ XMLTag tag = token;
+ SWBuf swordFootnote = tag.getAttribute("swordFootnote");
+ SWBuf footnoteBody = u->module->getEntryAttributes()["Footnote"][swordFootnote]["body"];
+ buf.append(u->module->renderText(footnoteBody));
+ }
}
if (tag.isEndTag()) {
if (u->suspendTextPassThru == false)
More information about the sword-cvs
mailing list