summaryrefslogtreecommitdiff
path: root/src/modules/filters/osislemma.cpp
diff options
context:
space:
mode:
authorTeus Benschop <teusjannette@gmail.com>2018-10-28 11:51:26 +0100
committerTeus Benschop <teusjannette@gmail.com>2018-10-28 11:51:26 +0100
commit1d0ff54794b5edea7cdf1d2d66710a0fa885bcc5 (patch)
tree8ece5f9ef437fbb151f2b22ed0c6e1a714879c7c /src/modules/filters/osislemma.cpp
parentc7dbdc9161a7c460526b80fe01af49d714856126 (diff)
New upstream version 1.8.1
Diffstat (limited to 'src/modules/filters/osislemma.cpp')
-rw-r--r--src/modules/filters/osislemma.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/modules/filters/osislemma.cpp b/src/modules/filters/osislemma.cpp
index cf5d8f4..12881ff 100644
--- a/src/modules/filters/osislemma.cpp
+++ b/src/modules/filters/osislemma.cpp
@@ -3,7 +3,7 @@
* osislemma.cpp - SWFilter descendant to hide or show lemmata
* in a OSIS module
*
- * $Id: osislemma.cpp 2980 2013-09-14 21:51:47Z scribe $
+ * $Id: osislemma.cpp 3483 2017-06-25 15:19:34Z scribe $
*
* Copyright 2003-2013 CrossWire Bible Society (http://www.crosswire.org)
* CrossWire Bible Society
@@ -67,6 +67,15 @@ char OSISLemma::processText(SWBuf &text, const SWKey *key, const SWModule *modul
intoken = false;
if (token.startsWith("w ")) { // Word
XMLTag wtag(token);
+
+ // always save off lemma if we haven't yet
+ if (!wtag.getAttribute("savlm")) {
+ const char *l = wtag.getAttribute("lemma");
+ if (l) {
+ wtag.setAttribute("savlm", l);
+ }
+ }
+
int count = wtag.getAttributePartCount("lemma", ' ');
for (int i = 0; i < count; i++) {
SWBuf a = wtag.getAttribute("lemma", i, ' ');
@@ -78,6 +87,7 @@ char OSISLemma::processText(SWBuf &text, const SWKey *key, const SWModule *modul
count--;
}
}
+
token = wtag;
token.trim();
// drop <>