lukeed/tidyPublic

fix: keep Liquid tags as written

Prettier keeps the inside of a `{{ ... }}` or `{% ... %}` as written,
even when it spans lines or paragraphs. mdtidy collapsed its spaces
and dropped the indent of its lines. While a tag is open, its text is
now copied as written, and at the top level its lines keep their
indent. A tag only counts as open if its closer comes later, as in
Prettier; the search for it remembers where it stopped, so each file
is scanned once.
LELuke Edwards authored
46fea15Patch
Parent70050cf
3 files changed+84-4
StackedSplit
crates/tidy/src/markdown/writer/liquid.rs+62 −1
crates/tidy/src/markdown/writer/mod.rs+12 −3
crates/tidy/tests/markdown.rs+10 −0