From f8640eadbb3ee7de8584451fc47ab9b1caad4f4b Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Thu, 4 Dec 2025 23:26:36 -0500 Subject: [PATCH] Limit word studies to 1 per verse MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prevents sidenote collision when two word studies appear on the same line, which causes horizontal displacement. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- kjvstudy_org/routes/commentary.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/kjvstudy_org/routes/commentary.py b/kjvstudy_org/routes/commentary.py index eea1e57..2320310 100644 --- a/kjvstudy_org/routes/commentary.py +++ b/kjvstudy_org/routes/commentary.py @@ -430,11 +430,10 @@ def generate_word_study_sidenotes(verse_text, book, chapter, verse_num, shown_wo import random random.seed(f"{book}{chapter}{verse_num}") - # Show 1-2 sidenotes max - # Every 3rd odd verse (1, 7, 13, etc.) gets 2 sidenotes, others get 1 - max_sidenotes = 2 if (verse_num % 6 == 1) else 1 + # Show only 1 sidenote per verse to prevent horizontal collision in margin + max_sidenotes = 1 - # Randomly select which word studies to show from those available + # Randomly select which word study to show from those available selected = random.sample(potential_sidenotes, min(max_sidenotes, len(potential_sidenotes))) return selected