[sword-svn] r2130 - in trunk: src/modules/filters utilities

scribe at www.crosswire.org scribe at www.crosswire.org
Sat Jan 19 12:33:27 MST 2008


Author: scribe
Date: 2008-01-19 12:33:26 -0700 (Sat, 19 Jan 2008)
New Revision: 2130

Modified:
   trunk/src/modules/filters/thmlhtmlhref.cpp
   trunk/src/modules/filters/thmlrtf.cpp
   trunk/utilities/mod2zmod.cpp
Log:
Applied cosmetic and rendering patches from charcoal


Modified: trunk/src/modules/filters/thmlhtmlhref.cpp
===================================================================
--- trunk/src/modules/filters/thmlhtmlhref.cpp	2008-01-09 16:52:50 UTC (rev 2129)
+++ trunk/src/modules/filters/thmlhtmlhref.cpp	2008-01-19 19:33:26 UTC (rev 2130)
@@ -320,6 +320,8 @@
 					    URL::encode(u->version.c_str()).c_str());
 
 			for (c = token; *c; c++) {
+                    if ((*c == '/') && (*(c+1) == '\0'))
+                         continue;
 				if (c == src) {
 					for (;((*c) && (*c != '"')); c++)
 						buf += *c;
@@ -337,7 +339,7 @@
 				}
 				buf += *c;
 			}
-			buf += " border=0></a>";
+               buf += " border=0 /></a>";
 		}
 		else {
 			buf += '<';

Modified: trunk/src/modules/filters/thmlrtf.cpp
===================================================================
--- trunk/src/modules/filters/thmlrtf.cpp	2008-01-09 16:52:50 UTC (rev 2129)
+++ trunk/src/modules/filters/thmlrtf.cpp	2008-01-19 19:33:26 UTC (rev 2130)
@@ -32,7 +32,7 @@
 
 	setEscapeStringCaseSensitive(true);
 
-	addEscapeStringSubstitute("nbsp", " ");
+     addEscapeStringSubstitute("nbsp", "\302\240");
 	addEscapeStringSubstitute("apos", "'");
 	addEscapeStringSubstitute("quot", "\"");
 	addEscapeStringSubstitute("amp", "&");
@@ -159,6 +159,8 @@
 	addTokenSubstitute("P", "\\par ");
 	addTokenSubstitute("scripture", "{\\i1 ");
 	addTokenSubstitute("/scripture", "}");
+     addTokenSubstitute("center", "\\qc ");
+     addTokenSubstitute("/center", "\\pard ");
 }
 
 

Modified: trunk/utilities/mod2zmod.cpp
===================================================================
--- trunk/utilities/mod2zmod.cpp	2008-01-09 16:52:50 UTC (rev 2129)
+++ trunk/utilities/mod2zmod.cpp	2008-01-19 19:33:26 UTC (rev 2130)
@@ -176,7 +176,7 @@
 				(*outModule) << lastBuffer.c_str();	// save new text;
 			}
 			else {
-				cout << "Skipping [" << bufferKey << "] no entry in in Module.\n";
+                    cout << "Skipping [" << bufferKey << "] no entry in Module.\n";
 			}
 		}
 		(*inModule)++;




More information about the sword-cvs mailing list