[sword-svn] r3188 - in branches/sword-1-7-x: . src/modules/filters
greg.hellings at crosswire.org
greg.hellings at crosswire.org
Wed Apr 16 21:35:02 MST 2014
Author: greg.hellings
Date: 2014-04-16 21:35:02 -0700 (Wed, 16 Apr 2014)
New Revision: 3188
Modified:
branches/sword-1-7-x/
branches/sword-1-7-x/src/modules/filters/osisheadings.cpp
Log:
Merging r3155 - Making consistent OSIS <title> rendering
Property changes on: branches/sword-1-7-x
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk:2989-2991,2997,3001-3004,3006,3010-3013,3015-3020,3026-3039,3045-3046,3048,3056,3058-3062,3067,3073,3077-3081,3085-3086,3091,3094,3097-3099,3102,3104,3106-3108,3110,3115,3118-3121,3126-3127,3131-3135,3140,3144,3151,3153-3154
+ /trunk:2989-2991,2997,3001-3004,3006,3010-3013,3015-3020,3026-3039,3045-3046,3048,3056,3058-3062,3067,3073,3077-3081,3085-3086,3091,3094,3097-3099,3102,3104,3106-3108,3110,3115,3118-3121,3126-3127,3131-3135,3140,3144,3151,3153-3155
Modified: branches/sword-1-7-x/src/modules/filters/osisheadings.cpp
===================================================================
--- branches/sword-1-7-x/src/modules/filters/osisheadings.cpp 2014-04-17 04:34:03 UTC (rev 3187)
+++ branches/sword-1-7-x/src/modules/filters/osisheadings.cpp 2014-04-17 04:35:02 UTC (rev 3188)
@@ -91,6 +91,8 @@
if (name == u->currentHeadingName) {
if (tag.isEndTag(u->sID)) {
if (!u->depth-- || u->sID) {
+ // see comment below about preverse div changed and needing to preserve the <title> container tag for old school pre-verse titles
+ if (u->currentHeadingName == "title") u->heading.append(tag);
// we've just finished a heading. It's all stored up in u->heading
bool canonical = (SWBuf("true") == u->currentHeadingTag.getAttribute("canonical"));
bool preverse = (SWBuf("x-preverse") == u->currentHeadingTag.getAttribute("subType") || SWBuf("x-preverse") == u->currentHeadingTag.getAttribute("subtype"));
@@ -130,7 +132,16 @@
u->currentHeadingName = name;
u->currentHeadingTag = tag;
- u->heading = "";
+ // leave the actual <title...> wrapper in if we're part of an old school preverse title
+ // because now frontend have to deal with preverse as a div which may or may not include <title> elements
+ // and they can't simply wrap all preverse material in <h1>, like they probably did previously
+ if (name == "title") {
+ XMLTag wrapper = tag;
+ if (SWBuf("x-preverse") == wrapper.getAttribute("subType")) wrapper.setAttribute("subType", 0);
+ else if (SWBuf("x-preverse") == wrapper.getAttribute("subtype")) wrapper.setAttribute("subtype", 0);
+ u->heading = wrapper;
+ }
+ else u->heading = "";
u->sID = u->currentHeadingTag.getAttribute("sID");
u->depth = 0;
u->suspendTextPassThru = true;
More information about the sword-cvs
mailing list