summaryrefslogtreecommitdiff
path: root/src/modules/filters/osishtmlhref.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/filters/osishtmlhref.cpp')
-rw-r--r--src/modules/filters/osishtmlhref.cpp24
1 files changed, 19 insertions, 5 deletions
diff --git a/src/modules/filters/osishtmlhref.cpp b/src/modules/filters/osishtmlhref.cpp
index 74b2da7..9cda9ab 100644
--- a/src/modules/filters/osishtmlhref.cpp
+++ b/src/modules/filters/osishtmlhref.cpp
@@ -2,9 +2,9 @@
*
* osishtmlhref.cpp - OSIS to HTML with hrefs filter
*
- * $Id: osishtmlhref.cpp 3005 2014-01-09 04:06:11Z greg.hellings $
+ * $Id: osishtmlhref.cpp 3173 2014-04-17 04:20:33Z greg.hellings $
*
- * Copyright 2003-2013 CrossWire Bible Society (http://www.crosswire.org)
+ * Copyright 2003-2014 CrossWire Bible Society (http://www.crosswire.org)
* CrossWire Bible Society
* P. O. Box 2528
* Tempe, AZ 85280-2528
@@ -289,7 +289,7 @@ bool OSISHTMLHREF::handleToken(SWBuf &buf, const char *token, BasicFilterUserDat
// Milestoned paragraphs, created by osis2mod
// <div type="paragraph" sID.../>
// <div type="paragraph" eID.../>
- else if (tag.isEmpty() && !strcmp(tag.getName(), "div") && tag.getAttribute("type") && !strcmp(tag.getAttribute("type"), "paragraph")) {
+ else if (tag.isEmpty() && !strcmp(tag.getName(), "div") && tag.getAttribute("type") && (!strcmp(tag.getAttribute("type"), "x-p") || !strcmp(tag.getAttribute("type"), "paragraph"))) {
// <div type="paragraph" sID... />
if (tag.getAttribute("sID")) { // non-empty start tag
outText("<!P><br />", buf, u);
@@ -481,9 +481,15 @@ bool OSISHTMLHREF::handleToken(SWBuf &buf, const char *token, BasicFilterUserDat
if (type == "bold" || type == "b" || type == "x-b") {
outText("<b>", buf, u);
}
- else if (type == "ol") {
+ else if (type == "ol" || type == "overline" || type == "x-overline") {
outText("<span style=\"text-decoration:overline\">", buf, u);
}
+ else if (type == "super") {
+ outText("<sup>", buf, u);
+ }
+ else if (type == "sub") {
+ outText("<sub>", buf, u);
+ }
else { // all other types
outText("<i>", buf, u);
}
@@ -503,7 +509,15 @@ bool OSISHTMLHREF::handleToken(SWBuf &buf, const char *token, BasicFilterUserDat
else if (type == "ol") {
outText("</span>", buf, u);
}
- else outText("</i>", buf, u);
+ else if (type == "sup") {
+ outText("</sup>", buf, u);
+ }
+ else if (type == "sub") {
+ outText("</sub>", buf, u);
+ }
+ else {
+ outText("</i>", buf, u);
+ }
}
}