Skip to content

Prettier 3.9.0 started adding blank lines around comments in Markdown lists #19510

Description

@caugner

Prettier v3.9.4
Playground link

--parser markdown

Input:

- Head
<!-- divider -->
- Body
<!-- divider -->
- Foot

Output:

- Head

<!-- divider -->

- Body

<!-- divider -->

- Foot

Expected output:

- Head
<!-- divider -->
- Body
<!-- divider -->
- Foot

Why?

It is not clear why empty lines are added around the comments. As far as I can see, this is not mentioned in the 3.9.0 release notes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    lang:markdownIssues affecting Markdownstatus:needs investigationIssues that need additional investigation, e.g. to understand whether the reported behavior is a bug

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions