lukeed/tidyPublic

fix: start footnotes like Prettier

Prettier keeps a footnote's text on the `[^1]:` line when it is one
paragraph on one line, or one paragraph at all with `wrap: never`.
Otherwise the first block stays there only if it prints as one line
that fits the width; a block that spans lines, holds several blocks,
or is code or a table starts on the next line, indented 4. The
definition reads ahead to its end to decide.

With `wrap: never` and a hard break, Prettier writes the next line
without its indent. That reads the same but worse, so it isn't copied.
LELuke Edwards authored
827f970Patch
Parent7248925
3 files changed+106-1
StackedSplit
crates/tidy/src/markdown/writer/footnote.rs+73 โˆ’0
crates/tidy/src/markdown/writer/mod.rs+9 โˆ’1
crates/tidy/tests/markdown.rs+24 โˆ’0