NiklasRosenstein / pydoc-markdown

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

codeblocks rendering #169

Closed ariG23498 closed 1 year ago

ariG23498 commented 3 years ago

In the conditional, the parser took for granted that the codeblock did not have any indentation. This made indented codeblocks to be overlooked. This caused problem with the generation of documentation.

I have added a simple .strip in the checking scheme itself so that the codeblocks are always triggered.

NiklasRosenstein commented 3 years ago

Hey @ariG23498 , thanks! Could you add a unit test? Also I think the PydocmdProcessor and SphinxProcessor could use the same change. 😅 If you have any ideas how to avoid replicating that bit of code across the three preprocessors, I'm open to suggestions.

Cheers

ariG23498 commented 3 years ago

Hey @NiklasRosenstein I made a unit test for the PR Feel free to review.

I think I need to look into the enhancement part for the other processors. But if I come up with something will definitely let you know. Cheers!