Closed
Description
When producing the output in HTML mode, doctests are simply interpreted as if they were part of markdown syntax and are replaced by (three) blockquotes.
For instance if you have the following code in a test.py
file:
def f():
'''
>>> f()
2
'''
return 2
Launching pdoc
on that file with pdoc --html test.py
will produce a HTML file where the docstring is replaced by the following code:
<blockquote>
<blockquote>
<blockquote>
<p>f()
2</p>
</blockquote>
</blockquote>
</blockquote>
Therefore the >>>
are removed and the line return is ignored which makes the doctests hardly readable.
Metadata
Metadata
Assignees
Labels
No labels