Closes #805: Make the `Sphinx.add_index_to_domain` method work correctly.

This commit is contained in:
Georg Brandl 2011-11-01 08:59:53 +01:00
parent 04cdfd83eb
commit ddb7fab16d
2 changed files with 13 additions and 9 deletions

17
CHANGES
View File

@ -1,3 +1,11 @@
Release 1.1.1 (in development)
==============================
* #805: Make the ``Sphinx.add_index_to_domain`` method work correctly.
* #780: Fix Python 2.5 compatibility.
Release 1.1 (Oct 9, 2011)
=========================
@ -115,13 +123,10 @@ Features added
- #714: Added Korean locale.
- #766: Added Estonian locale.
* Bugs fixed:
Release 1.0.9 (in development)
==============================
* #778: Fix "hide search matches" link on pages linked by search.
* Fix the source positions referenced by the "viewcode" extension.
- #778: Fix "hide search matches" link on pages linked by search.
- Fix the source positions referenced by the "viewcode" extension.
Release 1.0.8 (Sep 23, 2011)

View File

@ -425,11 +425,10 @@ class Sphinx(object):
raise ExtensionError('domain %s not yet registered' % domain)
self.domains[domain].roles[name] = role
def add_index_to_domain(self, domain, name, localname, shortname, func):
def add_index_to_domain(self, domain, index):
if domain not in self.domains:
raise ExtensionError('domain %s not yet registered' % domain)
self.domains[domain].indices.append((name, localname, shortname))
setattr(self.domains[domain], 'get_%s_index' % name, func)
self.domains[domain].indices.append(index)
def add_object_type(self, directivename, rolename, indextemplate='',
parse_node=None, ref_nodeclass=None, objname='',