mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
#490: Fix cross-references to objects of types added by the :func:~.Sphinx.add_object_type
API function.
This commit is contained in:
parent
8a17f7a84f
commit
a484c6f793
3
CHANGES
3
CHANGES
@ -1,6 +1,9 @@
|
||||
Release 1.0.2 (Aug 05, 2010)
|
||||
============================
|
||||
|
||||
* #490: Fix cross-references to objects of types added by the
|
||||
:func:`~.Sphinx.add_object_type` API function.
|
||||
|
||||
* Allow breaking long signatures, continuing with backlash-escaped
|
||||
newlines.
|
||||
|
||||
|
@ -484,7 +484,13 @@ class StandardDomain(Domain):
|
||||
return make_refnode(builder, fromdocname, docname,
|
||||
labelid, contnode)
|
||||
else:
|
||||
docname, labelid = self.data['objects'].get((typ, target), ('', ''))
|
||||
objtypes = self.objtypes_for_role(typ) or []
|
||||
for objtype in objtypes:
|
||||
if (objtype, target) in self.data['objects']:
|
||||
docname, labelid = self.data['objects'][objtype, target]
|
||||
break
|
||||
else:
|
||||
docname, labelid = '', ''
|
||||
if not docname:
|
||||
if typ == 'term':
|
||||
env.warn(node.get('refdoc', fromdocname),
|
||||
|
@ -166,7 +166,7 @@ HTML_XPATH = {
|
||||
(".//a[@href='#mod.Cls'][@class='reference internal']", ''),
|
||||
(".//dl[@class='userdesc']", ''),
|
||||
(".//dt[@id='userdesc-myobj']", ''),
|
||||
(".//a[@href='#userdesc-myobj']", ''),
|
||||
(".//a[@href='#userdesc-myobj'][@class='reference internal']", ''),
|
||||
# C references
|
||||
(".//span[@class='pre']", 'CFunction()'),
|
||||
(".//a[@href='#Sphinx_DoSomething']", ''),
|
||||
|
Loading…
Reference in New Issue
Block a user