[jsword-devel] Linked verses

Martin Denham mjdenham at gmail.com
Tue Jul 23 13:18:14 MST 2013


Further to the discussion of linked verses on the Sword list I had been
hoping to do a pull request for a change to JSword that I am using in And
Bible that removes duplicated verses.  I raised a bug for this some time
ago - JS-224.

Attached is the fix currently used in And Bible.  I have been hoping to
find time to write a junit and create a Pull request with this change for
some time now but have been busy.

Here is the important part, the updated file is attached:
// If the verse is empty or repeated then we shouldn't add the verse
if ((allowEmpty || rawText.length() > 0 ) &&
!previousVerseText.equals(rawText)) {
List<Content> osisContent = filter.toOSIS(AbstractPassageBook.this, verse,
rawText);
addOSIS(verse, partialDom, osisContent);
}
previousVerseText = rawText;

I have Turkish friends and TurNTB is full of linked verses so I had to
implement some sort of fix.

Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/jsword-devel/attachments/20130723/9515a2d5/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: AbstractPassageBook.java
Type: application/octet-stream
Size: 8622 bytes
Desc: not available
URL: <http://www.crosswire.org/pipermail/jsword-devel/attachments/20130723/9515a2d5/attachment.obj>


More information about the jsword-devel mailing list