[sword-svn] r339 - trunk/intf

scribe at crosswire.org scribe at crosswire.org
Fri Dec 9 13:16:22 MST 2011


Author: scribe
Date: 2011-12-09 13:16:21 -0700 (Fri, 09 Dec 2011)
New Revision: 339

Modified:
   trunk/intf/collate2imp.cpp
Log:
added better detection of end verse


Modified: trunk/intf/collate2imp.cpp
===================================================================
--- trunk/intf/collate2imp.cpp	2011-10-25 18:51:54 UTC (rev 338)
+++ trunk/intf/collate2imp.cpp	2011-12-09 20:16:21 UTC (rev 339)
@@ -41,13 +41,6 @@
 	bool more = true;
 	do {
 		more = FileMgr::getLine(fd, lineBuffer)!=0;
-		if (inVerse) {
-			if (lineBuffer.indexOf("</ab>") > -1) {
-				lineBuffer.setSize(lineBuffer.indexOf("</ab>"));
-				inVerse = false;
-			}
-			cout << lineBuffer.trim() << endl;
-		}
 		if (lineBuffer.startsWith(bookTag)) {
 			lineBuffer << bookTag.length();
 			SWBuf book = lineBuffer.stripPrefix('"');
@@ -70,7 +63,17 @@
 			else {
 				inVerse = true;
 			}
-			cout << "$$$" << vk.getOSISRef() << "\n";
+			lineBuffer.trim();
+			if (lineBuffer.length() > 0 && lineBuffer != "&om;") {
+				cout << "$$$" << vk.getOSISRef() << (vk.getVerse() ? "" : ".0") << "\n";
+				cout << lineBuffer << endl;
+			}
+		}
+		else if (inVerse) {
+			if (lineBuffer.indexOf("</ab>") > -1) {
+				lineBuffer.setSize(lineBuffer.indexOf("</ab>"));
+				inVerse = false;
+			}
 			cout << lineBuffer.trim() << endl;
 		}
 	} while (more);




More information about the sword-cvs mailing list