Fix C++ multiline signatures

Fixes sphinx-doc/sphinx#3877
This commit is contained in:
Jakob Lykke Andersen
2017-08-31 17:01:58 +02:00
parent 29b1d2f906
commit ff06cb837b
2 changed files with 6 additions and 2 deletions

View File

@@ -25,6 +25,7 @@ Bugs fixed
* #3960: default_role = 'guilabel' not functioning
* Missing ``texinputs_win/Makefile`` to be used in latexpdf builder on windows.
* #4026: nature: Fix macOS Safari scrollbar color
* #3877: Fix for C++ multiline signatures.
Testing
--------

View File

@@ -4582,8 +4582,11 @@ class CPPObject(ObjectDescription):
if ast.objectType == 'enumerator':
self._add_enumerator_to_parent(ast)
self.options['tparam-line-spec'] = 'tparam-line-spec' in self.options
self.describe_signature(signode, ast, self.options)
# note: handle_signature may be called multiple time per directive,
# if it has multiple signatures, so don't mess with the original options.
options = dict(self.options)
options['tparam-line-spec'] = 'tparam-line-spec' in self.options
self.describe_signature(signode, ast, options)
return ast
def before_content(self):