lukeed/tidyPublic

fix: keep repeated definitions

pulldown-cmark reports one definition per label, so a repeated one
was dropped from the output. CommonMark ignores it, but it is still
text the author wrote, and Prettier keeps it. Definitions have no
events, so whatever sits in the gap after a sibling block is one;
those gaps are now parsed for the definitions left out.

Definitions are also written before their container ends. A quote
or list item holding only definitions used to close empty, with its
definitions written after it, outside. And a definition always gets
a blank line after a paragraph, which it can't interrupt.
LELuke Edwards authored
17f6525Patch
Parent416d4a3
3 files changed+103-24
StackedSplit
crates/tidy/src/markdown/writer/define.rs+74 −0
crates/tidy/src/markdown/writer/mod.rs+20 −24
crates/tidy/tests/markdown.rs+9 −0