fix: insert rowspan placeholders in column order - #1949
Open
swimmingbrain wants to merge 2 commits into
Open
swimmingbrain wants to merge 2 commits into
swimmingbrain wants to merge 2 commits into
Conversation
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.
convert_spanswalksactive_rowspansin dict order and callscells.insert(k, None)for each one. The keys arrive in the order the rowspans started, which is not the column order, and every insert shifts whatever sits to its right. Insert a placeholder for a later column first and the next insert pushes it one column further, so the row ends up with a cell under the wrong heading. Sorting the keys keeps every insert to the right of the ones already placed.Smallest table I could get it out of, three rows and four columns:
The last row comes out as
. | B3 | D3 | ., soD3is drawn in the third column, underC1, and the fourth is left empty. With the sort it is. | B3 | . | D3.The new test asserts that row's cells and compares the rendered page. It fails on master with
[None, 'B3', 'D3', None]. Every other table test is untouched, so nothing that renders correctly today changes: 86 pass here, and the only failures intest/tableare the tabula ones, which want a Java runtime I do not have.Closes #1948