[sword-svn] r2783 - trunk/utilities
dmsmith at crosswire.org
dmsmith at crosswire.org
Mon Feb 18 09:56:43 MST 2013
Author: dmsmith
Date: 2013-02-18 09:56:43 -0700 (Mon, 18 Feb 2013)
New Revision: 2783
Modified:
trunk/utilities/osis2mod.cpp
Log:
treat \n as a space and don't introduce space
Modified: trunk/utilities/osis2mod.cpp
===================================================================
--- trunk/utilities/osis2mod.cpp 2013-02-18 14:48:51 UTC (rev 2782)
+++ trunk/utilities/osis2mod.cpp 2013-02-18 16:56:43 UTC (rev 2783)
@@ -538,14 +538,12 @@
}
// The following is for initial verse content and for appending interverse content.
- // Eliminate leading whitespace on the beginning of each verse and
- // before we append to current content, since we just added one
- text.trimStart();
if (activeVerseText.length()) {
- activeVerseText += " ";
activeVerseText += text;
}
else {
+ // Eliminate leading whitespace on the beginning of each verse
+ text.trimStart();
activeVerseText = text;
}
// text has been consumed so clear it out.
@@ -1370,6 +1368,12 @@
curChar = (unsigned char) possibleChar;
+ // All newlines are simply whitespace
+ // Does a SWORD module actually require this?
+ if (curChar == '\n') {
+ curChar = ' ';
+ }
+
if (!intoken && curChar == '<') {
intoken = true;
token = "<";
More information about the sword-cvs
mailing list