[sword-svn] r3192 - in trunk: include src/modules/filters

scribe at crosswire.org scribe at crosswire.org
Sat Apr 19 10:26:34 MST 2014


Author: scribe
Date: 2014-04-19 10:26:34 -0700 (Sat, 19 Apr 2014)
New Revision: 3192

Modified:
   trunk/include/thmlxhtml.h
   trunk/src/modules/filters/thmlxhtml.cpp
Log:
update to make xhtml rendering of thml headings consistent with osis
headings

Modified: trunk/include/thmlxhtml.h
===================================================================
--- trunk/include/thmlxhtml.h	2014-04-19 17:06:38 UTC (rev 3191)
+++ trunk/include/thmlxhtml.h	2014-04-19 17:26:34 UTC (rev 3192)
@@ -38,7 +38,7 @@
 	public:
 		MyUserData(const SWModule *module, const SWKey *key);//: BasicFilterUserData(module, key) {}
 		bool inscriptRef;
-		bool SecHead;
+		char SecHead;
 		bool BiblicalText;
 		SWBuf version;
 		XMLTag startTag;

Modified: trunk/src/modules/filters/thmlxhtml.cpp
===================================================================
--- trunk/src/modules/filters/thmlxhtml.cpp	2014-04-19 17:06:38 UTC (rev 3191)
+++ trunk/src/modules/filters/thmlxhtml.cpp	2014-04-19 17:26:34 UTC (rev 3192)
@@ -299,17 +299,19 @@
 		}
 		else if (tag.getName() && !strcmp(tag.getName(), "div")) {
 			if (tag.isEndTag() && u->SecHead) {
-				buf += "</i></b><br />";
+				buf += "</h";
+				buf += u->SecHead;
+				buf += ">";
 				u->SecHead = false;
 			}
 			else if (tag.getAttribute("class")) {
 				if (!stricmp(tag.getAttribute("class"), "sechead")) {
-					u->SecHead = true;
-					buf += "<br /><b><i>";
+					u->SecHead = '3';
+					buf += "<h3>";
 				}
 				else if (!stricmp(tag.getAttribute("class"), "title")) {
-					u->SecHead = true;
-					buf += "<br /><b><i>";
+					u->SecHead = '2';
+					buf += "<h2>";
 				}
 				else {
 					buf += tag;




More information about the sword-cvs mailing list