From 5e927d724dbe3650356c50f5fb44c85ba7ac9aab Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Tue, 16 Jun 2009 22:08:54 +0200 Subject: [PATCH] #167: Make glossary sorting case-independent. --- CHANGES | 2 ++ sphinx/directives/other.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 069b3ce53..b7168ed82 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,8 @@ Release 0.6.2 (in development) ============================== +* #167: Make glossary sorting case-independent. + * #196: Add a warning if an extension module doesn't have a ``setup()`` function. diff --git a/sphinx/directives/other.py b/sphinx/directives/other.py index 80c88f5fd..4ca09ddc5 100644 --- a/sphinx/directives/other.py +++ b/sphinx/directives/other.py @@ -449,7 +449,7 @@ class Glossary(Directive): li.insert(0, indexnode) items.append((termtext, li)) if 'sorted' in self.options: - items.sort() + items.sort(key=lambda x: x[0].lower()) new_dl.extend(item[1] for item in items) node.children = [new_dl] return [node]