Fix #1601, #2220: 'any' role breaks extended domains behavior. Affected extensions doesn't support resolve_any_xref and resolve_xref returns problematic node instead of None. sphinxcontrib-httpdomain is one of them.

This commit is contained in:
shimizukawa 2016-01-10 23:27:11 +09:00
parent 09b931745d
commit 92ca8d92b3
2 changed files with 4 additions and 1 deletions

View File

@ -47,6 +47,9 @@ Bugs fixed
* #2062: Escape characters in doctests are treated incorrectly with Python 2.
* #2225: Fix if the option does not begin with dash, linking is not performed
* #2226: Fix math is not HTML-encoded when :nowrap: is given (jsmath, mathjax)
* #1601, #2220: 'any' role breaks extended domains behavior. Affected extensions doesn't
support resolve_any_xref and resolve_xref returns problematic node instead of None.
sphinxcontrib-httpdomain is one of them.
Release 1.3.3 (released Dec 2, 2015)
====================================

View File

@ -1655,7 +1655,7 @@ class BuildEnvironment:
for role in domain.roles:
res = domain.resolve_xref(self, refdoc, builder, role, target,
node, contnode)
if res:
if res and isinstance(res[0], nodes.Element):
results.append(('%s:%s' % (domain.name, role), res))
# now, see how many matches we got...
if not results: