openbibleinfo / Bible-Passage-Reference-Parser

Coffeescript to identify and understand Bible references like "John 3:16."
221 stars 64 forks source link

Abbreviation for "and the following verses" #16

Closed nirski closed 9 years ago

nirski commented 9 years ago

Standard Polish abbrevations should work as follows:

However, when using js/eu/pl_bcv_parser.js both cases get parsed as Matt.1.6-Matt.1.25 (to the end of the chapter).

I guess differentiation would be a sensible compromise:

openbibleinfo commented 9 years ago

Interesting... and if you had "Mt 1,25n", would that resolve to "Matt.1.25-Matt.2.1"? In other words, should it cross chapter (and possibly even book) boundaries)?

nirski commented 9 years ago

This is a valid question. I would say such a case never happens, since you want to cite a coherent passage, and formal entities should map logical parts. But I can imagine citing eg. Mk 8,38n = Mark.8.38-Mark.9.1. So, I would cross chapters and not books.

openbibleinfo commented 9 years ago

I just pushed a fix. Does that work for you as expected? I treat "Gen 1n" as "Gen.1-Gen.2", which I recognize may never happen, but I wanted to do something that at least made sense.

nirski commented 9 years ago

Thank you, that's indeed more than I could have expected! Your test cases are really exhaustive, most of them I have never stumbled upon. The only reason for those abbreviations is when you want to attract sb's attention to read further on the following verse/verses. I wonder if Polish is the only language where single or double "n" (or some other "f" equivalent) is used in such a way.