[sword-svn] r3807 - trunk/src/modules/filters
scribe at crosswire.org
scribe at crosswire.org
Sun Sep 27 08:59:54 EDT 2020
Author: scribe
Date: 2020-09-27 08:59:54 -0400 (Sun, 27 Sep 2020)
New Revision: 3807
Modified:
trunk/src/modules/filters/teihtmlhref.cpp
trunk/src/modules/filters/teixhtml.cpp
Log:
fixed unknown tei list rend type to output <ul class...> instead of <span>. <span> caused <li> elements to be output outside of an HTML list type which is invalid HTML.
added support for TEI <list rend="lettered">
Modified: trunk/src/modules/filters/teihtmlhref.cpp
===================================================================
--- trunk/src/modules/filters/teihtmlhref.cpp 2020-09-19 16:58:27 UTC (rev 3806)
+++ trunk/src/modules/filters/teihtmlhref.cpp 2020-09-27 12:59:54 UTC (rev 3807)
@@ -331,12 +331,15 @@
u->lastHi = rend;
if (rend == "numbered") {
buf += "<ol>\n";
- }
+ }
+ else if (rend == "lettered") {
+ buf += "<ol type=\"A\">\n";
+ }
else if (rend == "bulleted") {
buf += "<ul>\n";
}
else {
- buf += "<span class=\"list ";
+ buf += "<ul class=\"list ";
buf += rend.c_str();
buf += "\">";
}
@@ -346,12 +349,14 @@
if (rend == "numbered") {
buf += "</ol>\n>";
}
+ else if (rend == "lettered") {
+ buf += "</ol>\n";
+ }
else if (rend == "bulleted") {
buf += "</ul>\n";
-
}
else {
- buf += "</span>\n";
+ buf += "</ul>\n";
}
u->supressAdjacentWhitespace = true;
}
Modified: trunk/src/modules/filters/teixhtml.cpp
===================================================================
--- trunk/src/modules/filters/teixhtml.cpp 2020-09-19 16:58:27 UTC (rev 3806)
+++ trunk/src/modules/filters/teixhtml.cpp 2020-09-27 12:59:54 UTC (rev 3807)
@@ -360,12 +360,15 @@
u->lastHi = rend;
if (rend == "numbered") {
buf += "<ol>\n";
- }
+ }
+ else if (rend == "lettered") {
+ buf += "<ol type=\"A\">\n";
+ }
else if (rend == "bulleted") {
buf += "<ul>\n";
}
else {
- buf += "<span class=\"list ";
+ buf += "<ul class=\"list ";
buf += rend.c_str();
buf += "\">";
}
@@ -375,12 +378,14 @@
if (rend == "numbered") {
buf += "</ol>\n>";
}
+ else if (rend == "lettered") {
+ buf += "</ol>\n";
+ }
else if (rend == "bulleted") {
buf += "</ul>\n";
-
}
else {
- buf += "</span>\n";
+ buf += "</ul>\n";
}
u->supressAdjacentWhitespace = true;
}
More information about the sword-cvs
mailing list