lukeed/tidyPublic

fix: collapse spaces in text

Prettier writes each run of spaces and tabs in text as one space, in
paragraphs, headings, table cells, and link text. It also formats link
text like any other text, so emphasis inside a link changes too. Link
text now goes through the same path, and only the `](...)` part is
copied as written. Image alt text stays as written, as in Prettier.

memchr finds the runs, so plain text costs no copy and little time.
LELuke Edwards authored
6e5e0a5Patch
Parent8bd31e4
3 files changed+73-5
StackedSplit
crates/tidy/markdown.Cargo.toml+1 −0
crates/tidy/src/markdown/writer.rs+51 −5
crates/tidy/tests/markdown.rs+21 −0