[sword-svn] r2994 - branches/sword-1-7-x/src/modules/filters

greg.hellings at crosswire.org greg.hellings at crosswire.org
Fri Dec 27 22:54:40 MST 2013


Author: greg.hellings
Date: 2013-12-27 22:54:40 -0700 (Fri, 27 Dec 2013)
New Revision: 2994

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

Modified: branches/sword-1-7-x/src/modules/filters/osishtmlhref.cpp
===================================================================
--- branches/sword-1-7-x/src/modules/filters/osishtmlhref.cpp	2013-12-28 05:54:22 UTC (rev 2993)
+++ branches/sword-1-7-x/src/modules/filters/osishtmlhref.cpp	2013-12-28 05:54:40 UTC (rev 2994)
@@ -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: branches/sword-1-7-x/src/modules/filters/osisrtf.cpp
===================================================================
--- branches/sword-1-7-x/src/modules/filters/osisrtf.cpp	2013-12-28 05:54:22 UTC (rev 2993)
+++ branches/sword-1-7-x/src/modules/filters/osisrtf.cpp	2013-12-28 05:54:40 UTC (rev 2994)
@@ -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: branches/sword-1-7-x/src/modules/filters/osisxhtml.cpp
===================================================================
--- branches/sword-1-7-x/src/modules/filters/osisxhtml.cpp	2013-12-28 05:54:22 UTC (rev 2993)
+++ branches/sword-1-7-x/src/modules/filters/osisxhtml.cpp	2013-12-28 05:54:40 UTC (rev 2994)
@@ -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