Skip to content

Commit

Permalink
Fixed sphinx-doc#1756: Incorrect section titles in search that was in…
Browse files Browse the repository at this point in the history
…troduced from 1.3b3 (PR sphinx-doc#1694)
  • Loading branch information
shimizukawa committed Mar 9, 2015
1 parent 7e9cd93 commit dee83b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Bugs fixed
* #1700: Add ``:caption:`` option for :rst:dir:`toctree`.
* #1742: ``:name:`` option is provided for :rst:dir:`toctree`, :rst:dir:`code-block` and
:rst:dir:`literalinclude` dirctives.
* #1756: Incorrect section titles in search that was introduced from 1.3b3.


Release 1.3b3 (released Feb 24, 2015)
Expand Down
3 changes: 1 addition & 2 deletions sphinx/search/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,7 @@ def get_terms(self, fn2index):

def freeze(self):
"""Create a usable data structure for serializing."""
filenames = sorted(self._titles.keys())
titles = sorted(self._titles.values())
filenames, titles = zip(*sorted(self._titles.items()))
fn2index = dict((f, i) for (i, f) in enumerate(filenames))
terms, title_terms = self.get_terms(fn2index)

Expand Down

0 comments on commit dee83b8

Please sign in to comment.