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

feature request: markdown-it-container with attributes #126

Open MountComb opened 2 years ago

MountComb commented 2 years ago

This plugin supports markdown-it-container and markdown-it-attrs, but adding attributes to the div container is not supported.

Here is an example:

::: { .admonition .note }
This is a note
:::

This feature is really useful if the document is going to be rendered by pandoc fenced_divs.

Using the render function from https://github.com/arve0/markdown-it-attrs/issues/72#issuecomment-431566521 works, but I am not sure if it will break when markdown-it-attrs is disabled.

frudolph77 commented 2 years ago

Hey,

as a quick fix do this:

::: admonition note
This is a note
:::

container with classes

Regards Frank

frudolph77 commented 2 years ago

I think I've found a solution, which also is aware of a disabled markdown-it-attrs

md-it-container-styles

PR will follow later this weekend.