lukeed/tidyPublic

fix: join nested lists like Prettier

Inside a list item, Prettier writes a nested list right under the block
before it, unless that block is a paragraph or code and the source had
a blank line. mdtidy followed the source.

Prettier does this even when that blank line is the only thing keeping
the list loose, which then turns tight and drops its paragraphs. The
list survey now records whether each list stays loose without those
lines, and mdtidy only drops one when it does. A blank line after HTML
always stays, since only a blank line ends an HTML block.
LELuke Edwards authored
afa2b68Patch
Parent34fa53d
4 files changed+73-14
StackedSplit
crates/tidy/src/markdown/writer/list.rs+2 −0
crates/tidy/src/markdown/writer/mod.rs+26 −5
crates/tidy/src/markdown/writer/survey.rs+29 −9
crates/tidy/tests/markdown.rs+16 −0