[sword-svn] r3694 - trunk/src/modules/filters
refdoc at crosswire.org
refdoc at crosswire.org
Sun Feb 2 23:11:42 MST 2020
Author: refdoc
Date: 2020-02-02 23:11:42 -0700 (Sun, 02 Feb 2020)
New Revision: 3694
Modified:
trunk/src/modules/filters/teiplain.cpp
Log:
added a primitive list implementation. Numbered lists should be considered
as to how to implement them
Modified: trunk/src/modules/filters/teiplain.cpp
===================================================================
--- trunk/src/modules/filters/teiplain.cpp 2020-02-02 21:01:20 UTC (rev 3693)
+++ trunk/src/modules/filters/teiplain.cpp 2020-02-03 06:11:42 UTC (rev 3694)
@@ -109,8 +109,29 @@
else if (tag.isEndTag()) {
buf += "]";
}
+ }
+
+ // <list> <item> This implementation does not distinguish between forms of lists
+ // it would be nice if a numbered list could be added
+
+ else if (!strcmp(tag.getName(), "list")) {
+ if ((!tag.isEndTag()) && (!tag.isEmpty())) {
+
+ buf += "\n";
+ }
+ else if (tag.isEndTag()) {
+ buf += "\n";
+ u->supressAdjacentWhitespace = true;
+ }
}
-
+ else if (!strcmp(tag.getName(), "item")) {
+ if ((!tag.isEndTag()) && (!tag.isEmpty())) {
+ buf += "\t* ";
+ }
+ else if (tag.isEndTag()) {
+ buf += "\n";
+ }
+ }
else {
return false; // we still didn't handle token
}
More information about the sword-cvs
mailing list