diff options
Diffstat (limited to 'src/modules/filters/thmlxhtml.cpp')
-rw-r--r-- | src/modules/filters/thmlxhtml.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/modules/filters/thmlxhtml.cpp b/src/modules/filters/thmlxhtml.cpp index b17eb50..eb9c40a 100644 --- a/src/modules/filters/thmlxhtml.cpp +++ b/src/modules/filters/thmlxhtml.cpp @@ -2,7 +2,7 @@ * * thmlxhtml.cpp - ThML to classed XHTML * - * $Id: thmlxhtml.cpp 2980 2013-09-14 21:51:47Z scribe $ + * $Id: thmlxhtml.cpp 3205 2014-05-01 02:31:28Z greg.hellings $ * * Copyright 2011-2013 CrossWire Bible Society (http://www.crosswire.org) * CrossWire Bible Society @@ -230,7 +230,7 @@ bool ThMLXHTML::handleToken(SWBuf &buf, const char *token, BasicFilterUserData * URL::encode(vkey->getText()).c_str(), ch, ch, - (renderNoteNumbers ? URL::encode(noteName.c_str()).c_str() : "")); + (renderNoteNumbers ? noteName.c_str() : "")); } else { char ch = ((tag.getAttribute("type") && ((!strcmp(tag.getAttribute("type"), "crossReference")) || (!strcmp(tag.getAttribute("type"), "x-cross-ref")))) ? 'x':'n'); @@ -241,7 +241,7 @@ bool ThMLXHTML::handleToken(SWBuf &buf, const char *token, BasicFilterUserData * URL::encode(u->key->getText()).c_str(), ch, ch, - (renderNoteNumbers ? URL::encode(noteName.c_str()).c_str() : "")); + (renderNoteNumbers ? noteName.c_str() : "")); } u->suspendTextPassThru = true; } @@ -289,7 +289,7 @@ bool ThMLXHTML::handleToken(SWBuf &buf, const char *token, BasicFilterUserData * URL::encode(footnoteNumber.c_str()).c_str(), URL::encode(u->version.c_str()).c_str(), URL::encode(vkey->getText()).c_str(), - (renderNoteNumbers ? URL::encode(noteName.c_str()).c_str() : "")); + (renderNoteNumbers ? noteName.c_str() : "")); } } @@ -299,17 +299,19 @@ bool ThMLXHTML::handleToken(SWBuf &buf, const char *token, BasicFilterUserData * } else if (tag.getName() && !strcmp(tag.getName(), "div")) { if (tag.isEndTag() && u->SecHead) { - buf += "</i></b><br />"; + buf += "</h"; + buf += u->SecHead; + buf += ">"; u->SecHead = false; } else if (tag.getAttribute("class")) { if (!stricmp(tag.getAttribute("class"), "sechead")) { - u->SecHead = true; - buf += "<br /><b><i>"; + u->SecHead = '3'; + buf += "<h3>"; } else if (!stricmp(tag.getAttribute("class"), "title")) { - u->SecHead = true; - buf += "<br /><b><i>"; + u->SecHead = '2'; + buf += "<h2>"; } else { buf += tag; |