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

chrislit at crosswire.org chrislit at crosswire.org
Sun Dec 8 00:13:58 MST 2013


Author: chrislit
Date: 2013-12-08 00:13:58 -0700 (Sun, 08 Dec 2013)
New Revision: 2991

Modified:
   trunk/src/modules/filters/osishtmlhref.cpp
   trunk/src/modules/filters/osisrtf.cpp
   trunk/src/modules/filters/osisxhtml.cpp
Log:
Don't generate linebreaks for <lb type="x-optional"/>, which comes from USFM //.

Modified: trunk/src/modules/filters/osishtmlhref.cpp
===================================================================
--- trunk/src/modules/filters/osishtmlhref.cpp	2013-11-21 10:48:38 UTC (rev 2990)
+++ trunk/src/modules/filters/osishtmlhref.cpp	2013-12-08 07:13:58 UTC (rev 2991)
@@ -371,7 +371,7 @@
 		}
 
 		// <lb.../>
-		else if (!strcmp(tag.getName(), "lb")) {
+		else if (!strcmp(tag.getName(), "lb") && (strcmp(tag.getAttribute("type"), "x-optional"))) {
 			outText("<br />", buf, u);
 			userData->supressAdjacentWhitespace = true;
 		}

Modified: trunk/src/modules/filters/osisrtf.cpp
===================================================================
--- trunk/src/modules/filters/osisrtf.cpp	2013-11-21 10:48:38 UTC (rev 2990)
+++ trunk/src/modules/filters/osisrtf.cpp	2013-12-08 07:13:58 UTC (rev 2991)
@@ -326,7 +326,7 @@
 		}
 
 		// <milestone type="line"/> or <lb.../>
-		else if ((!strcmp(tag.getName(), "lb")) || ((!strcmp(tag.getName(), "milestone")) && (tag.getAttribute("type")) && (!strcmp(tag.getAttribute("type"), "line")))) {
+		else if ((!strcmp(tag.getName(), "lb") && (strcmp(tag.getAttribute("type"), "x-optional"))) || ((!strcmp(tag.getName(), "milestone")) && (tag.getAttribute("type")) && (!strcmp(tag.getAttribute("type"), "line")))) {
 			outText("{\\par}", buf, u);
 			userData->supressAdjacentWhitespace = true;
 		}

Modified: trunk/src/modules/filters/osisxhtml.cpp
===================================================================
--- trunk/src/modules/filters/osisxhtml.cpp	2013-11-21 10:48:38 UTC (rev 2990)
+++ trunk/src/modules/filters/osisxhtml.cpp	2013-12-08 07:13:58 UTC (rev 2991)
@@ -415,7 +415,7 @@
 		}
 
 		// <lb.../>
-		else if (!strcmp(tag.getName(), "lb")) {
+		else if (!strcmp(tag.getName(), "lb") && (strcmp(tag.getAttribute("type"), "x-optional"))) {
 				u->outputNewline(buf);
 		}
 		// <milestone type="line"/>




More information about the sword-cvs mailing list