NiklasRosenstein / pydoc-markdown

Create Python API documentation in Markdown format.
http://niklasrosenstein.github.io/pydoc-markdown/
Other
458 stars 102 forks source link

fix code blocks indentation in SphinxProcessor #180

Closed igrr closed 3 years ago

igrr commented 3 years ago

Previously, indentation was removed for all lines in docstring, including the code blocks. For example,

with awesome(foo) as aww:
    aww.dostuff()
```
would be converted to:
```
with awesome(foo) as aww:
aww.dostuff()
```

This commit fixes this, preserving the indentation inside code blocks.

Closes https://github.com/NiklasRosenstein/pydoc-markdown/issues/179.
NiklasRosenstein commented 3 years ago

LGTM!