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

scribe at www.crosswire.org scribe at www.crosswire.org
Fri Apr 27 19:42:31 MST 2007


Author: scribe
Date: 2007-04-27 19:42:30 -0700 (Fri, 27 Apr 2007)
New Revision: 2042

Modified:
   trunk/src/modules/filters/osishtmlhref.cpp
   trunk/src/modules/filters/osisrtf.cpp
Log:
Fixed trailing red letter quote handling bug introduced
when I screwed with DM's patch.


Modified: trunk/src/modules/filters/osishtmlhref.cpp
===================================================================
--- trunk/src/modules/filters/osishtmlhref.cpp	2007-04-26 17:00:18 UTC (rev 2041)
+++ trunk/src/modules/filters/osishtmlhref.cpp	2007-04-28 02:42:30 UTC (rev 2042)
@@ -426,7 +426,7 @@
 			SWBuf mark      = tmp;
 
 			// open <q> or <q sID... />
-			if ((!tag.isEmpty()) || (tag.getAttribute("sID"))) {
+			if ((!tag.isEmpty() && !tag.isEndTag()) || (tag.isEmpty() && tag.getAttribute("sID"))) {
 				// if <q> then remember it for the </q>
 				if (!tag.isEmpty()) {
 					char *tagData = 0;
@@ -446,7 +446,7 @@
 					outText((level % 2) ? '\"' : '\'', buf, u);
 			}
 			// close </q> or <q eID... />
-			else if ((tag.isEndTag()) || (tag.getAttribute("eID"))) {
+			else if ((tag.isEndTag()) || (tag.isEmpty() && tag.getAttribute("eID"))) {
 				// if it is </q> then pop the stack for the attributes
 				if (tag.isEndTag() && !u->quoteStack->empty()) {
 					const char *tagData  = u->quoteStack->top();

Modified: trunk/src/modules/filters/osisrtf.cpp
===================================================================
--- trunk/src/modules/filters/osisrtf.cpp	2007-04-26 17:00:18 UTC (rev 2041)
+++ trunk/src/modules/filters/osisrtf.cpp	2007-04-28 02:42:30 UTC (rev 2042)
@@ -359,7 +359,7 @@
 			SWBuf mark      = tmp;
 
 			// open <q> or <q sID... />
-			if ((!tag.isEmpty()) || (tag.getAttribute("sID"))) {
+			if ((!tag.isEmpty() && !tag.isEndTag()) || (tag.isEmpty() && tag.getAttribute("sID"))) {
 				// if <q> then remember it for the </q>
 				if (!tag.isEmpty()) {
 					char *tagData = 0;




More information about the sword-cvs mailing list