Add chapter-only reference linking in study guides

Links like "Psalm 2" and "Psalm 45" now link to chapter pages.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-25 20:37:36 -05:00
parent d6e190ddce
commit 56b88ee5d9
@@ -100,6 +100,13 @@ document.addEventListener('DOMContentLoaded', function() {
}
});
// Handle chapter-only references like "Psalm 2" or "Genesis 1"
// Must come after verse references to avoid double-matching
text = text.replace(/\b(Psalm|Genesis|Exodus|Isaiah|Daniel|Revelation|Matthew|Mark|Luke|John|Romans|Hebrews|Proverbs|Ecclesiastes|Job)\s+(\d+)\b(?!:)/g, function(match, book, chapter) {
changed = true;
return '<a href="/book/' + book + '/chapter/' + chapter + '">' + match + '</a>';
});
if (changed) {
const span = document.createElement('span');
span.innerHTML = text;