scripture-guide 1.0.56 → 1.0.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/scriptures-compiled.js +1 -0
- package/scriptures.js +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "scripture-guide",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.57",
|
|
4
4
|
"description": "A utility for biblical and scripture reference parsing that enables structured queries based on strings of traditional scripture references (e.g. John 3:16). ",
|
|
5
5
|
"main": "scriptures-compiled.js",
|
|
6
6
|
"scripts": {
|
package/scriptures-compiled.js
CHANGED
|
@@ -248,6 +248,7 @@ var handleSingleChapterBookRefs = function handleSingleChapterBookRefs(ref) {
|
|
|
248
248
|
_singleChapterBooks$f2 = _slicedToArray(_singleChapterBooks$f, 1),
|
|
249
249
|
matchingBook = _singleChapterBooks$f2[0];
|
|
250
250
|
if (new RegExp("^".concat(matchingBook, " 1:")).test(ref)) return ref;
|
|
251
|
+
if (new RegExp("^".concat(matchingBook, " 1$")).test(ref)) return ref;
|
|
251
252
|
ref = ref.replace(new RegExp("^".concat(matchingBook, " (\\d+)")), "".concat(matchingBook, " 1:$1"));
|
|
252
253
|
return ref;
|
|
253
254
|
};
|
package/scriptures.js
CHANGED
|
@@ -239,6 +239,7 @@ const handleSingleChapterBookRefs = function(ref) {
|
|
|
239
239
|
const singleChapterBooks = Object.keys(raw_index).filter(book => loadMaxChapter(book) == 1);
|
|
240
240
|
const [matchingBook] = singleChapterBooks.filter(book => ref.match(new RegExp(`^${book} \\d+`)));
|
|
241
241
|
if(new RegExp(`^${matchingBook} 1:`).test(ref)) return ref;
|
|
242
|
+
if(new RegExp(`^${matchingBook} 1$`).test(ref)) return ref;
|
|
242
243
|
ref = ref.replace(new RegExp(`^${matchingBook} (\\d+)`), `${matchingBook} 1:$1`);
|
|
243
244
|
return ref;
|
|
244
245
|
}
|