qjebbs / vscode-markdown-extended

Extended syntaxes to built-in markdown & What you see is what you get exporter.
MIT License
123 stars 25 forks source link

Remove quotes from admonition titles #123

Closed alkisg closed 2 years ago

alkisg commented 2 years ago

Consider the following markdown code:

!!!tip "Tip title"

    Content

In mkdocs, the quotes are removed, and it displays: Tip title. But vscode-markdown-extended keeps them and displays: "Tip title". When there's nothing inside the quotes though (""), they are completely removed in vscode-markdown-extended as well.

Thank you for your awesome extension!

gimbo commented 2 years ago

Came here to say this.

The python-markdown extensions documentation for admonitions specifies the double-quotes, and doesn't suggest that we should expect it to work without them, AFAICS.

To add to what @alkisg said: if I create some notes using this extension, and include an admonition without double-quotes, it renders OK. But if I then put it through mkdocs (which is specifically called out as the inspiration for admonition support in this plugin), the admonition block isn't rendered. So I have to use double-quotes if I want to use mkdocs — but then it looks ugly when previewed in VSCode.

It would be great to bring the extension into line with the behaviour of the python-markdown admonitions extension... perhaps with a "double quotes strictness" setting, so as not to break anyone's existing notes...? I personally would want "strict" behaviour (i.e. require double quotes but don't render them), but maybe others wouldn't...