[sword-svn] r2474 - trunk/src/modules/filters

chrislit at crosswire.org chrislit at crosswire.org
Mon Nov 9 23:40:04 MST 2009


Author: chrislit
Date: 2009-11-09 23:40:04 -0700 (Mon, 09 Nov 2009)
New Revision: 2474

Modified:
   trunk/src/modules/filters/osishtmlhref.cpp
   trunk/src/modules/filters/osisrtf.cpp
Log:
changed <lg> handling to use the <p> handler

Modified: trunk/src/modules/filters/osishtmlhref.cpp
===================================================================
--- trunk/src/modules/filters/osishtmlhref.cpp	2009-10-26 06:06:09 UTC (rev 2473)
+++ trunk/src/modules/filters/osishtmlhref.cpp	2009-11-10 06:40:04 UTC (rev 2474)
@@ -83,8 +83,8 @@
 
 	setTokenCaseSensitive(true);
 	
-	addTokenSubstitute("lg",  "<br />");
-	addTokenSubstitute("/lg", "<br />");
+	//	addTokenSubstitute("lg",  "<br />");
+	//	addTokenSubstitute("/lg", "<br />");
 
 	morphFirst = false;
 }
@@ -272,8 +272,8 @@
 			}
 		}
 
-		// <p> paragraph tag
-		else if (!strcmp(tag.getName(), "p")) {
+		// <p> paragraph and <lg> linegroup tags
+		else if (!strcmp(tag.getName(), "p") || !strcmp(tag.getName(), "lg")) {
 			if ((!tag.isEndTag()) && (!tag.isEmpty())) {	// non-empty start tag
 				outText("<!P><br />", buf, u);
 			}

Modified: trunk/src/modules/filters/osisrtf.cpp
===================================================================
--- trunk/src/modules/filters/osisrtf.cpp	2009-10-26 06:06:09 UTC (rev 2473)
+++ trunk/src/modules/filters/osisrtf.cpp	2009-11-10 06:40:04 UTC (rev 2474)
@@ -87,8 +87,8 @@
 	addEscapeStringSubstitute("lt", "<");
 	addEscapeStringSubstitute("gt", ">");
 	addEscapeStringSubstitute("quot", "\"");
-	addTokenSubstitute("lg", "{\\par}");
-	addTokenSubstitute("/lg", "{\\par}");
+	//	addTokenSubstitute("lg", "{\\par}");
+	//	addTokenSubstitute("/lg", "{\\par}");
 
 	setTokenCaseSensitive(true);
 }
@@ -265,8 +265,8 @@
 			}
 		}
 
-		// <p> paragraph tag
-		else if (!strcmp(tag.getName(), "p")) {
+		// <p> paragraph and <lg> linegroup tags
+		else if (!strcmp(tag.getName(), "p") || !strcmp(tag.getName(), "lg")) {
 			if ((!tag.isEndTag()) && (!tag.isEmpty())) {	// non-empty start tag
 				outText("{\\fi200\\par}", buf, u);
 			}
@@ -275,7 +275,7 @@
 				userData->supressAdjacentWhitespace = true;
 			}
 			else {					// empty paragraph break marker
-				outText("{\\pard\\par\\par}", buf, u);
+				outText("{\\pard\\par}", buf, u);
 				userData->supressAdjacentWhitespace = true;
 			}
 		}




More information about the sword-cvs mailing list