-
-
Notifications
You must be signed in to change notification settings - Fork 729
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MD028: Add specific handling of GitHub-style callouts #1331
Comments
As you show, the GitHub parser does not merge consecutive block quotes, so the rationale of MD028 does not apply there. Why not disable the rule? |
Well, that's not true. I use in VSCode the markdownlint extention v0.55.0. The point at which MD028 is violated is marked in yellow. I have a container image with markdownlint 0.41.0, which I use for the demo: $ cat > /tmp/README.md <<EOF
# Title
> [!NOTE]
> NOTE
> [!TIP]
> TIP
EOF
$ docker run --rm --volume /tmp:/tmp docker.io/volkerraschek/markdownlint:0.41.0 /tmp/README.md
/tmp/README.md:5 MD028/no-blanks-blockquote Blank line inside blockquote Sure, I can simply deactivate the rule, but the rule would change the behavior of normal block quotes, too. This is not what I want. The question I am asking myself is, how can a set of rules be implemented that validates the following Markdown as invalid with MD028 for non GitHub-style collouts? $ cat > /tmp/README.md <<EOF
# Title
> [!NOTE]
> NOTE
> [!TIP]
> TIP
Hello
> World
> Foo Bar
EOF
$ docker run --rm --volume /tmp:/tmp docker.io/volkerraschek/markdownlint:0.41.0 /tmp/README.md
/tmp/README.md:12 MD028/no-blanks-blockquote Blank line inside blockquote |
I may not have been clear. What I was pointing out is that GitHub does not seem to merge consecutive block quotes that are separated by an empty line. This appears to be the case whether or not they are callouts. Rule MD028 exists to warn people about the problem of unexpected behavior for parsers that DO merge, but GitHub does not seem to be such a parser and therefore the rule does not seem necessary in that context. I propose that you can disable MD028 for GitHub scenarios regardless of whether callouts are being used. |
Hello everyone,
GitHub has introduced Markdown callouts in the past. These are or have already been adopted by other VCSs - for example by Gitea. In this issue are all callouts as example defined.
If I now write several callouts in a row, this violates the MD028 rule. I understand the rule and would like to keep it, but there should be an exception for a callout.
Example of callout nesting:
Tip
You can use a container image mirror germany - west to increase the download speed.
Warning
Please do not use the latest image, because ...
Please adapt MD028 to allow nested callouts by default or implement a setting to allow it generally.
The text was updated successfully, but these errors were encountered: