[sword-svn] r3374 - in trunk: examples/cmdline src/modules/filters

scribe at crosswire.org scribe at crosswire.org
Tue Jun 2 09:12:29 MST 2015


Author: scribe
Date: 2015-06-02 09:12:29 -0700 (Tue, 02 Jun 2015)
New Revision: 3374

Modified:
   trunk/examples/cmdline/lookup.cpp
   trunk/src/modules/filters/osiswordjs.cpp
Log:
added fix to osisword javascript processing to handle milestoned words (e.g., 3588 with no content)


Modified: trunk/examples/cmdline/lookup.cpp
===================================================================
--- trunk/examples/cmdline/lookup.cpp	2015-04-22 07:25:16 UTC (rev 3373)
+++ trunk/examples/cmdline/lookup.cpp	2015-06-02 16:12:29 UTC (rev 3374)
@@ -29,6 +29,7 @@
 #include <swfilter.h>
 #include <markupfiltmgr.h>
 #include <versekey.h>
+//#include "../../bindings/corba/orbitcpp/webmgr.hpp"
 
 
 using sword::SWMgr;
@@ -49,8 +50,13 @@
 int main(int argc, char **argv)
 {
 	
-	SWMgr manager(new MarkupFilterMgr(FMT_WEBIF));
-//	SWMgr manager(new MarkupFilterMgr(FMT_HTMLHREF));
+// for testing webmgr
+//	WebMgr manager((const char *)0);
+//	manager.setJavascript(true);
+//
+	SWMgr manager(new MarkupFilterMgr(FMT_HTMLHREF));
+//	SWMgr manager(new MarkupFilterMgr(FMT_WEBIF));
+
 	SWModule *target;
 
 	if (argc != 3) {

Modified: trunk/src/modules/filters/osiswordjs.cpp
===================================================================
--- trunk/src/modules/filters/osiswordjs.cpp	2015-04-22 07:25:16 UTC (rev 3373)
+++ trunk/src/modules/filters/osiswordjs.cpp	2015-06-02 16:12:29 UTC (rev 3374)
@@ -171,6 +171,10 @@
 					// 'p' = 'fillpop' to save bandwidth
 					text.appendFormatted("<span class=\"clk\" onclick=\"p('%s','%s','%s','%s','%s','%s');\" >", lexName.c_str(), lemma.c_str(), wordID.c_str(), morph.c_str(), page.c_str(), modName.c_str());
 					wordNum++;
+
+					if (wtag.isEmpty()) {
+						text += "</w></span>";
+					}
 				}
 				if ((*token == '/') && (token[1] == 'w') && option) {	// Word
 					text += "</w></span>";




More information about the sword-cvs mailing list