[sword-svn] r1949 - trunk/src/modules/filters
scribe at crosswire.org
scribe at crosswire.org
Fri Jul 28 01:27:47 MST 2006
Author: scribe
Date: 2006-07-28 01:27:46 -0700 (Fri, 28 Jul 2006)
New Revision: 1949
Modified:
trunk/src/modules/filters/osishtmlhref.cpp
trunk/src/modules/filters/osisrtf.cpp
Log:
Update to fix RLT (DM Smith)
Modified: trunk/src/modules/filters/osishtmlhref.cpp
===================================================================
--- trunk/src/modules/filters/osishtmlhref.cpp 2006-07-21 23:02:09 UTC (rev 1948)
+++ trunk/src/modules/filters/osishtmlhref.cpp 2006-07-28 08:27:46 UTC (rev 1949)
@@ -350,32 +350,31 @@
// open <q> or <q sID... />
if ((!tag.isEmpty()) || (tag.getAttribute("sID"))) {
+ // Do this first so quote marks are red
+ if (who == "Jesus" && !u->suspendTextPassThru) {
+ outText(u->wordsOfChristStart, buf, u);
+ u->inQuote = true;
+ }
// Honor the marker attribute, ignoring the osisQToTick
- u->providesQuote = false;
+ if (!tag.isEmpty()) {
+ u->providesQuote = false;
+ }
if (mark) {
if (*mark) {
outText(mark, buf, u);
}
- u->quoteMark = mark;
- u->providesQuote = true;
+ if (!tag.isEmpty()) {
+ u->quoteMark = mark;
+ u->providesQuote = true;
+ }
}
//alternate " and '
else if (u->osisQToTick)
outText((level % 2) ? '\"' : '\'', buf, u);
-
- if (who == "Jesus" && !u->suspendTextPassThru) {
- outText(u->wordsOfChristStart, buf, u);
- u->inQuote = true;
- }
}
// close </q> or <q eID... />
else if ((tag.isEndTag()) || (tag.getAttribute("eID"))) {
- // if we've changed font color, we should put it back
- if (u->inQuote) {
- outText(u->wordsOfChristEnd, buf, u);
- u->inQuote = false;
- }
// first check to see if we've been given an explicit mark
if (mark) {
if (*mark) {
@@ -383,14 +382,22 @@
}
}
// next check to see if our opening q provided an explicit mark
- else if (u->providesQuote) {
+ else if (u->providesQuote && !tag.getAttribute("eID")) {
if (u->quoteMark.length()) {
outText(u->quoteMark, buf, u);
}
+ u->providesQuote = false;
}
// finally, alternate " and ', if config says we should supply a mark
else if (u->osisQToTick)
outText((level % 2) ? '\"' : '\'', buf, u);
+
+ // if we've changed font color, we should put it back
+ // Do this last so quote mark is colored
+ if (u->inQuote && (who == "Jesus" || tag.isEndTag())) {
+ outText(u->wordsOfChristEnd, buf, u);
+ u->inQuote = false;
+ }
}
}
Modified: trunk/src/modules/filters/osisrtf.cpp
===================================================================
--- trunk/src/modules/filters/osisrtf.cpp 2006-07-21 23:02:09 UTC (rev 1948)
+++ trunk/src/modules/filters/osisrtf.cpp 2006-07-28 08:27:46 UTC (rev 1949)
@@ -269,31 +269,30 @@
// open <q> or <q sID... />
if ((!tag.isEmpty()) || (tag.getAttribute("sID"))) {
+ if (who == "Jesus") {
+ buf += "\\cf6 ";
+ u->inQuote = true;
+ }
+
// Honor the marker attribute, ignoring the osisQToTick
- u->providesQuote = false;
+ if (!tag.isEmpty()) {
+ u->providesQuote = false;
+ }
if (mark) {
if (*mark) {
buf += mark;
}
- u->quoteMark = mark;
- u->providesQuote = true;
+ if (!tag.isEmpty()) {
+ u->quoteMark = mark;
+ u->providesQuote = true;
+ }
}
//alternate " and '
else if (u->osisQToTick)
buf += (level % 2) ? '\"' : '\'';
-
- if (who == "Jesus") {
- buf += "\\cf6 ";
- u->inQuote = true;
- }
}
// close </q> or <q eID... />
else if ((tag.isEndTag()) || (tag.getAttribute("eID"))) {
- // if we've changed color, we should put it back
- if (u->inQuote) {
- buf += "\\cf0 ";
- u->inQuote = false;
- }
// first check to see if we've been given an explicit mark
if (mark) {
if (*mark) {
@@ -301,14 +300,22 @@
}
}
// next check to see if our opening q provided an explicit mark
- else if (u->providesQuote) {
+ else if (u->providesQuote && !tag.getAttribute("eID")) {
if (u->quoteMark.length()) {
buf += u->quoteMark;
}
+ u->providesQuote = false;
}
// finally, alternate " and ', if config says we should supply a mark
else if (u->osisQToTick)
buf += (level % 2) ? '\"' : '\'';
+
+ // if we've changed color, we should put it back
+ // Do this last so quote mark is colored
+ if (u->inQuote && (who == "Jesus" || tag.isEndTag())) {
+ buf += "\\cf0 ";
+ u->inQuote = false;
+ }
}
}
More information about the sword-cvs
mailing list