[GH-ISSUE #1419] Allow Consecutive GitHub Alerts #680

Closed
opened 2026-03-03 01:29:00 +03:00 by kerem · 1 comment
Owner

Originally created by @gabeseltzer on GitHub (Nov 15, 2024).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1419

GitHub uses the following syntax for "Alerts":

> [!NOTE]
> Useful information that users should know, even when skimming content.

If you put two alerts consecutively like this, you get a warning about: MD028/no-blanks-blockquote: Blank line inside blockquote

> [!NOTE]
> my first note.

> [!NOTE]
> A second, consecutive note...

Can we change the parsing for the rule so that it recognizes the kinds of alerts and allows spaces between them?

Originally created by @gabeseltzer on GitHub (Nov 15, 2024). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1419 GitHub uses the following syntax for ["Alerts"](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#alerts): ```markdown > [!NOTE] > Useful information that users should know, even when skimming content. ``` If you put two alerts consecutively like this, you get a warning about: `MD028/no-blanks-blockquote: Blank line inside blockquote` ```markdown > [!NOTE] > my first note. > [!NOTE] > A second, consecutive note... ``` Can we change the parsing for the rule so that it recognizes the kinds of alerts and allows spaces between them?
kerem 2026-03-03 01:29:00 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@DavidAnson commented on GitHub (Nov 16, 2024):

The rule documentation explains that this scenario is reported as a violation because some parsers combine consecutive blockquotes into one. That is not what the CommonMark specification says to do and it's not what GitHub does for blockquotes, but it can be a problem. I don't think this situation is unique to GitHub Alerts and I'd recommend disabling the rule if you're only authoring for GitHub.

https://github.com/DavidAnson/markdownlint/blob/main/doc/md028.md

<!-- gh-comment-id:2480414654 --> @DavidAnson commented on GitHub (Nov 16, 2024): The rule documentation explains that this scenario is reported as a violation because some parsers combine consecutive blockquotes into one. That is not what the CommonMark specification says to do and it's not what GitHub does for blockquotes, but it can be a problem. I don't think this situation is unique to GitHub Alerts and I'd recommend disabling the rule if you're only authoring for GitHub. https://github.com/DavidAnson/markdownlint/blob/main/doc/md028.md
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/markdownlint#680
No description provided.