-
Notifications
You must be signed in to change notification settings - Fork 7
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
Not compatible with mkdocs
's admonition
#31
Comments
Happy to accept contributions for this! :) |
I gathered some information about this. Note that I did not test any of this yet. The plugins can be added like this with the example of the admonition: from markdown_it import MarkdownIt
from mdit_py_plugins.admon import admon_plugin
from mdit_py_plugins import plugin1, plugin2
md = MarkdownIt().use(admon_plugin) This would need to be added to
Then there is the question regarding the configuration which plugins should be loaded. As this is a pytest plugin, the possibilities are quite restricted. Things get even more complicated, as some md plugins have parameters that can be specified at initialization. Not sure how to handle this. Another idea would be to just use ALL plugins, but this does not sound like a good idea. |
I sadly don't have the time to try some things out or even make a PR. But I wanted to add the information I gathered if someone else wants to take a look. Or maybe even future me. |
A widely used
mkdocs
plugin is introducing admonitions. I have a lot of code examples in expandable admonitions, like so:Using this syntax, the code blocks are not tested.
I believe this is because
markdown_it
does not recognize it. There should be a plugin available formarkdown_it
which introduces this syntax so it can be parsed correctly. Maybe there could be a configuration option to add plugins tomarkdown_it
?The text was updated successfully, but these errors were encountered: