[sword-cvs] sword/src/modules/filters osisfootnotes.cpp,1.12,1.13 osisrtf.cpp,1.13,1.14
sword@www.crosswire.org
sword@www.crosswire.org
Tue, 15 Jul 2003 21:55:45 -0700
Update of /usr/local/cvsroot/sword/src/modules/filters
In directory www:/tmp/cvs-serv26977/src/modules/filters
Modified Files:
osisfootnotes.cpp osisrtf.cpp
Log Message:
Added a work around to osisfootnotes for a bug in the KJV2003 module where some
notes of strongsMarkup type are incorrectly marked as <note .../>...</note>
Index: osisfootnotes.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/osisfootnotes.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- osisfootnotes.cpp 16 Jul 2003 02:22:31 -0000 1.12
+++ osisfootnotes.cpp 16 Jul 2003 04:55:43 -0000 1.13
@@ -68,7 +68,11 @@
XMLTag tag(token);
if (!strcmp(tag.getName(), "note")) {
if (!tag.isEndTag()) {
- if ((!tag.isEmpty()) || (SWBuf("strongsMarkup") == tag.getAttribute("type"))) {
+ if (SWBuf("strongsMarkup") == tag.getAttribute("type")) { // handle bug in KJV2003 module where some note open tags were <note ... />
+ tag.setEmpty(false);
+ }
+ if (!tag.isEmpty()) {
+// if ((!tag.isEmpty()) || (SWBuf("strongsMarkup") == tag.getAttribute("type"))) {
refs = "";
startTag = tag;
hide = true;
Index: osisrtf.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/osisrtf.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- osisrtf.cpp 16 Jul 2003 02:22:31 -0000 1.13
+++ osisrtf.cpp 16 Jul 2003 04:55:43 -0000 1.14
@@ -128,7 +128,7 @@
// <note> tag
else if (!strcmp(tag.getName(), "note")) {
if (!tag.isEndTag()) {
- if ((!tag.isEmpty()) || (SWBuf("strongsMarkup") == tag.getAttribute("type"))) { // handle bug in KJV2003 module where some note open tags were <note ... />
+ if (!tag.isEmpty()) {
SWBuf type = tag.getAttribute("type");
if (type != "strongsMarkup") { // leave strong's markup notes out, in the future we'll probably have different option filters to turn different note types on or off