pybind11_mkdoc icon indicating copy to clipboard operation
pybind11_mkdoc copied to clipboard

Add doxygen command note and fix warning

Open dagnic opened this issue 2 years ago • 0 comments

This PR adds the doxygen @note command and fix the @warning one.

Test docstring:

/**
 * This is a method to test docstring parsing with pybind11-mkdoc
 * @note Test pybind11-mkdoc
 * @warning This method has no implementation
 * @param a     roll angle
 * @param b     value b
 */
void myMethod(int a, int b);

Without the patch:

static const char *__doc_myMethod =
R"doc(This is a method to test docstring parsing with pybind11-mkdoc @note
Test pybind11-mkdoc $.. warning::

This method has no implementation

Parameter ``a``:
    roll angle

Parameter ``b``:
    value b)doc";

With the patch:

static const char *__doc_myMethod =
R"doc(This is a method to test docstring parsing with pybind11-mkdoc

.. note::
    Test pybind11-mkdoc

.. warning::
    This method has no implementation

Parameter ``a``:
    roll angle

Parameter ``b``:
    value b)doc";

Maybe, other commands such as @deprecated, @todo, @code or @since should be fixed also.

dagnic avatar Nov 27 '23 13:11 dagnic