lukeed/tidyPublic

fix: match Prettier link targets

Prettier writes an inline link's or image's destination and title from
their parsed values: `<>` for an empty destination, `<...>` only where
it holds a space or a `)`, and the title in double quotes, single
quotes when it has more double quotes, or parentheses when it has both.
Definitions get the same treatment on one line with their label's
spaces collapsed, and so do the labels of full references.

Where writing the parsed value back would read differently, the
source stays as written: unbalanced parentheses, `<`, `>`, a
backslash, or text that would decode as an entity. Prettier breaks
some of these.
LELuke Edwards authored
7ff1132Patch
Parentcbdc2fd
3 files changed+183-15
StackedSplit
crates/tidy/src/markdown/writer/inline.rs+94 โˆ’1
crates/tidy/src/markdown/writer/mod.rs+60 โˆ’14
crates/tidy/tests/markdown.rs+29 โˆ’0