Open RafaelWO opened 8 months ago
Oh that's unfortunate! The renderers/parsers I've previously looked at has happily accepted additional data after the language spec.
notest
are not the only "info" markers - we also use them for fixture injection and continuation blocks (fixture:blah
)
If it doesn't complicate the parsing code we could certainly allow for a separate "comment" syntax, maybe something like:
<!-- pmd-metadata: notest -->
(good to have some sort of indicator that it is metadata.
According to this thread https://stackoverflow.com/questions/4823468/comments-in-markdown there doesn't seem to be an obvious "right" way to do comments in markdown, as some html renderers will actually render these comments as well. Some suggest abusing markdown link syntax instead. Anyway, happy to look at a PR if you can think of a clean way of implementing this :)
(I guess another option for you would be to patch mkdocs-material's parser to not break when looking at code blocks with multiple info fragments)
Hello :)
I've found another solution. The extension PyMdown Superfences for Mkdocs has a special format using braces that can contain any arbitrary parameters: https://facelessuser.github.io/pymdown-extensions/extensions/superfences/#injecting-classes-ids-and-attributes
The only thing to do is to make this library compatible with the brace format and here is the PR: https://github.com/modal-labs/pytest-markdown-docs/pull/26.
Hi,
first of all, thanks for your work on this project! I was really happy when I realized that I could test the code snippets in my docs :)
Unfortunately, I noticed that specifying additional verbs like
notest
in a code fence, e.g.