How to configure vscode-remark to format admonitions properly? #1035
-
I'm using MkDocs, which supports admonitions using the Python-Markdown admonition extension. The syntax is basically: !!! note
Content However, when I use !!! note
Content This does not render properly (despite an answer from 2018 saying it would). Is there any way to configure the extension such that it preserves the white spaces during formatting? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Admonitions are not part of commonmark, and therefore are not directly supported by remark. It's also worth noting that, if Mkdoc has a bug in their admonitions support, as you suggest. It would probably be good to raise a bug with Mkdoc rather than trying to push other project to add a bug to their markdown to match. |
Beta Was this translation helpful? Give feedback.
-
To this project, it is just a paragraph with superfluous whitespace: alpha
bravo This project removes superfluous whitespace: alpha
bravo That answer has nothing to do with this project. This type of “admonition” is, as Christian mentioned, a custom markdown extension that not a lot of places support. A similar construct, that is more likely to enter markdown in more places, is directives: https://github.com/remarkjs/remark-directive
|
Beta Was this translation helpful? Give feedback.
Admonitions are not part of commonmark, and therefore are not directly supported by remark.
However, a plugin can be used to add support, for example https://github.com/elviswolcott/remark-admonitions or https://github.com/myl7/remark-github-beta-blockquote-admonitions
It's also worth noting that, if Mkdoc has a bug in their admonitions support, as you suggest. It would probably be good to raise a bug with Mkdoc rather than trying to push other project to add a bug to their markdown to match.