mirror of
https://github.com/penpot/penpot.git
synced 2026-10-29 05:50:35 +00:00
Styling a range splits spans at its ends, and nothing joined them back, so a text kept invisible boundaries between spans with equal styles. Two CJK features depend on those boundaries: tate-chu-yoko `all` combines per span, so "2" + "027" rendered as two upright blocks, and a ruby reading or warichu note over a range that crossed a hidden boundary was rejected. `merge-equal-spans` joins neighbouring spans of a paragraph whose styles match, counting a missing attr as its default value. Spans with a reading or a warichu note are never joined: each one is its own group. Both places that split spans use it: `update-text-range-attrs` (plugin API) and `apply-attrs-to-paragraph` (WASM editor styling). AI-assisted-by: claude-opus-5-5