mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #5325: latex: cross references has been broken by multiply labeled objects
This commit is contained in:
parent
7065c1cb39
commit
32ba112091
2
CHANGES
2
CHANGES
@ -16,6 +16,8 @@ Features added
|
||||
Bugs fixed
|
||||
----------
|
||||
|
||||
* #5325: latex: cross references has been broken by multiply labeled objects
|
||||
|
||||
Testing
|
||||
--------
|
||||
|
||||
|
@ -1858,8 +1858,11 @@ class LaTeXTranslator(nodes.NodeVisitor):
|
||||
self.body.append(self.hypertarget(id, anchor=anchor))
|
||||
|
||||
# skip if visitor for next node supports hyperlink
|
||||
next_node = node
|
||||
while isinstance(next_node, nodes.target):
|
||||
next_node = next_node.next_node(ascend=True)
|
||||
|
||||
domain = self.builder.env.get_domain('std')
|
||||
next_node = node.next_node(ascend=True)
|
||||
if isinstance(next_node, HYPERLINK_SUPPORT_NODES):
|
||||
return
|
||||
elif domain.get_enumerable_node_type(next_node) and domain.get_numfig_title(next_node):
|
||||
|
Loading…
Reference in New Issue
Block a user