openbibleinfo / Bible-Passage-Reference-Parser

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

Issue with One-Chapter-Only Books, Verse 1 #47

Closed martinmts closed 3 years ago

martinmts commented 3 years ago

Hi,

Thanks for making the great project.

For books that have only one chapter (Obad, Phlm, 1-3 John, and Jude), a reference such as Obad 1 is meant to be the first verse of Obad. But the current parser takes it as the entire book of Obad. Can this issued be addressed?

(I saw that the project has not been updated in the past years and there are quite a few forks. Is any fork being actively maintained?)

Thanks!

openbibleinfo commented 3 years ago

Hello, this behavior is intentional because, in a Bible search application, people don't necessarily understand that there's no chapter number in single-chapter books. However, you're right that what you're looking for is technically correct.

You can achieve the behavior you want with the "single_chapter_1_strategy": "verse" option. See https://github.com/openbibleinfo/Bible-Passage-Reference-Parser#potentially-invalid-input for details.