dprint-plugin-markdown icon indicating copy to clipboard operation
dprint-plugin-markdown copied to clipboard

`textWrap: "always"` does not rewrap contents of inline code

Open chriskrycho opened this issue 1 year ago • 0 comments

Describe the bug

When dprint finds inline code crossing a line boundary, it will not rewrap it, even though white space is not meaningful in inline code blocks.

dprint-plugin-markdown version: 0.17.8

Input Code

This is a line with `code
wrap`.
{
  "lineWidth": 20,
  "textWrap": "always"
}

Expected Output

This is a line with
`code wrap`.

Actual Output

This is a line with
`code
wrap`.

Playground

https://dprint.dev/playground/#code/CoCwlgzgBJUIZQDZgHYFMoHcwBcRQAMBjAewBM0AoTAJzgAcCA6IA/config/N4KABGBEA2CWB2BTA6rAJgFwBaQFxgCYAGAGnCg0QA8NkAnAQwAc8oHoB3BgTwGdIQAXxBA/plugin/markdown

chriskrycho avatar Dec 03 '24 17:12 chriskrycho