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

renderer: use retval type for the retval fields #749

Merged
merged 1 commit into from
Nov 7, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions breathe/renderer/sphinxrenderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@ def pullup(node, typ, dest):
fieldLists = [fieldList]

# collapse retvals into a single return field
if len(fieldLists) != 0:
if len(fieldLists) != 0 and sphinx.version_info[0:2] < (4, 3):
others: nodes.field = []
retvals: nodes.field = []
for f in fieldLists[0]:
Expand Down Expand Up @@ -2211,7 +2211,8 @@ def visit_docparamlist(self, node) -> List[Node]:
"param": "param",
"exception": "throws",
"templateparam": "tparam",
"retval": "returns",
# retval support available on Sphinx >= 4.3
"retval": "returns" if sphinx.version_info[0:2] < (4, 3) else "retval",
}

# https://docutils.sourceforge.io/docs/ref/doctree.html#field-list
Expand Down