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

scribe at crosswire.org scribe at crosswire.org
Sun Jun 9 19:46:49 MST 2019


Author: scribe
Date: 2019-06-09 19:46:48 -0700 (Sun, 09 Jun 2019)
New Revision: 3645

Modified:
   trunk/src/modules/filters/osisheadings.cpp
Log:
added canonical=true to preverse heading if any title in the heading is canonical. least bad solution for now

Modified: trunk/src/modules/filters/osisheadings.cpp
===================================================================
--- trunk/src/modules/filters/osisheadings.cpp	2019-06-09 20:51:54 UTC (rev 3644)
+++ trunk/src/modules/filters/osisheadings.cpp	2019-06-10 02:46:48 UTC (rev 3645)
@@ -120,6 +120,10 @@
 						for (StringList::const_iterator it = attributes.begin(); it != attributes.end(); it++) {
 							u->module->getEntryAttributes()["Heading"][buf][it->c_str()] = u->currentHeadingTag.getAttribute(it->c_str());
 						}
+						// if any title in the heading was canonical, then set canonical=true.
+						// TODO: split composite headings with both canonical and non-canonical headings
+						// into two heading attributes with proper canonical value on each
+						if (u->canonical) u->module->getEntryAttributes()["Heading"][buf]["canonical"] = "true";
 					}
 
 					// do we want the heading in the body?




More information about the sword-cvs mailing list