mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix IndexBuilder.prune() takes docnames as a argument
This commit is contained in:
parent
1f973caf06
commit
8c3ceec294
@ -358,17 +358,17 @@ class IndexBuilder(object):
|
||||
def label(self):
|
||||
return "%s (code: %s)" % (self.lang.language_name, self.lang.lang)
|
||||
|
||||
def prune(self, filenames):
|
||||
"""Remove data for all filenames not in the list."""
|
||||
def prune(self, docnames):
|
||||
"""Remove data for all docnames not in the list."""
|
||||
new_titles = {}
|
||||
for filename in filenames:
|
||||
if filename in self._titles:
|
||||
new_titles[filename] = self._titles[filename]
|
||||
for docname in docnames:
|
||||
if docname in self._titles:
|
||||
new_titles[docname] = self._titles[docname]
|
||||
self._titles = new_titles
|
||||
for wordnames in itervalues(self._mapping):
|
||||
wordnames.intersection_update(filenames)
|
||||
wordnames.intersection_update(docnames)
|
||||
for wordnames in itervalues(self._title_mapping):
|
||||
wordnames.intersection_update(filenames)
|
||||
wordnames.intersection_update(docnames)
|
||||
|
||||
def feed(self, docname, filename, title, doctree):
|
||||
"""Feed a doctree to the index."""
|
||||
|
Loading…
Reference in New Issue
Block a user