[sword-svn] r2032 - trunk/src/modules/filters
tbiggs at www.crosswire.org
tbiggs at www.crosswire.org
Sat Mar 10 13:09:36 MST 2007
Author: tbiggs
Date: 2007-03-10 13:09:35 -0700 (Sat, 10 Mar 2007)
New Revision: 2032
Modified:
trunk/src/modules/filters/thmlhtmlhref.cpp
Log:
fixed a typo and removed spaces around srcipRefs
Modified: trunk/src/modules/filters/thmlhtmlhref.cpp
===================================================================
--- trunk/src/modules/filters/thmlhtmlhref.cpp 2007-03-03 20:00:07 UTC (rev 2031)
+++ trunk/src/modules/filters/thmlhtmlhref.cpp 2007-03-10 20:09:35 UTC (rev 2032)
@@ -167,28 +167,21 @@
SWBuf value = tag.getAttribute("value");
if (tag.getAttribute("type") && !strcmp(tag.getAttribute("type"), "morph")) { //>
if(value.length())
- buf.appendFormatted("<small><em>(<a href=\"passagestudy.jsp?action=showMorph&type=Greek&value=%s\">*s</a>) </em></small>",
+ buf.appendFormatted("<small><em>(<a href=\"passagestudy.jsp?action=showMorph&type=Greek&value=%s\">%s</a>)</em></small>",
URL::encode(value.c_str()).c_str(),
value.c_str());
}
else if (tag.getAttribute("type") && !strcmp(tag.getAttribute("type"), "Strongs")) {
- if(*value == 'H') {
- value<<1;
- buf.appendFormatted("<small><em><<a href=\"passagestudy.jsp?action=showStrongs&type=Hebrew&value=%s\">",
- URL::encode(value.c_str()).c_str());
- }
- else if(*value == 'G') {
- value<<1;
- buf.appendFormatted("<small><em><<a href=\"passagestudy.jsp?action=showStrongs&type=Greek&value=%s\">",
- URL::encode(value.c_str()).c_str());
- }
+ char ch = *value;
+ value<<1;
+ buf.appendFormatted("<small><em><<a href=\"passagestudy.jsp?action=showStrongs&type=%s&value=%s\">",
+ ((ch == 'H') ? "Hebrew" : "Greek"),
+ URL::encode(value.c_str()).c_str());
buf += (value.length()) ? value.c_str() : "";
- buf += "</a>> </em></small>";
+ buf += "</a>></em></small>";
}
else if (tag.getAttribute("type") && !strcmp(tag.getAttribute("type"), "Dict")) {
- if (!tag.isEndTag())
- buf += "<b>";
- else buf += "</b>";
+ buf += (tag.isEndTag() ? "</b>" : "<b>");
}
}
@@ -207,7 +200,7 @@
if (vkey) {
// leave this special osis type in for crossReference notes types? Might thml use this some day? Doesn't hurt.
char ch = ((tag.getAttribute("type") && ((!strcmp(tag.getAttribute("type"), "crossReference")) || (!strcmp(tag.getAttribute("type"), "x-cross-ref")))) ? 'x':'n');
- buf.appendFormatted("<a href=\"passagestudy.jsp?action=showNote&type=%c&value=%s&module=%s&passage=%s\"><small><sup>*%c</sup></small></a> ",
+ buf.appendFormatted("<a href=\"passagestudy.jsp?action=showNote&type=%c&value=%s&module=%s&passage=%s\"><small><sup>*%c</sup></small></a>",
ch,
URL::encode(footnoteNumber.c_str()).c_str(),
URL::encode(u->version.c_str()).c_str(),
@@ -231,8 +224,7 @@
}
}
else if (!strcmp(tag.getName(), "scripture")) {
- if (!tag.isEndTag()) buf += "<i>";
- if (tag.isEndTag()) buf += "</i>";
+ buf += (tag.isEndTag() ? "</i>" : "<i>");
}
// <scripRef> tag
else if (!strcmp(tag.getName(), "scripRef")) {
@@ -248,11 +240,11 @@
refList = u->lastTextNode;
SWBuf version = tag.getAttribute("version");
- buf.appendFormatted(" <a href=\"passagestudy.jsp?action=showRef&type=scripRef&value=%s&module=%s\">",
+ buf.appendFormatted("<a href=\"passagestudy.jsp?action=showRef&type=scripRef&value=%s&module=%s\">",
(refList.length()) ? URL::encode(refList.c_str()).c_str() : "",
(version.length()) ? URL::encode(version.c_str()).c_str() : "");
buf += u->lastTextNode.c_str();
- buf += "</a> ";
+ buf += "</a>";
}
else {
SWBuf footnoteNumber = u->startTag.getAttribute("swordFootnote");
@@ -265,7 +257,7 @@
if (vkey) {
// leave this special osis type in for crossReference notes types? Might thml use this some day? Doesn't hurt.
//buf.appendFormatted("<a href=\"noteID=%s.x.%s\"><small><sup>*x</sup></small></a> ", vkey->getText(), footnoteNumber.c_str());
- buf.appendFormatted("<a href=\"passagestudy.jsp?action=showNote&type=x&value=%s&module=%s&passage=%s\"><small><sup>*x</sup></small></a> ",
+ buf.appendFormatted("<a href=\"passagestudy.jsp?action=showNote&type=x&value=%s&module=%s&passage=%s\"><small><sup>*x</sup></small></a>",
URL::encode(footnoteNumber.c_str()).c_str(),
URL::encode(u->version.c_str()).c_str(),
URL::encode(vkey->getText()).c_str());
More information about the sword-cvs
mailing list