mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #7090: std domain: Can't assign numfig-numbers for custom container nodes
This commit is contained in:
parent
67651ab8ec
commit
b1bde4f21e
1
CHANGES
1
CHANGES
@ -78,6 +78,7 @@ Bugs fixed
|
||||
module members without :impoprted-members: option
|
||||
* #6889: autodoc: Trailing comma in ``:members::`` option causes cryptic warning
|
||||
* #7055: linkcheck: redirect is treated as an error
|
||||
* #7090: std domain: Can't assign numfig-numbers for custom container nodes
|
||||
|
||||
Testing
|
||||
--------
|
||||
|
@ -925,11 +925,11 @@ class StandardDomain(Domain):
|
||||
|
||||
if isinstance(node, nodes.section):
|
||||
return 'section'
|
||||
elif isinstance(node, nodes.container):
|
||||
if node.get('literal_block') and has_child(node, nodes.literal_block):
|
||||
elif (isinstance(node, nodes.container) and
|
||||
'literal_block' in node and
|
||||
has_child(node, nodes.literal_block)):
|
||||
# given node is a code-block having caption
|
||||
return 'code-block'
|
||||
else:
|
||||
return None
|
||||
else:
|
||||
figtype, _ = self.enumerable_nodes.get(node.__class__, (None, None))
|
||||
return figtype
|
||||
|
Loading…
Reference in New Issue
Block a user