Closed Hocnonsense closed 1 month ago
Thanks for this usefull software!
Is your feature request related to a problem? Please describe.
I'm using pydoc-markdown to generate markdown files. However, all things in docstring will be write to markdown almost as-is, and when there is a function:
def iter_rsplit(s: str, sep=";"): """ >>> list(iter_rsplit("a;b;c;d;e;f;g", ";")) ['a;b;c;d;e;f;g', 'a;b;c;d;e;f', 'a;b;c;d;e', 'a;b;c;d', 'a;b;c', 'a;b', 'a'] """ ...
It will translate to:
<a id="taxon.iter_rsplit"></a> #### iter\_rsplit \```python def iter_rsplit(s: str, sep=";") \``` >>> list(iter_rsplit("a;b;c;d;e;f;g", ";")) ['a;b;c;d;e;f;g', 'a;b;c;d;e;f', 'a;b;c;d;e', 'a;b;c;d', 'a;b;c', 'a;b', 'a']
and render as:
def iter_rsplit(s: str, sep=";")
list(iter_rsplit("a;b;c;d;e;f;g", ";")) ['a;b;c;d;e;f;g', 'a;b;c;d;e;f', 'a;b;c;d;e', 'a;b;c;d', 'a;b;c', 'a;b', 'a']
However, it is not a clear way to view it
Describe the solution you'd like
I would like pydoc-markdown find >>> in docstring and render like this:
>>>
<a id="taxon.iter_rsplit"></a> #### iter\_rsplit \```python def iter_rsplit(s: str, sep=";") \``` example: \```python >>> list(iter_rsplit("a;b;c;d;e;f;g", ";")) ['a;b;c;d;e;f;g', 'a;b;c;d;e;f', 'a;b;c;d;e', 'a;b;c;d', 'a;b;c', 'a;b', 'a'] \```
Additional context
All backslashes preceding backquotes within code blocks solely serve to prevent Markdown formatting issues.
Thanks for this usefull software!
Is your feature request related to a problem? Please describe.
I'm using pydoc-markdown to generate markdown files. However, all things in docstring will be write to markdown almost as-is, and when there is a function:
It will translate to:
and render as:
iter_rsplit
However, it is not a clear way to view it
Describe the solution you'd like
I would like pydoc-markdown find
>>>
in docstring and render like this:Additional context
All backslashes preceding backquotes within code blocks solely serve to prevent Markdown formatting issues.