Fix word study sidenote links to use chapter anchors

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 <noreply@anthropic.com>
This commit is contained in:
2025-12-02 12:24:34 -05:00
parent e66112ced2
commit 3411dac4b8
+5 -2
View File
@@ -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'<a href="{url}">{full_ref}</a>'