mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #7496 from jakobandersen/jbab-cpp-east-const-spacing
C++, rebased version of #7489
This commit is contained in:
commit
21ca43719a
1
CHANGES
1
CHANGES
@ -21,6 +21,7 @@ Bugs fixed
|
|||||||
|
|
||||||
* #7461: py domain: fails with IndexError for empty tuple in type annotation
|
* #7461: py domain: fails with IndexError for empty tuple in type annotation
|
||||||
* #7461: autodoc: empty tuple in type annotation is not shown correctly
|
* #7461: autodoc: empty tuple in type annotation is not shown correctly
|
||||||
|
* C++, fix spacing issue in east-const declarations.
|
||||||
|
|
||||||
Testing
|
Testing
|
||||||
--------
|
--------
|
||||||
|
@ -2062,12 +2062,15 @@ class ASTDeclSpecs(ASTBase):
|
|||||||
if self.trailingTypeSpec:
|
if self.trailingTypeSpec:
|
||||||
if addSpace:
|
if addSpace:
|
||||||
signode += nodes.Text(' ')
|
signode += nodes.Text(' ')
|
||||||
|
numChildren = len(signode)
|
||||||
self.trailingTypeSpec.describe_signature(signode, mode, env,
|
self.trailingTypeSpec.describe_signature(signode, mode, env,
|
||||||
symbol=symbol)
|
symbol=symbol)
|
||||||
numChildren = len(signode)
|
addSpace = len(signode) != numChildren
|
||||||
self.rightSpecs.describe_signature(signode)
|
|
||||||
if len(signode) != numChildren:
|
if len(str(self.rightSpecs)) > 0:
|
||||||
signode += nodes.Text(' ')
|
if addSpace:
|
||||||
|
signode += nodes.Text(' ')
|
||||||
|
self.rightSpecs.describe_signature(signode)
|
||||||
|
|
||||||
|
|
||||||
# Declarator
|
# Declarator
|
||||||
|
Loading…
Reference in New Issue
Block a user