modal-labs / pytest-markdown-docs

Run pytest on markdown code fence blocks
MIT License
57 stars 7 forks source link

Not compatible with `mkdocs`'s admonition #31

Open TiborVoelcker opened 1 month ago

TiborVoelcker commented 1 month ago

A widely used mkdocs plugin is introducing admonitions. I have a lot of code examples in expandable admonitions, like so:

??? quote

    ```python
    x = 1


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 for `markdown_it` which introduces this syntax so it can be parsed correctly. Maybe there could be a configuration option to add plugins to `markdown_it`?
freider commented 4 days ago

Happy to accept contributions for this! :)