<div dir="ltr">Shouldn't this include something more like <h3 class="title">, in an effort to include more class-based information in the output of our filters to facilitate rendering?<div><div><br></div>
<div>--Greg</div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 15, 2014 at 4:27 PM, <span dir="ltr"><<a href="mailto:scribe@crosswire.org" target="_blank">scribe@crosswire.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: scribe<br>
Date: 2014-04-15 14:27:54 -0700 (Tue, 15 Apr 2014)<br>
New Revision: 3155<br>
<br>
Modified:<br>
trunk/src/modules/filters/osisheadings.cpp<br>
Log:<br>
Made consistent the handling of old school preverse titles and the newer<br>
preverse divs. They both include the <title> tags now for titles, so<br>
fronends need to stop wrapping preverse headings with <h3> or whatever<br>
the do to make it stand off as a title. The <title> tag will process as<br>
any other title tag now.<br>
<br>
Modified: trunk/src/modules/filters/osisheadings.cpp<br>
===================================================================<br>
--- trunk/src/modules/filters/osisheadings.cpp 2014-04-15 20:27:07 UTC (rev 3154)<br>
+++ trunk/src/modules/filters/osisheadings.cpp 2014-04-15 21:27:54 UTC (rev 3155)<br>
@@ -91,6 +91,8 @@<br>
if (name == u->currentHeadingName) {<br>
if (tag.isEndTag(u->sID)) {<br>
if (!u->depth-- || u->sID) {<br>
+ // see comment below about preverse div changed and needing to preserve the <title> container tag for old school pre-verse titles<br>
+ if (u->currentHeadingName == "title") u->heading.append(tag);<br>
// we've just finished a heading. It's all stored up in u->heading<br>
bool canonical = (SWBuf("true") == u->currentHeadingTag.getAttribute("canonical"));<br>
bool preverse = (SWBuf("x-preverse") == u->currentHeadingTag.getAttribute("subType") || SWBuf("x-preverse") == u->currentHeadingTag.getAttribute("subtype"));<br>
@@ -130,7 +132,16 @@<br>
<br>
u->currentHeadingName = name;<br>
u->currentHeadingTag = tag;<br>
- u->heading = "";<br>
+ // leave the actual <title...> wrapper in if we're part of an old school preverse title<br>
+ // because now frontend have to deal with preverse as a div which may or may not include <title> elements<br>
+ // and they can't simply wrap all preverse material in <h1>, like they probably did previously<br>
+ if (name == "title") {<br>
+ XMLTag wrapper = tag;<br>
+ if (SWBuf("x-preverse") == wrapper.getAttribute("subType")) wrapper.setAttribute("subType", 0);<br>
+ else if (SWBuf("x-preverse") == wrapper.getAttribute("subtype")) wrapper.setAttribute("subtype", 0);<br>
+ u->heading = wrapper;<br>
+ }<br>
+ else u->heading = "";<br>
u->sID = u->currentHeadingTag.getAttribute("sID");<br>
u->depth = 0;<br>
u->suspendTextPassThru = true;<br>
<br>
<br>
_______________________________________________<br>
sword-cvs mailing list<br>
<a href="mailto:sword-cvs@crosswire.org">sword-cvs@crosswire.org</a><br>
<a href="http://www.crosswire.org/mailman/listinfo/sword-cvs" target="_blank">http://www.crosswire.org/mailman/listinfo/sword-cvs</a><br>
</blockquote></div><br></div>