Closed gmarks2149 closed 2 years ago
This PR now also fixes issue #221
Hey @gmarks2149 ! I only just noticed that you submitted a fix for #221 here as well 🤦 Now I also created on in #222 . I'll take a closer look at this tomorrow
LGTM! The fix for #221 is not incompatible with my changes in #222, so we can go ahead with both I think.
Thanks a lot, and looking forward to your PR for #195 🙂
I'm actually interested in working towards a resolution for issue #195. Before I got too far with that I wanted to make sure any changes didn't introduce any regressions so I started looking at the sphinx processor tests. They didn't seem to cover all the possible scenarios so I started looking at adding some tests. In that process I discovered the minor issue fixed here where an extra line was introduced between the Arguments heading and the table of arguments if the the only keywords used in the docstring (or more precisely, if the last keyword used in the docstring) was a param/argument keyword.
If the last keyword processed was an argument keyword, and there was a newline after it, the processor processes the last empty line but the keyword variable is still set to 'Arguments' so it gets added to the Arguments component list instead of the lines list.
My intent is to follow this up with some additional sphinx processor tests. Primary to verify that sample docstrings contain any of the expected variations of the keywords (Ex. arg/argument/parameter which currently aren't tested). After that I hope to submit a potential fix for issue #195.