lukeed/tidyPublic

fix: keep inline atoms when wrapping

With wrapping on, a line break inside an atom became a space. Inline
HTML can mean something by its line breaks, like a newline inside an
attribute value, and Prettier keeps them, so atoms now keep their
lines as written. A code span over two lines is written from its
parsed value, where the break is one space and the spaces after it
stay, as in Prettier. Filling measures an atom by its last line.
LELuke Edwards authored
9f289a2Patch
Parent9a18314
4 files changed+30-18
StackedSplit
crates/tidy/src/markdown/wrap.rs+12 โˆ’15
crates/tidy/src/markdown/writer/inline.rs+4 โˆ’2
crates/tidy/src/markdown/writer/mod.rs+2 โˆ’1
crates/tidy/tests/markdown.rs+12 โˆ’0