Fix Scripture Index doubled/unparseable refs, Titus passage fetch 400, Ko-fi QR 404, auto-load study comments; stop probe URLs inflating Real Hits, real 404 status for unknown URLs; v2.43.1
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
09177f47ed
commit
6a5d525d6e
10 files changed
+59
-10
No files matched your search
@@ -29,7 +29,12 @@ BIBLE_BOOKS.forEach((b, index) => {
|
||||
})
|
||||
|
||||
function parseReference(reference) {
|
||||
const stripped = reference.replace(/^[a-z]+/i, '')
|
||||
// Accept a leading book name ("Titus 1:1-2", "1 John 2:3"), en/em dashes and verse-part letters ("1:13a")
|
||||
const stripped = reference
|
||||
.replace(/[–—]/g, '-')
|
||||
.replace(/(\d)[a-z]\b/gi, '$1')
|
||||
.replace(/^\s*(?:[1-3]\s*)?[a-z][a-z .]*?\s*(?=\d+:)/i, '')
|
||||
.trim()
|
||||
const match = stripped.match(/^(\d+):(\d+)(?:-(\d+))?$/)
|
||||
if (!match) return null
|
||||
return {
|
||||
|
||||
Reference in new issue
Block a user