[xiphos-source] [crosswire/xiphos] a4e4ab: Fix column regression (#1387)

LAfricain noreply at github.com
Sat Aug 22 10:43:26 EDT 2026


  Branch: refs/heads/master
  Home:   https://github.com/crosswire/xiphos
  Commit: a4e4ab1baf728a50f79ca7b4df34b0eb45c5366e
      https://github.com/crosswire/xiphos/commit/a4e4ab1baf728a50f79ca7b4df34b0eb45c5366e
  Author: L'Africain <fr.cyrille at tiberiade.be>
  Date:   2026-08-22 (Sat, 22 Aug 2026)

  Changed paths:
    M src/main/display.cc

  Log Message:
  -----------
  Fix column regression (#1387)

* Revert introMaterial() div-balancing: fix column layout regression

Two regressions reported after #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 #1385 change
individually (wk_html_sanitize(), the chapter-anchor auto-close, and
this div-balancing) against a pristine pre-#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.

* FIX for italics spilling over into the verse text - Multi-match version. Applies the font-style reset to all occurrences in the rendering block.

---------

Co-authored-by: lafricain79 <lafricain79 at gmail.com>



To unsubscribe from these emails, change your notification settings at https://github.com/crosswire/xiphos/settings/notifications


More information about the xiphos-source mailing list