[sword-svn] r1903 - trunk/src/modules/filters
tbiggs at crosswire.org
tbiggs at crosswire.org
Mon Apr 3 14:59:38 MST 2006
Author: tbiggs
Date: 2006-04-03 14:59:33 -0700 (Mon, 03 Apr 2006)
New Revision: 1903
Modified:
trunk/src/modules/filters/osishtmlhref.cpp
Log:
patched to show small caps for divineName tags
Modified: trunk/src/modules/filters/osishtmlhref.cpp
===================================================================
--- trunk/src/modules/filters/osishtmlhref.cpp 2006-04-03 21:59:03 UTC (rev 1902)
+++ trunk/src/modules/filters/osishtmlhref.cpp 2006-04-03 21:59:33 UTC (rev 1903)
@@ -276,6 +276,32 @@
}
}
+ // divineName
+ else if (!strcmp(tag.getName(), "divineName")) {
+ SWBuf type = tag.getAttribute("type");
+ if ((!tag.isEndTag()) && (!tag.isEmpty())) {
+ if (type == "x-yhwh") {
+ u->inName = true;
+ u->suspendTextPassThru = true;
+ } else {
+ u->inName = false;
+ }
+ } else if (tag.isEndTag()) {
+ if(u->inName ) {
+ char firstChar = *u->lastTextNode.c_str();
+ const char *name = u->lastTextNode.c_str();
+ ++name;
+ buf += firstChar;
+ buf += "<font size=\"-1\">";
+ for(int i=0;i<strlen(name);i++)
+ buf += toupper(name[i]);
+ buf += "</font>";
+ u->inName = false;
+ u->suspendTextPassThru = false;
+ }
+ }
+ }
+
// <hi> text highlighting
else if (!strcmp(tag.getName(), "hi")) {
SWBuf type = tag.getAttribute("type");
More information about the sword-cvs
mailing list