[sword-svn] r3336 - trunk/src/modules/filters

refdoc at crosswire.org refdoc at crosswire.org
Thu Mar 12 09:09:20 MST 2015


Author: refdoc
Date: 2015-03-12 09:09:20 -0700 (Thu, 12 Mar 2015)
New Revision: 3336

Modified:
   trunk/src/modules/filters/osislatex.cpp
Log:
footnotes "work" now. Thanks Troy


Modified: trunk/src/modules/filters/osislatex.cpp
===================================================================
--- trunk/src/modules/filters/osislatex.cpp	2015-03-12 09:03:53 UTC (rev 3335)
+++ trunk/src/modules/filters/osislatex.cpp	2015-03-12 16:09:20 UTC (rev 3336)
@@ -232,8 +232,7 @@
 					outText(val, buf, u);
 				}
 
-				/*if (endTag)
-					buf += "}";*/
+				
 			}
 		}
 
@@ -251,6 +250,7 @@
 
 					if (!strongsMarkup) {	// leave strong's markup notes out, in the future we'll probably have different option filters to turn different note types on or off
 						SWBuf footnoteNumber = tag.getAttribute("swordFootnote");
+						SWBuf footnoteBody = u->module->getEntryAttributes()["Footnote"][footnoteNumber]["body"];
 						SWBuf noteName = tag.getAttribute("n");
 						VerseKey *vkey = NULL;
 						// char ch = ((tag.getAttribute("type") && ((!strcmp(tag.getAttribute("type"), "crossReference")) || (!strcmp(tag.getAttribute("type"), "x-cross-ref")))) ? 'x':'n');
@@ -265,19 +265,21 @@
 						SWCATCH ( ... ) {	}
 						if (vkey) {
 							//printf("URL = %s\n",URL::encode(vkey->getText()).c_str());
-							buf.appendFormatted("\\swordfootnote{%s}{%s}{%s}{%s}{",
+							buf.appendFormatted("\\swordfootnote{%s}{%s}{%s}{%s}{%s",
 								 
 								footnoteNumber.c_str(), 
 								u->version.c_str(), 
 								vkey->getText(), 
-								(renderNoteNumbers ? noteName.c_str() : ""));
+								(renderNoteNumbers ? noteName.c_str() : ""),
+								u->module->renderText(footnoteBody).c_str());
 						}
 						else {
-							buf.appendFormatted("\\swordfootnote{%s}{%s}{%s}{%s}{",
+							buf.appendFormatted("\\swordfootnote{%s}{%s}{%s}{%s}{%s",
 								footnoteNumber.c_str(), 
 								u->version.c_str(), 
 								u->key->getText(),  
-								(renderNoteNumbers ? noteName.c_str() : ""));
+								(renderNoteNumbers ? noteName.c_str() : ""),
+								u->module->renderText(footnoteBody).c_str());
 						}
 					}
 				}
@@ -286,7 +288,7 @@
 			if (tag.isEndTag()) {
 				u->suspendTextPassThru = (--u->suspendLevel);
 				u->inXRefNote = false;
-				u->lastSuspendSegment = ""; // fix/work-around for nasb devineName in note bug
+				u->lastSuspendSegment = ""; // fix/work-around for nasb divineName in note bug
 				buf +="}";
 			}
 		}




More information about the sword-cvs mailing list