Skip to content

Conversation

dagnic
Copy link

@dagnic dagnic commented Nov 27, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant