Fix column regression - #1387
Merged
Merged
Conversation
added 2 commits
August 22, 2026 08:54
Two regressions reported after crosswire#1385 (Balance chapter HTML and fix intro-material italics leaking into text): 1. Verse alignment anchors (chapter*1000+verse) no longer reliably top-align on navigation with whole-book rendering (e.g. Deu 24:17 landing at page bottom instead of top). 2. Pre-verse heading placement broken relative to text and the end-of-chapter horizontal separator. Both were reproducible specifically with multi-column display (4 columns). Methodically isolated by testing each crosswire#1385 change individually (wk_html_sanitize(), the chapter-anchor auto-close, and this div-balancing) against a pristine pre-crosswire#921 checkout: only the introMaterial() div-balancing reproduced the regression once isolated. The balancing logic force-closed unclosed <div> tags (left open by SWORD's OSIS filter, e.g. a <div type=subSection> whose closing tag never appears in the fetched intro text) right before our own wrapper close. Shifting block-level closing boundaries at that exact spot — right where chapter headers sit — was enough to change where WebKit decides to break columns and how it computes anchor-scroll position in multi-column, whole-book rendering. Reverted to the original single closing </div>. Italics leaking past chapter intro material onto verse text (the original motivation for this code) is addressed separately, at the verse-text level instead of the block-structure level, in a follow-up commit.
…on. Applies the font-style reset to all occurrences in the rendering block.
karlkleinpaste
added a commit
that referenced
this pull request
Aug 25, 2026
This reverts commit a4e4ab1.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix for #1385 regressions.
FIX for italics spilling over into the verse text - Multi-match version. Applies the font-style reset to all occurrences in the rendering block.