mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #5332 from tk0miya/5325_latex_broken_xref
Fix #5325: latex: cross references has been broken by multiply labeled objects
This commit is contained in:
commit
e7e1ffe6dc
1
CHANGES
1
CHANGES
@ -17,6 +17,7 @@ Bugs fixed
|
||||
----------
|
||||
|
||||
* html: search box overrides to other elements if scrolled
|
||||
* #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