[jsword-devel] Nave's Topical Bible Reference linking

Trenton D. Adams trent.jsword at trentonadams.ca
Mon Mar 1 01:25:05 MST 2010


It's due to line breaks like this...

<br></br>      #Jos 1:16-18; 2Sa 3:36,37; 15:23,30; 18:3; 21:17; 1Ch

<br></br>      12:38|

So, even if I did fix it on the single line, it would miss the second line verses.  I'll look into doing multiline mode tomorrow, and removing the extra <br></br> as it's not needed, because the '|' appears to be the reference ending indicator.

----- "Trenton D. Adams" <trent.jsword at trentonadams.ca> wrote:

> From: "Trenton D. Adams" <trent.jsword at trentonadams.ca>
> To: "Trenton D. Adams" <trent.jsword at trentonadams.ca>, "J-Sword Developers Mailing List" <jsword-devel at crosswire.org>
> Sent: Monday, March 1, 2010 2:18:47 AM GMT -06:00 US/Canada Central
> Subject: Re: [jsword-devel] Nave's Topical Bible Reference linking
>
> Okay, this isn't working on every case.  I think it's due to some book
> names not working with jsword.  I'll look into it, and see if I need
> to do a search/replace on book names for those lines.
> 
> Either way, something worth adding?
> 
> Thanks.
> 
> ----- "Trenton D. Adams" <trent.jsword at trentonadams.ca> wrote:
> 
> > From: "Trenton D. Adams" <trent.jsword at trentonadams.ca>
> > To: "J-Sword Developers Mailing" <jsword-devel at crosswire.org>
> > Sent: Monday, March 1, 2010 1:40:12 AM GMT -06:00 US/Canada Central
> > Subject: [jsword-devel] Nave's Topical Bible Reference linking
> >
> > textPaneBookDataDisplay.refresh()
> > 
> > Under the following line...
> >             String text = XMLUtil.writeToString(htmlsep);
> > 
> > put....
> >             if ("Nave".equals(bmd.getInitials())) {
> >                 text = text.replaceAll("(#)(.+\\|)", "$1<a
> > href=\"bible://{$2}\">$2</a>");
> >             }
> > 
> > 1. The Nave's is pretty much raw text, and the biblical references
> are
> > not marked up as far as I can see.  So, I figured a regex
> replacement
> > with a link was the best way of doing it.
> > 2. Used the convenience method replaceAll() as it's a single call,
> > unless you want to cache a pre-compiled pattern matcher in some
> way?
> > 
> > Any thoughts?  Can we add this?
> > 
> > Thanks.
> > 
> > _______________________________________________
> > jsword-devel mailing list
> > jsword-devel at crosswire.org
> > http://www.crosswire.org/mailman/listinfo/jsword-devel



More information about the jsword-devel mailing list