From c6488c8c55c9bd9f28b834806d1e20d532672ede Mon Sep 17 00:00:00 2001 From: "Troy A. Griffitts" Date: Fri, 9 Dec 2011 20:16:21 +0000 Subject: added better detection of end verse git-svn-id: https://www.crosswire.org/svn/sword-tools/trunk@339 07627401-56e2-0310-80f4-f8cd0041bdcd --- intf/collate2imp.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'intf') diff --git a/intf/collate2imp.cpp b/intf/collate2imp.cpp index ee5a359..13a9fe3 100644 --- a/intf/collate2imp.cpp +++ b/intf/collate2imp.cpp @@ -41,13 +41,6 @@ int main(int argc, char **argv) { bool more = true; do { more = FileMgr::getLine(fd, lineBuffer)!=0; - if (inVerse) { - if (lineBuffer.indexOf("") > -1) { - lineBuffer.setSize(lineBuffer.indexOf("")); - inVerse = false; - } - cout << lineBuffer.trim() << endl; - } if (lineBuffer.startsWith(bookTag)) { lineBuffer << bookTag.length(); SWBuf book = lineBuffer.stripPrefix('"'); @@ -70,7 +63,17 @@ int main(int argc, char **argv) { 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("") > -1) { + lineBuffer.setSize(lineBuffer.indexOf("")); + inVerse = false; + } cout << lineBuffer.trim() << endl; } } while (more); -- cgit