[sword-devel] preverse divs
Troy A. Griffitts
scribe at crosswire.org
Tue Feb 28 11:50:13 MST 2012
An issue came up today that reminding me that we haven't officially
finished our support for 'preverse divs'.
You can search the archives, but a brief summary:
Material associated with a verse, but that should be displayed before
the verse marker, used to be called "preverse title" or "preverse
heading". We agreed a while back to generalize this concept to simply
be called a 'preverse div'. Other things besides a single title might
be show before a verse.
---- end of brief summary
So, we have basic support in the engine for this. At one point osis2mod
started generating this new format, it was deemed not yet completely
supported in the engine, and reverted back, and now I'm not sure what
state osis2mod is in regarding this.
The situation which came up today gives a perfect scenario to fix the
problem and put the wraps on this one. We have 2 modules
CrossWire - KJV 2.3
CrossWire Beta - KJV 2.4
Stable 2.3 uses the old scheme
Beta 2.4 uses the new scheme
If you run sword/examples/lookup on both modules to dump the
EntryAttributes of a verse with preverse material, say Psalm 3:1, you'll
see all the differences (old first, then new):
toggle between the two tabs in your browser and see the changes.
So, it looks like we're mostly working. The 'preverse div' is now
showing up in the Heading/Preverse/0 slot, just like the title used to.
BUT, it seems, in a normal frontend experience, that when this is passed
to RenderText, something is not quite right. Maybe the <title> tag and
it's content is getting stripped because it is thought to already be in
the headings section and we're trying to not render it twice? Just a guess.
But it would be interesting to:
// force parse to generate entry attributes
SWBuf preverseMaterial =
cout << preverseMaterial << endl;
cout << module.RenderText(preverseMaterial) << endl;
and see what you get.
Anyone have time to track this one down?
More information about the sword-devel