Merge pull request #7714 from tk0miya/7701_anonymous_indirect_target

Fix #7701: LaTeX: Anonymous indirect target causes duplicated labels
This commit is contained in:
Takeshi KOMIYA 2020-05-30 01:40:03 +09:00 committed by GitHub
commit 339e3a9f3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -124,6 +124,7 @@ Bugs fixed
* #7610: incorrectly renders consecutive backslashes for docutils-0.16 * #7610: incorrectly renders consecutive backslashes for docutils-0.16
* #7646: handle errors on event handlers * #7646: handle errors on event handlers
* #4187: LaTeX: EN DASH disappears from PDF bookmarks in Japanese documents * #4187: LaTeX: EN DASH disappears from PDF bookmarks in Japanese documents
* #7701: LaTeX: Anonymous indirect hyperlink target causes duplicated labels
* C++, fix rendering and xrefs in nested names explicitly starting * C++, fix rendering and xrefs in nested names explicitly starting
in global scope, e.g., ``::A::B``. in global scope, e.g., ``::A::B``.
* C, fix rendering and xrefs in nested names explicitly starting * C, fix rendering and xrefs in nested names explicitly starting

View File

@ -1431,6 +1431,8 @@ class LaTeXTranslator(SphinxTranslator):
if 'refuri' in node: if 'refuri' in node:
return return
if 'anonymous' in node:
return
if node.get('refid'): if node.get('refid'):
prev_node = get_prev_node(node) prev_node = get_prev_node(node)
if isinstance(prev_node, nodes.reference) and node['refid'] == prev_node['refid']: if isinstance(prev_node, nodes.reference) and node['refid'] == prev_node['refid']: