Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

textWrap: "always" does not rewrap contents of inline code #129

Open
chriskrycho opened this issue Dec 3, 2024 · 0 comments · May be fixed by #130
Open

textWrap: "always" does not rewrap contents of inline code #129

chriskrycho opened this issue Dec 3, 2024 · 0 comments · May be fixed by #130

Comments

@chriskrycho
Copy link

chriskrycho commented Dec 3, 2024

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 chriskrycho linked a pull request Dec 3, 2024 that will close this issue
chriskrycho added a commit to rust-lang/book that referenced this issue Dec 5, 2024
Correctly applies line wrapping to inline code blocks. See [the
issue][129] and [fix PR][fix] for more details.

[issue]: dprint/dprint-plugin-markdown#129
[fix]: dprint/dprint-plugin-markdown#130
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant