[jsword-devel] Nave's Topical Bible Reference linking
Trenton D. Adams
trent.jsword at trentonadams.ca
Mon Mar 1 01:18:47 MST 2010
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