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

Trenton D. Adams trent.jsword at trentonadams.ca
Mon Mar 1 00:40:12 MST 2010


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.



More information about the jsword-devel mailing list