lukeed/tidyPublic

fix: wrap like Prettier

Compared with Prettier's `--prose-wrap always`, filling differed in
three ways:

- A reference link's text breaks like other text. Only an inline
  link, whose target follows its text, stays on one line.
- A line may start with inline HTML or an autolink. Only a tag that
  can interrupt a paragraph is kept off the start of a line, by the
  same rules as continuation lines. The first line of a paragraph is
  never left as a lone tag, which would start an HTML block.
- A space beside Chinese or Japanese text never breaks, as in
  Prettier, so the words around it fit or move as one. Korean breaks
  at spaces like Latin text.
LELuke Edwards authored
ae47ed1Patch
Parentb03754d
4 files changed+113-25
StackedSplit
crates/tidy/src/markdown/wrap.rs+78 −22
crates/tidy/src/markdown/writer/inline.rs+5 −1
crates/tidy/src/markdown/writer/mod.rs+2 −2
crates/tidy/tests/markdown.rs+28 −0