lukeed/tidyPublic

fix: read front matter at start only

pulldown-cmark's metadata flags take `---`, a line, and `---` as front
matter anywhere, even inside a list item, and mdtidy then wrote it at
the left margin, outside the item. Front matter is now found only at
the very start, with Prettier's rule: `---` or `+++` and an optional
language, closed by the same delimiter, or by `...` for YAML. The rest
of the document is parsed without the metadata flags.
LELuke Edwards authored
89b4e63Patch
Parent387c9c7
6 files changed+94-27
StackedSplit
crates/tidy/src/markdown/front.rs+55 −0
crates/tidy/src/markdown/mod.rs+1 −0
crates/tidy/src/markdown/writer/code.rs+10 −10
crates/tidy/src/markdown/writer/mod.rs+11 −15
crates/tidy/tests/markdown.rs+17 −0
crates/tidy/tests/markdown_semantics.rs+0 −2