mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
refs #1742: use implicit target name for figure directive's permalink.
This commit is contained in:
parent
09d3d6b36d
commit
28e1b1996d
@ -333,7 +333,8 @@ class HTMLTranslator(BaseTranslator):
|
||||
if isinstance(node.parent, nodes.container) and node.parent.get('literal_block'):
|
||||
self.add_permalink_ref(node.parent, _('Permalink to this code'))
|
||||
elif isinstance(node.parent, nodes.figure):
|
||||
self.add_permalink_ref(node.parent, _('Permalink to this image'))
|
||||
self.add_permalink_ref(
|
||||
node.parent.traverse(nodes.image)[0], _('Permalink to this image'))
|
||||
elif node.parent.get('toctree'):
|
||||
self.add_permalink_ref(node.parent.parent, _('Permalink to this toctree'))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user