NiklasRosenstein / pydoc-markdown

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

Google processor does not preserve indentation (breaks nested lists) #320

Open jackgerrits opened 4 months ago

jackgerrits commented 4 months ago

Describe the bug

The Google processor rewrites arguments to include type information. It looks like in order to normalize, indentation is removed. This breaks nested unordered/ordered lists.

https://github.com/NiklasRosenstein/pydoc-markdown/blob/3f20390f0c1bf3d4d26e2d9be86a60bf46ff625d/src/pydoc_markdown/contrib/processors/google.py#L121

For example:

- Test
  - nested

Would be transformed to:

  - Test
  - nested

Expected behavior

Indentation to be preserved.