renehamburger / blinx.js

A multi-language client-side script to automatically convert Bible references to Bible links with a passage pop-up
MIT License
18 stars 6 forks source link

Improvements to handling of partial references #27

Open renehamburger opened 6 years ago

renehamburger commented 6 years ago

Partial references should not trump later complete references

In the following text, the second partial reference takes its context not from the preceeding (complete) reference, but the partial one before that:

Verse 14–15 (vgl. 2. Mose 20,1–3) ... in den Versen 16–20?

(EDIT: This was probably due to a provided context, so works as expected.)

This seems to be the opposite problem of the previous: Partial references with contexts should also be used to provide the context for following partial references:

In <bx context="Rev 21">verse 3</bx> (similar to 1 Peter 1:4) and in verse 4...

Introduce bx-aside

A very common scenario is a longer section about one passage, which has brief references to other books or chapters, e.g. in brackets. At the moment, each one of them changes the context for the following partial references. It would be great to be able to create a separate parsing-context with a tag like <bx-aside> (or even just <bx>) to prevent those references from changing the context for the following partial references.