Troy, this is a bugfix I made to thmlheadings.cpp to prevent it from destroying variant headers while processing preverse headers. The problem is that "withinDiv" forces any <div> content into the header, and that's simply wrong for variant content. This seems to do the right thing, but please give this enough attention to ensure that I'm not coloring outside the lines.
I haven't looked at the OSIS equivalent, but I'd wager large sums that it has a similar problem. thanx, --karl
Index: src/modules/filters/thmlheadings.cpp =================================================================== --- src/modules/filters/thmlheadings.cpp (revision 2129) +++ src/modules/filters/thmlheadings.cpp (working copy) @@ -33,6 +33,7 @@ char ThMLHeadings::processText(SWBuf &text, const SWKey *key, const SWModule *module) { SWBuf token; bool intoken = false; + bool isheader = false; bool hide = false; bool preverse = false; bool withinDiv = false; @@ -89,6 +90,8 @@ } if (tag.getAttribute("class") && ((!stricmp(tag.getAttribute("class"), "sechead")) || (!stricmp(tag.getAttribute("class"), "title")))) { + + isheader = true; if (!tag.isEndTag()) { //start tag if (!tag.isEmpty()) { @@ -117,9 +120,11 @@ } */ } + else + isheader = false; } - if (withinDiv) { + if (withinDiv && isheader) { header.append('<'); header.append(token); header.append('>');
_______________________________________________ sword-devel mailing list: sword-devel@crosswire.org http://www.crosswire.org/mailman/listinfo/sword-devel Instructions to unsubscribe/change your settings at above page