Markdown comment disable next line no blank line
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 52.3k
- Forks
- 5k
- Avg merge
- 19h 2m
- Merged PRs (30d)
- 117
Description
Prettier automatically adds a blank line before and after a comment in Markdown.
This behavior is ideal until we use a disable next line directive, such as the one from markdownlint: <!-- markdownlint-disable-next-line -->
The directive must not have any blank lines; otherwise, it is useless.
Prettier 2.8.4
Playground link
Input:
<!-- markdownlint-disable-next-line MD041 -->

Hello World
Output:
<!-- markdownlint-disable-next-line MD041 -->

Hello World
Expected behavior:
Prettier should detect markdownlint-disable-next-line in the comment and prevent inserting a blank line after it.
<!-- markdownlint-disable-next-line MD041 -->

Hello World
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the formatting difference in the linked Prettier Playground using the supplied Markdown input. Done means the markdownlint-disable-next-line comment is followed immediately by the image, without an inserted blank line.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, markdown
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100