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

scribe at crosswire.org scribe at crosswire.org
Mon Apr 14 09:22:12 MST 2014


Author: scribe
Date: 2014-04-14 09:22:11 -0700 (Mon, 14 Apr 2014)
New Revision: 3153

Modified:
   trunk/src/modules/filters/osismorphsegmentation.cpp
Log:
fixed osismorphsegmentation to look for both type=morph and x-morph
fixed close seg to check inMorph before processing </seg> as close morph

Modified: trunk/src/modules/filters/osismorphsegmentation.cpp
===================================================================
--- trunk/src/modules/filters/osismorphsegmentation.cpp	2014-04-13 23:35:53 UTC (rev 3152)
+++ trunk/src/modules/filters/osismorphsegmentation.cpp	2014-04-14 16:22:11 UTC (rev 3153)
@@ -78,13 +78,15 @@
 			if (!strncmp(token.c_str(), "seg ", 4) || !strncmp(token.c_str(), "/seg", 4)) {
 				tag = token;
 
-				if (!tag.isEndTag() && tag.getAttribute("type") && !strcmp("morph", tag.getAttribute("type"))) {  //<seg type="morph"> start tag
+				if (!tag.isEndTag() && tag.getAttribute("type") &&
+					(  !strcmp("morph", tag.getAttribute("type"))
+					|| !strcmp("x-morph", tag.getAttribute("type")))) {  //<seg type="morph"> start tag
 					hide = !option; //only hide if option is Off
 					tagText = "";
 					inMorpheme = true;
 				}
 
-				if (tag.isEndTag()) {
+				if (tag.isEndTag() && inMorpheme) {
 						buf.setFormatted("%.3d", morphemeNum++);
 						module->getEntryAttributes()["Morpheme"][buf]["body"] = tagText;
 						inMorpheme = false;




More information about the sword-cvs mailing list