Skip to content

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

@chriskrycho

Description

@chriskrycho

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions