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

chrislit at crosswire.org chrislit at crosswire.org
Wed May 13 23:53:22 MST 2009


Author: chrislit
Date: 2009-05-13 23:53:22 -0700 (Wed, 13 May 2009)
New Revision: 2408

Modified:
   trunk/src/modules/filters/teirtf.cpp
Log:
added <lb/> handler
added support for <hi type="italic">
added support for <emph> parallel to <hi>


Modified: trunk/src/modules/filters/teirtf.cpp
===================================================================
--- trunk/src/modules/filters/teirtf.cpp	2009-05-13 18:07:16 UTC (rev 2407)
+++ trunk/src/modules/filters/teirtf.cpp	2009-05-14 06:53:22 UTC (rev 2408)
@@ -72,10 +72,10 @@
 		}
 
 		// <hi>
-		else if (!strcmp(tag.getName(), "hi")) {
+		else if (!strcmp(tag.getName(), "hi") || !strcmp(tag.getName(), "emph")) {
 			SWBuf rend = tag.getAttribute("rend");
 			if ((!tag.isEndTag()) && (!tag.isEmpty())) {
-				if (rend == "ital")
+				if (rend == "ital" || rend == "italic")
 					buf += "{\\i1 ";
 				else if (rend == "bold")
 					buf += "{\\b1 ";
@@ -175,6 +175,12 @@
 			}
 		}
 
+		// <lb/> tag
+		else if (!strcmp(tag.getName(), "lb")) {
+			buf += "{\\par}";
+			userData->supressAdjacentWhitespace = true;
+		}
+
 		else {
 			return false;  // we still didn't handle token
 		}




More information about the sword-cvs mailing list