mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #8076 from tk0miya/6914_wrong_numfig
Fix #6914: figure numbers are unexpectedly assigned to uncaptioned items
This commit is contained in:
1
CHANGES
1
CHANGES
@@ -49,6 +49,7 @@ Bugs fixed
|
||||
singlehtml and so on)
|
||||
* #8239: Failed to refer a token in productionlist if it is indented
|
||||
* #8268: linkcheck: Report HTTP errors when ``linkcheck_anchors`` is ``True``
|
||||
* #6914: figure numbers are unexpectedly assigned to uncaptioned items
|
||||
|
||||
Testing
|
||||
--------
|
||||
|
||||
@@ -224,6 +224,10 @@ class TocTreeCollector(EnvironmentCollector):
|
||||
def get_figtype(node: Node) -> str:
|
||||
for domain in env.domains.values():
|
||||
figtype = domain.get_enumerable_node_type(node)
|
||||
if domain.name == 'std' and not domain.get_numfig_title(node): # type: ignore
|
||||
# Skip if uncaptioned node
|
||||
continue
|
||||
|
||||
if figtype:
|
||||
return figtype
|
||||
|
||||
|
||||
Reference in New Issue
Block a user