#167: Make glossary sorting case-independent.

This commit is contained in:
Georg Brandl 2009-06-16 22:08:54 +02:00
parent 8003801e8d
commit 5e927d724d
2 changed files with 3 additions and 1 deletions

View File

@ -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.

View File

@ -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]