[sword-svn] r1776 - trunk/src/modules/filters
chrislit at crosswire.org
chrislit at crosswire.org
Sat Apr 16 07:31:06 MST 2005
Author: chrislit
Date: 2005-04-16 07:31:06 -0700 (Sat, 16 Apr 2005)
New Revision: 1776
Modified:
trunk/src/modules/filters/osishtmlhref.cpp
Log:
Modified: trunk/src/modules/filters/osishtmlhref.cpp
===================================================================
--- trunk/src/modules/filters/osishtmlhref.cpp 2005-04-12 08:00:19 UTC (rev 1775)
+++ trunk/src/modules/filters/osishtmlhref.cpp 2005-04-16 14:31:06 UTC (rev 1776)
@@ -259,18 +259,30 @@
}
}
- // <hi> hi? hi contrast?
+ // <catchWord> & <rdg> tags (italicize)
+ else if (!strcmp(tag.getName(), "rdg") || !strcmp(tag.getName(), "catchWord")) {
+ if ((!tag.isEndTag()) && (!tag.isEmpty())) {
+ if (!u->suspendTextPassThru)
+ buf += "<i>";
+ }
+ else if (tag.isEndTag()) {
+ if (!u->suspendTextPassThru)
+ buf += "</i>";
+ }
+ }
+
+ // <hi> text highlighting
else if (!strcmp(tag.getName(), "hi")) {
SWBuf type = tag.getAttribute("type");
if ((!tag.isEndTag()) && (!tag.isEmpty())) {
if (type == "b" || type == "x-b") {
if (!u->suspendTextPassThru)
- buf += "<b> ";
+ buf += "<b>";
u->inBold = true;
}
else { // all other types
if (!u->suspendTextPassThru)
- buf += "<i> ";
+ buf += "<i>";
u->inBold = false;
}
}
@@ -284,9 +296,6 @@
if (!u->suspendTextPassThru)
buf += "</i>";
}
- else { // empty hi marker
- // what to do? is this even valid?
- }
}
// <q> quote
@@ -295,7 +304,7 @@
SWBuf who = tag.getAttribute("who");
const char *lev = tag.getAttribute("level");
int level = (lev) ? atoi(lev) : 1;
-
+
if ((!tag.isEndTag()) && (!tag.isEmpty())) {
/*buf += "{";*/
@@ -306,7 +315,7 @@
if (who == "Jesus") {
if (!u->suspendTextPassThru)
- buf += "<font color=\"red\"> ";
+ buf += "<font color=\"red\">";
}
}
else if (tag.isEndTag()) {
@@ -327,7 +336,7 @@
// <transChange>
else if (!strcmp(tag.getName(), "transChange")) {
SWBuf type = tag.getAttribute("type");
-
+
if ((!tag.isEndTag()) && (!tag.isEmpty())) {
// just do all transChange tags this way for now
@@ -364,7 +373,7 @@
buf+="\" />";
}
}
-
+
else {
return false; // we still didn't handle token
}
More information about the sword-cvs
mailing list