mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Std domain: don't expect "refprogram" attribute on an xref node.
This would lead to an exception if we pass in some generic x-ref node that tries to resolve as an option.
This commit is contained in:
parent
d2b955b7f9
commit
c683bd7504
@ -600,7 +600,7 @@ class StandardDomain(Domain):
|
|||||||
return make_refnode(builder, fromdocname, docname,
|
return make_refnode(builder, fromdocname, docname,
|
||||||
labelid, contnode)
|
labelid, contnode)
|
||||||
elif typ == 'option':
|
elif typ == 'option':
|
||||||
progname = node['refprogram']
|
progname = node.get('refprogram', '')
|
||||||
docname, labelid = self.data['progoptions'].get((progname, target),
|
docname, labelid = self.data['progoptions'].get((progname, target),
|
||||||
('', ''))
|
('', ''))
|
||||||
if not docname:
|
if not docname:
|
||||||
|
Loading…
Reference in New Issue
Block a user