[sword-svn] r3388 - trunk/src/modules/filters
refdoc at crosswire.org
refdoc at crosswire.org
Thu Sep 3 09:13:36 MST 2015
Author: refdoc
Date: 2015-09-03 09:13:36 -0700 (Thu, 03 Sep 2015)
New Revision: 3388
Modified:
trunk/src/modules/filters/osisxhtml.cpp
Log:
improved <abbr> support, with added CSS . You can test it in footnote 13 in Gen.1.1 WLC.
Modified: trunk/src/modules/filters/osisxhtml.cpp
===================================================================
--- trunk/src/modules/filters/osisxhtml.cpp 2015-09-03 14:47:00 UTC (rev 3387)
+++ trunk/src/modules/filters/osisxhtml.cpp 2015-09-03 16:13:36 UTC (rev 3388)
@@ -43,6 +43,7 @@
.indent2 { margin-left: 20px }\n\
.indent3 { margin-left: 30px }\n\
.indent4 { margin-left: 40px }\n\
+ abbr { &:hover{ &:before{ content: attr(title) } } }\n\
.small-caps { font-variant: small-caps; }\n\
.selah { text-align: right; width: 50%; margin: 0; padding: 0; }\n\
.acrostic { text-align: center; }\n\
@@ -762,7 +763,16 @@
buf += tag;
}
else if (!strcmp(tag.getName(), "abbr")) {
- buf += tag;
+ if (!tag.isEndTag()) {
+ SWBuf title = tag.getAttribute("expansion");
+ buf += "<abbr title=\"";
+ buf += title;
+ buf += "\">";
+ }
+ else if (tag.isEndTag()) {
+ buf += "</abbr>";
+ }
+
}
else if (!strcmp(tag.getName(), "br")) {
buf += tag;
More information about the sword-cvs
mailing list