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:
nmemmert
2026-08-10 10:23:48 -04:00
parent 9e602e29ec
commit 2ba9c9f7f4
4 changed files with 34 additions and 5 deletions
+2 -1
View File
@@ -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),