You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The tables extra currently uses each source row's own cell count. As a result, it
recognizes mismatched header/delimiter rows and emits short or over-wide body rows,
contrary to GFM's table rules.
This introduces shared row splitting, validates the delimiter width, and normalizes
body rows to the header width. The regression fixture covers both mismatch directions,
missing and excess cells, alignment, and multiple outer-pipe forms; make test and make testredos pass.
Sure — three inputs, all with extras=['tables'], showing only the part of the output that changes.
Body row shorter than the header:
| name | quantity | notes |
| --- | ---: | :--- |
| apples | 3 |
master emits three <th> but only two <td>, so the table comes out ragged; with the PR a third <td style="text-align:left;"></td> is padded in.
Body row longer than the header:
item | state
--- | :---:
pear | ripe | ignored
master emits <td>ignored</td> as a third cell that has no <th> above it; with the PR the extra cell is dropped.
Header and delimiter rows of different widths:
| a | b | c |
| --- | --- |
| d | e |
master renders it as a table anyway; with the PR it is not a table and comes out as <p>| a | b | c |…</p>.
I ran the same three inputs through cmarkgfm and all three of the "after" results match it. test/test.py on top of current master: 273 tests, the same 14 [knownfailure] entries as master, nothing new.
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
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.
The
tablesextra currently uses each source row's own cell count. As a result, itrecognizes mismatched header/delimiter rows and emits short or over-wide body rows,
contrary to GFM's table rules.
This introduces shared row splitting, validates the delimiter width, and normalizes
body rows to the header width. The regression fixture covers both mismatch directions,
missing and excess cells, alignment, and multiple outer-pipe forms;
make testandmake testredospass.