[sword-svn] r3169 - in branches/sword-1-7-x: . src/modules/filters

greg.hellings at crosswire.org greg.hellings at crosswire.org
Wed Apr 16 21:13:34 MST 2014


Author: greg.hellings
Date: 2014-04-16 21:13:34 -0700 (Wed, 16 Apr 2014)
New Revision: 3169

Modified:
   branches/sword-1-7-x/
   branches/sword-1-7-x/src/modules/filters/osishtmlhref.cpp
   branches/sword-1-7-x/src/modules/filters/osisxhtml.cpp
Log:
Merging r3108 - proper super/subscript generation in HTML



Property changes on: branches/sword-1-7-x
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk:2989-2991,2997,3001-3004,3006,3010-3013,3015-3020,3026-3039,3045-3046,3048,3056,3058-3062,3067,3073,3077-3081,3085-3086,3091,3094,3097-3099,3102,3104,3106-3107
   + /trunk:2989-2991,2997,3001-3004,3006,3010-3013,3015-3020,3026-3039,3045-3046,3048,3056,3058-3062,3067,3073,3077-3081,3085-3086,3091,3094,3097-3099,3102,3104,3106-3108

Modified: branches/sword-1-7-x/src/modules/filters/osishtmlhref.cpp
===================================================================
--- branches/sword-1-7-x/src/modules/filters/osishtmlhref.cpp	2014-04-17 04:12:53 UTC (rev 3168)
+++ branches/sword-1-7-x/src/modules/filters/osishtmlhref.cpp	2014-04-17 04:13:34 UTC (rev 3169)
@@ -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: branches/sword-1-7-x/src/modules/filters/osisxhtml.cpp
===================================================================
--- branches/sword-1-7-x/src/modules/filters/osisxhtml.cpp	2014-04-17 04:12:53 UTC (rev 3168)
+++ branches/sword-1-7-x/src/modules/filters/osisxhtml.cpp	2014-04-17 04:13:34 UTC (rev 3169)
@@ -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