diff options
| author | Georg Brandl <georg@python.org> | 2014-09-20 19:23:25 +0200 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2014-09-20 19:23:25 +0200 |
| commit | 8273badc0cd40dfd7c82e83f7d85fbd01669b3d5 (patch) | |
| tree | 0dd5e02bea666265db43f5b17050c5346fd48371 /sphinx/domains | |
| parent | 4bf1608073f016866531b3320e0a592e41f3209c (diff) | |
| download | sphinx-8273badc0cd40dfd7c82e83f7d85fbd01669b3d5.tar.gz | |
Add ref context to all "any" references. Should make it possible to resolve them more accurately.
Diffstat (limited to 'sphinx/domains')
| -rw-r--r-- | sphinx/domains/python.py | 2 | ||||
| -rw-r--r-- | sphinx/domains/std.py | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sphinx/domains/python.py b/sphinx/domains/python.py index 79577a0e..3745aab3 100644 --- a/sphinx/domains/python.py +++ b/sphinx/domains/python.py @@ -715,7 +715,7 @@ class PythonDomain(Domain): def resolve_any_xref(self, env, fromdocname, builder, target, node, contnode): - modname = node.get('py:module') # it is not likely we have these + modname = node.get('py:module') clsname = node.get('py:class') results = [] diff --git a/sphinx/domains/std.py b/sphinx/domains/std.py index 4cdd96f2..fe37470f 100644 --- a/sphinx/domains/std.py +++ b/sphinx/domains/std.py @@ -227,7 +227,7 @@ class OptionXRefRole(XRefRole): target = target.strip() elif ' ' in target: program, target = _split_option(target, refnode, env) - refnode['refprogram'] = program + refnode['std:program'] = program return title, target @@ -608,8 +608,8 @@ class StandardDomain(Domain): return make_refnode(builder, fromdocname, docname, labelid, contnode) elif typ == 'option': - if 'refprogram' in node: - progname = node['refprogram'] + if 'std:program' in node: + progname = node['std:program'] elif ' -' in target or ' /' in target: # maybe an "any" directive, split it ourselves progname, target = _split_option(target, node, env) |
