jnikula / hawkmoth

Hawkmoth - Sphinx Autodoc for C
https://jnikula.github.io/hawkmoth/
BSD 2-Clause "Simplified" License
74 stars 12 forks source link

javadoc: allow space before parameter direction indication #244

Closed jnikula closed 2 months ago

jnikula commented 2 months ago

Having whitespace between @param and [direction] fails to match the param regex:

@param[in] works @param [in] fails

This is detected but not handled properly, leading to a backtrace about mo.group() being called when mo is None.

Fix the regex and, to an extent, the error handling.

This is just the simplest and quickest fix. There should be better error handling with proper error messages all around, as well as testing.