Repository navigation
fix: order spanner footnotes by column when the spanner id differs from its label - #1103
Merged
rich-iannone merged 2 commits intoNov 6, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1103 +/- ##
=======================================
Coverage 98.70% 98.70%
=======================================
Files 63 63
Lines 12076 12078 +2
=======================================
+ Hits 11920 11922 +2
Misses 156 156 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Summary
Spanner footnotes didn't always follow the left-to-right reading order:
_get_spanner_leftmost_column_index()looked spanners up byspanner_label, but since fix: footnote targeting spanner with differentidcompared tolabel#844 spanner footnotes store the spanner id. When theiddiffered from thelabel, the lookup failed, every spanner was sorted as column 0, and the marks followed the order the footnotes were added in. The lookup now matches onspanner_id._process_footnotes_for_display()builds its own sort key for the footer and treated every spanner footnote as column 0. With symbol or letter marks, the footer could listbbeforea. It now uses the same spanner column as the mark numbering.The tests add footnotes right to left on two spanners and check both the marks and the footer, with matching and different ids, for number and letter marks. A unit test also checks that
_get_spanner_leftmost_column_index()finds a spanner by its id. The new tests fail without the change, and the existing footnote tests still pass.Related GitHub Issues and PRs
idcompared tolabel#844Checklist