diff options
Diffstat (limited to 'src/modules/filters/osismorphsegmentation.cpp')
-rw-r--r-- | src/modules/filters/osismorphsegmentation.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/modules/filters/osismorphsegmentation.cpp b/src/modules/filters/osismorphsegmentation.cpp index 9afc0a1..1d91428 100644 --- a/src/modules/filters/osismorphsegmentation.cpp +++ b/src/modules/filters/osismorphsegmentation.cpp @@ -4,7 +4,7 @@ * morphemes (for morpheme segmented Hebrew in * the WLC) * - * $Id: osismorphsegmentation.cpp 2980 2013-09-14 21:51:47Z scribe $ + * $Id: osismorphsegmentation.cpp 3186 2014-04-17 04:33:19Z greg.hellings $ * * Copyright 2006-2013 CrossWire Bible Society (http://www.crosswire.org) * CrossWire Bible Society @@ -78,13 +78,15 @@ char OSISMorphSegmentation::processText(SWBuf &text, const SWKey * /*key*/, cons 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; |