pydoc-markdown
pydoc-markdown copied to clipboard
Processing enhancement
I do not think that while parsing the docstrin we should be using regex on each line of the docstring. https://github.com/NiklasRosenstein/pydoc-markdown/blob/0b8a85d84d063b5ce9a1fd73d88dda6a199d5583/pydoc-markdown/src/pydoc_markdown/contrib/processors/google.py#L139
Suppose:
Args:
arg1 (int): This is a one liner
arg2 (int): This
takes
multiple
lines
If we split the lines and apply regex then in the following block https://github.com/NiklasRosenstein/pydoc-markdown/blob/0b8a85d84d063b5ce9a1fd73d88dda6a199d5583/pydoc-markdown/src/pydoc_markdown/contrib/processors/google.py#L159 we will not be able to harness the description properly.
We can probably use something else here.
Hey @ariG23498 , it may not be super clean, but it's low effort and I think it works? I've added a test case for a parameter with multiple lines in the description. Please review 1084842
(Note something else is broken in the commit mentioned above but the unittest does pass)
Hey @NiklasRosenstein Here is what I woud really like to see.