modal-labs / pytest-markdown-docs

Run pytest on markdown code fence blocks
MIT License
46 stars 6 forks source link

Support for mkdocs material #26

Open avandierast opened 5 months ago

avandierast commented 5 months ago

Here is the implementation to support the pymdown superfences brace format.

Issue: https://github.com/modal-labs/pytest-markdown-docs/issues/23

Any comments are welcome :)

avandierast commented 5 months ago

As I am interested in this change I am curious whether you can confirm that this works with mkdocs and the additional attributes don't mess up the classes added to the resulting HTML code?

I'll check that :)

avandierast commented 5 months ago

It seems to work pretty well :)

With the following fence config: {.python continuation .extra-class #id hl_lines="1 3"}. I get this in the HTML code: <div id="id" class="language-python extra-class highlight">.