Details
-
Type: Bug
-
Status: Closed (View Workflow)
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 1.6.1
-
Fix Version/s: 1.7
-
Component/s: o.c.jsword.book.filter.thml
-
Labels:None
Description
Passages like TSK Matt 21:21 contain incomplete references like "17:20; Mr 11:22,23; Lu 17:6,7; Ro 4:19,20; 1Co 13:2; Jas 1:6". Note the first ref has no book name but is assumed to refer to Matthew.
This doesn't seem to be handled properly by ScripRefTag. It would be good if ScripRefTag used a Basis but I can't see any way to make it do that.
In my tests ScripRefTag throws and catches a NoSuchKeyException in processContent.
This test isn't great but it would allow you to step quickly into the relevant code:
Book book = Books.installed().getBook("TSK");
Key key = book.getKey("Matt 21:21");
BookData data = new BookData(book, key);
SAXEventProvider osissep = data.getSAXEventProvider();
final StringBuilder tags = new StringBuilder();
ContentHandler saxHandler = new DefaultHandler() {
@Override
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
};
osissep.provideSAXEvents(saxHandler);
String html = tags.toString();
System.out.println(html);
Matt 21:21 is an example of a reference that has no book. An example of a reference with no book or chapter is Matt 21:43 which starts with a simple verse number.
I am going to try to work around this by prepending the current book or book & chapter if there is no ref string passed to And Bible but that is just a temporary fudge.