Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix retval rendering #687

Merged
merged 1 commit into from
May 2, 2021
Merged

Conversation

jakobandersen
Copy link
Collaborator

Doxygen has both \returns desc and \retval arg desc which is converted to the equivalent of :returns: desc and :returns arg: desc. As noted in #683 (comment), all the build-in Sphinx domains assumes the returns field to have no argument, both it still handles them. Except, it must apparently be a single docutils node. This PR makes it that.

Example for reproduction:
test.hpp

/*! Something myFunction short.
 *
 * Something myFunction long.
 *
 * @retval "Discovery status" - The discovery status
 * @retval MAX_EVENTS         - The pointer
 * @return ReturnDesc
 */
void myFunction();

index.rst:

.. doxygenfunction:: myFunction

.. cpp:function:: void f()

	:returns: something
	:returns arg: somethingElse

Fixes #684.

@vermeeren vermeeren self-requested a review May 2, 2021 00:22
@vermeeren vermeeren self-assigned this May 2, 2021
@vermeeren vermeeren added bug Problem in existing code code Source code regression Something broke that worked in the past labels May 2, 2021
Copy link
Collaborator

@vermeeren vermeeren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jakobandersen Nice one, thanks!

@michaeljones michaeljones merged commit 132eed2 into breathe-doc:master May 2, 2021
michaeljones pushed a commit that referenced this pull request May 2, 2021
@jakobandersen jakobandersen deleted the fix_retval branch May 2, 2021 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Problem in existing code code Source code regression Something broke that worked in the past
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Doxygen retval comment output different in 4.28 and 4.29
3 participants