Add Fetch from BSB button to admin lesson editor; v1.1.36
Adds a one-click "Fetch from BSB" button in the lesson passage text field that calls the BSB API and overwrites the field with verse-numbered text. Also fixes reference parsing to tolerate leading book abbreviations like t:1-2 or col:1-2 by stripping letters before the chapter:verse pattern. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -18,7 +18,8 @@ const BOLLS_BOOK_MAP = {
|
||||
}
|
||||
|
||||
function parseReference(reference) {
|
||||
const match = reference.match(/^(\d+):(\d+)(?:-(\d+))?$/)
|
||||
const stripped = reference.replace(/^[a-z]+/i, '')
|
||||
const match = stripped.match(/^(\d+):(\d+)(?:-(\d+))?$/)
|
||||
if (!match) return null
|
||||
return {
|
||||
chapter: parseInt(match[1], 10),
|
||||
|
||||
Reference in New Issue
Block a user