[sword-svn] r3692 - trunk/src/modules/filters
refdoc at crosswire.org
refdoc at crosswire.org
Sun Feb 2 13:59:36 MST 2020
Author: refdoc
Date: 2020-02-02 13:59:36 -0700 (Sun, 02 Feb 2020)
New Revision: 3692
Modified:
trunk/src/modules/filters/teihtmlhref.cpp
Log:
Added tags <list> and <item>
Modified: trunk/src/modules/filters/teihtmlhref.cpp
===================================================================
--- trunk/src/modules/filters/teihtmlhref.cpp 2020-02-02 20:18:22 UTC (rev 3691)
+++ trunk/src/modules/filters/teihtmlhref.cpp 2020-02-02 20:59:36 UTC (rev 3692)
@@ -322,6 +322,48 @@
}
}
+ // <list> <item>
+ else if (!strcmp(tag.getName(), "list")) {
+ if ((!tag.isEndTag()) && (!tag.isEmpty())) {
+
+ SWBuf rend = tag.getAttribute("rend");
+
+ u->lastHi = rend;
+ if (rend == "numbered") {
+ buf += "<ol>\n";
+ }
+ else if (rend == "bulletted") {
+ buf += "<ul>\n";
+ }
+ else {
+ buf += "<span class=\"list ";
+ buf += rend.c_str();
+ buf += "\">";
+ }
+ }
+ else if (tag.isEndTag()) {
+ SWBuf rend = u->lastHi;
+ if (rend == "numbered") {
+ buf += "</ol>\n>";
+ }
+ else if (rend == "bulleted") {
+ buf += "</ul>\n";
+
+ }
+ else {
+ buf += "</span>\n";
+ }
+ u->supressAdjacentWhitespace = true;
+ }
+ }
+ else if (!strcmp(tag.getName(), "item")) {
+ if ((!tag.isEndTag()) && (!tag.isEmpty())) {
+ buf += "<li>";
+ }
+ else if (tag.isEndTag()) {
+ buf += "</li>\n";
+ }
+ }
else {
return false; // we still didn't handle token
}
More information about the sword-cvs
mailing list