From 56b88ee5d954d8b209d0b7e3d0f4ae587ae7e84f Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Tue, 25 Nov 2025 20:37:36 -0500 Subject: [PATCH] Add chapter-only reference linking in study guides MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- kjvstudy_org/templates/study_guide_detail.html | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/kjvstudy_org/templates/study_guide_detail.html b/kjvstudy_org/templates/study_guide_detail.html index 98650b9..792917c 100644 --- a/kjvstudy_org/templates/study_guide_detail.html +++ b/kjvstudy_org/templates/study_guide_detail.html @@ -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 '' + match + ''; + }); + if (changed) { const span = document.createElement('span'); span.innerHTML = text;