diff options
Diffstat (limited to 'src/backend/filters/osistohtml.cpp')
-rw-r--r-- | src/backend/filters/osistohtml.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/backend/filters/osistohtml.cpp b/src/backend/filters/osistohtml.cpp index bca5670..cd06275 100644 --- a/src/backend/filters/osistohtml.cpp +++ b/src/backend/filters/osistohtml.cpp @@ -78,6 +78,11 @@ bool Filters::OsisToHtml::handleToken(sword::SWBuf &buf, const char *token, swor buf.append("<div class=\"chapter\" ></div>"); //don't open a div here, that would lead to a broken XML structure } else if (type == "x-p") { buf.append("<br/>"); + } else if (type == "paragraph") { + if (tag.getAttribute("sID")) + buf.append("<p>"); + else if (tag.getAttribute("eID")) + buf.append("</p>"); } else { buf.append("<div>"); } @@ -285,7 +290,6 @@ bool Filters::OsisToHtml::handleToken(sword::SWBuf &buf, const char *token, swor myUserData->suspendTextPassThru = false; } } - // The <p> paragraph tag is handled by OSISHTMLHref else if (!strcmp(tag.getName(), "reference")) { // <reference> tag if (!tag.isEndTag() && !tag.isEmpty()) { @@ -417,9 +421,11 @@ bool Filters::OsisToHtml::handleToken(sword::SWBuf &buf, const char *token, swor } } else if (!strcmp(tag.getName(), "p")) { - if (tag.isEmpty()) { - buf.append("<p/>"); - } + if (tag.isEndTag()) + buf.append("</p>"); + else + buf.append("<p>"); + } // <q> quote |