Repository navigation
Count the columns of a table by the colspans of its cells - #300
Merged
Merged
Conversation
eXpl0it3r
force-pushed
the
fix/table-colspan-column-count
branch
from
November 23, 2026 15:58
5aeb277 to
9814efd
Compare
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.
Description
The column count of a table without
colelements was the highest number of cells in a row, so a row whose colspans add up to more columns indexed past the column widths and the whole table layout failed with anIndexOutOfRangeException. The count is the sum of the colspans now, as in HTML 4.9.12.1.This also fixes gaps in two manifests:
Spec/html.yml: the testsColspan_AddsColumnsandCellSpanningPastTheOtherRows_IsLaidOutlose their[Ignore]Spec/css-tables-3.yml: colspan adds columns in 3.3.1, and a colspan past the column count no longer breaks the layout in 3.3.2, only the track merging remains a gap thereThe table from #47 with this PR, with "1 187" under the second "Test":
Note that "8 570" wrapping is a separate issue, already tracked in
Spec/css-tables-3.yml: columns that only spanning cells cover don't get enough of the spanning cell's width.Closes #47
How to test this PR?
CI should succeed, the image baselines are unchanged.