Closed nbanyan closed 1 month ago
Hi @nbanyan, thanks for the request. If I understand correctly, you're using Griffe through MkDocs and mkdocstrings-python. MkDocs expects Markdown, so we won't add any kind of support for reStructuredText markup. I recommend you convert your docstrings to Markdown, or write a Python-Markdown extension that converts rST to Markdown on the fly 🙂
Requested Feature
Rendering of Sphinx code block directives
code
,sourcecode
, andcode-block
.Currently, directives are processed directly as markdown, which can cause cross-reference error messages for docstrings like this.
Proposed Solution
Detect code directives and convert them to Markdown fenced code blocks when rendering for MkDocs.
The above example would become: