From dee83b8f5275d99c96a4a97ab6e1db998ead08e2 Mon Sep 17 00:00:00 2001 From: shimizukawa Date: Mon, 9 Mar 2015 21:37:39 +0900 Subject: [PATCH] Fixed #1756: Incorrect section titles in search that was introduced from 1.3b3 (PR #1694) --- CHANGES | 1 + sphinx/search/__init__.py | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 0c66ae2e1..40fde27ab 100644 --- a/CHANGES +++ b/CHANGES @@ -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) diff --git a/sphinx/search/__init__.py b/sphinx/search/__init__.py index 10b125dfb..8126c9aee 100644 --- a/sphinx/search/__init__.py +++ b/sphinx/search/__init__.py @@ -318,8 +318,7 @@ class IndexBuilder(object): 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)