Skip to content

Commit

Permalink
Merge pull request #749 from teslabs/use-retval
Browse files Browse the repository at this point in the history
renderer: use retval type for the retval fields
  • Loading branch information
jakobandersen committed Nov 7, 2021
2 parents 6a68560 + b51ad6f commit 199eb2b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions breathe/renderer/sphinxrenderer.py
Expand Up @@ -897,7 +897,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 @@ -2228,7 +2228,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

0 comments on commit 199eb2b

Please sign in to comment.