Skip to content

Breaks markdown documents containing whitespace-only literal string content #163

@jimmy-zhening-luo

Description

@jimmy-zhening-luo

Describe the bug

It is invalid to trim spaces between inline code backticks when the content of the backticks is exclusively spaces, as it changes the AST of the document.

As a separate matter, in my opinion one should never trim spaces between inline code backticks.

dprint-plugin-markdown version: 0.20.0

Input Code

Optionally, a delimiter char may be provided. By default, the parser uses a delimiter char of `SPACE` (`U+0020`), literally ` `.

Expected Output

Optionally, a delimiter char may be provided. By default, the parser uses a delimiter char of `SPACE` (`U+0020`), literally ` `.

Actual Output

Optionally, a delimiter char may be provided. By default, the parser uses a delimiter char of `SPACE` (`U+0020`), literally ``.

The above breaks the document in unexpected ways by asymmetrically changing the AST of the document.

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