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

chrislit at crosswire.org chrislit at crosswire.org
Wed Mar 12 01:35:50 MST 2014


Author: chrislit
Date: 2014-03-12 01:35:50 -0700 (Wed, 12 Mar 2014)
New Revision: 3108

Modified:
   trunk/src/modules/filters/osishtmlhref.cpp
   trunk/src/modules/filters/osisxhtml.cpp
Log:
added/corrected superscript & subscript tag generation for XHTML & HTMLHREF filters


Modified: trunk/src/modules/filters/osishtmlhref.cpp
===================================================================
--- trunk/src/modules/filters/osishtmlhref.cpp	2014-03-12 07:50:20 UTC (rev 3107)
+++ trunk/src/modules/filters/osishtmlhref.cpp	2014-03-12 08:35:50 UTC (rev 3108)
@@ -484,6 +484,12 @@
 				else if (type == "ol") {
 					outText("<span style=\"text-decoration:overline\">", buf, u);
 				}
+				else if (type == "super") {
+					outText("<sup>", buf, u);
+				}
+				else if (type == "sub") {
+					outText("<sub>", buf, u);
+				}
 				else {	// all other types
 					outText("<i>", buf, u);
 				}
@@ -503,7 +509,15 @@
 				else if (type == "ol") {
 					outText("</span>", buf, u);
 				}
-				else outText("</i>", buf, u);
+				else if (type == "sup") {
+					outText("</sup>", buf, u);
+				}
+				else if (type == "sub") {
+					outText("</sub>", buf, u);
+				}
+				else {
+					outText("</i>", buf, u);
+				}
 			}
 		}
 

Modified: trunk/src/modules/filters/osisxhtml.cpp
===================================================================
--- trunk/src/modules/filters/osisxhtml.cpp	2014-03-12 07:50:20 UTC (rev 3107)
+++ trunk/src/modules/filters/osisxhtml.cpp	2014-03-12 08:35:50 UTC (rev 3108)
@@ -568,10 +568,10 @@
 				}
 
 				else if (type == "super") {
-					outText("<span class=\"sup\">", buf, u);
+					outText("<sup>", buf, u);
 				}
 				else if (type == "sub") {
-					outText("<span class=\"sub\">", buf, u);
+					outText("<sub>", buf, u);
 				}
 				else {	// all other types
 					outText("<i>", buf, u);
@@ -589,12 +589,18 @@
 				if (type == "bold" || type == "b" || type == "x-b") {
 					outText("</b>", buf, u);
 				}
-				else if (  	   type == "ol"
-						|| type == "super"
-						|| type == "sub") {
+				else if (type == "ol") {
 					outText("</span>", buf, u);
 				}
-				else outText("</i>", buf, u);
+				else if (type == "sup") {
+					outText("</sup>", buf, u);
+				}
+				else if (type == "sub") {
+					outText("</sub>", buf, u);
+				}
+				else {
+					outText("</i>", buf, u);
+				}
 			}
 		}
 




More information about the sword-cvs mailing list