[sword-svn] r1723 - in trunk: . src/modules/filters

mgruner at crosswire.org mgruner at crosswire.org
Sun Feb 20 16:40:39 MST 2005


Author: mgruner
Date: 2005-02-20 16:40:39 -0700 (Sun, 20 Feb 2005)
New Revision: 1723

Modified:
   trunk/Makefile.am
   trunk/src/modules/filters/osisfootnotes.cpp
Log:
Footnote EntryAttribute parsing fix by scribe

Partial Makefile.am fix by glasseyes; still has to be fixed



Modified: trunk/Makefile.am
===================================================================
--- trunk/Makefile.am	2005-02-20 23:32:22 UTC (rev 1722)
+++ trunk/Makefile.am	2005-02-20 23:40:39 UTC (rev 1723)
@@ -87,6 +87,7 @@
 if INSTCONF
 sysconf_DATA = sword.conf
 sword.conf:
+	$(mkinstalldirs) $(DESTDIR)$(sysconfdir)
 	@echo "[Install]" > $(DESTDIR)$(sysconfdir)/sword.conf
 	@echo "DataPath=$(pkgdatadir)/" >> $(DESTDIR)$(sysconfdir)/sword.conf
 

Modified: trunk/src/modules/filters/osisfootnotes.cpp
===================================================================
--- trunk/src/modules/filters/osisfootnotes.cpp	2005-02-20 23:32:22 UTC (rev 1722)
+++ trunk/src/modules/filters/osisfootnotes.cpp	2005-02-20 23:40:39 UTC (rev 1723)
@@ -51,7 +51,9 @@
 	const char *from = orig.c_str();
 	
 	XMLTag tag;
+	bool strongsMarkup = false;
 
+
 	for (text = ""; *from; ++from) {
 
 		// remove all newlines temporarily to fix kjv2003 module
@@ -78,7 +80,9 @@
 				if (!tag.isEndTag()) {
 					if (tag.getAttribute("type") && !strcmp("strongsMarkup", tag.getAttribute("type"))) {  // handle bug in KJV2003 module where some note open tags were <note ... />
 						tag.setEmpty(false);
+						strongsMarkup = true;
 					}
+					
 					if (!tag.isEmpty()) {
 //					if ((!tag.isEmpty()) || (SWBuf("strongsMarkup") == tag.getAttribute("type"))) {
 						refs = "";
@@ -89,7 +93,7 @@
 					}
 				}
 				if (hide && tag.isEndTag()) {
-					if (module->isProcessEntryAttributes()) {
+					if (module->isProcessEntryAttributes() && !strongsMarkup) { //don`t parse strongsMarkup to EntryAttributes as Footnote
 						sprintf(buf, "%i", footnoteNum++);
 						StringList attributes = startTag.getAttributeNames();
 						for (StringList::const_iterator it = attributes.begin(); it != attributes.end(); it++) {
@@ -110,6 +114,7 @@
 					}
 					else	continue;
 				}
+				strongsMarkup = false;
 			}
 
 			// if not a heading token, keep token in text



More information about the sword-cvs mailing list