openbibleinfo / Bible-Passage-Reference-Parser

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

osis() for book without verses does not work. #45

Closed cco3 closed 4 years ago

cco3 commented 4 years ago

parser.parse('James').osis() === ''

This is not what I would expect.

alerque commented 4 years ago

There is an option flag you need to pass to the parser when initializing it if you want to catch B references without C or V. If you were only parsing things that you expecting to be references in the first place this default wouldn't make much sense, but it is optimized for finding BCV references in larger bodies of text. Matching bare book names consistently throws up too many false positives to be useful in that context.