From 3411dac4b8d366d09f7158e81f284c7f7a77fab2 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Tue, 2 Dec 2025 12:24:34 -0500 Subject: [PATCH] Fix word study sidenote links to use chapter anchors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated link_bible_references() in commentary.py to link to chapter view with anchors instead of dedicated verse pages. This was the third place generating verse links that needed updating. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- kjvstudy_org/routes/commentary.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/kjvstudy_org/routes/commentary.py b/kjvstudy_org/routes/commentary.py index 4579627..b334d5f 100644 --- a/kjvstudy_org/routes/commentary.py +++ b/kjvstudy_org/routes/commentary.py @@ -275,8 +275,11 @@ def link_bible_references(text): # Full matched text (e.g., "Genesis 6:8" or "Romans 5:1-5") full_ref = match.group(0) - # Create the link URL (link to the first verse in the range) - url = f'/book/{book_name}/chapter/{chapter}/verse/{verse_start}' + # Create the link URL using chapter anchor + if verse_end: + url = f'/book/{book_name}/chapter/{chapter}#verse-{verse_start}-{verse_end}' + else: + url = f'/book/{book_name}/chapter/{chapter}#verse-{verse_start}' # Return the linked reference return f'{full_ref}'