lukeed/tidyPublic

fix: keep each table row's cells

A row with fewer cells than the header got empty cells that
pulldown-cmark makes up, and a row with more lost the extra ones,
which GFM ignores and pulldown-cmark drops. Prettier writes each row
with the cells it was written with, so mdtidy now does too: made-up
cells sit empty at the row's end and are skipped, and the text after
the last cell is split on unescaped pipes. A `|` inside a code span
splits a cell in GFM, so it can leave such extra cells.
LELuke Edwards authored
85c957dPatch
Parent9f289a2
3 files changed+100-20
StackedSplit
crates/tidy/src/markdown/table.rs+80 −16
crates/tidy/src/markdown/writer/mod.rs+9 −4
crates/tidy/tests/markdown.rs+11 −0