Skip to content

Commit

Permalink
Fix #7106: std domain: enumerated nodes are marked as duplicated
Browse files Browse the repository at this point in the history
  • Loading branch information
tk0miya committed Feb 7, 2020
1 parent 4198219 commit c7f3f05
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES
Expand Up @@ -83,6 +83,8 @@ Bugs fixed
* #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
* #7106: std domain: enumerated nodes are marked as duplicated when extensions
call ``note_explicit_target()``

Testing
--------
Expand Down
4 changes: 3 additions & 1 deletion sphinx/transforms/__init__.py
Expand Up @@ -173,7 +173,9 @@ def apply(self, **kwargs: Any) -> None:
domain = self.env.get_domain('std') # type: StandardDomain

for node in self.document.traverse(nodes.Element):
if domain.is_enumerable_node(node) and domain.get_numfig_title(node) is not None:
if (domain.is_enumerable_node(node) and
domain.get_numfig_title(node) is not None and
node['ids'] != []):
self.document.note_implicit_target(node)


Expand Down

0 comments on commit c7f3f05

Please sign in to comment.