mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix an AttributeError for strange xref nodes.
This commit is contained in:
parent
6613b64726
commit
d491eda986
@ -1058,7 +1058,8 @@ class LaTeXTranslator(nodes.NodeVisitor):
|
|||||||
# reference to a label
|
# reference to a label
|
||||||
id = uri[1:].replace('#', ':')
|
id = uri[1:].replace('#', ':')
|
||||||
self.body.append(self.hyperlink(id))
|
self.body.append(self.hyperlink(id))
|
||||||
if len(node) and 'std-term' in node[0].get('classes', []):
|
if len(node) and hasattr(node[0], 'attributes') and \
|
||||||
|
'std-term' in node[0].get('classes', []):
|
||||||
# don't add a pageref for glossary terms
|
# don't add a pageref for glossary terms
|
||||||
self.context.append('}')
|
self.context.append('}')
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user