mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
#167: Make glossary sorting case-independent.
This commit is contained in:
parent
8003801e8d
commit
5e927d724d
2
CHANGES
2
CHANGES
@ -1,6 +1,8 @@
|
|||||||
Release 0.6.2 (in development)
|
Release 0.6.2 (in development)
|
||||||
==============================
|
==============================
|
||||||
|
|
||||||
|
* #167: Make glossary sorting case-independent.
|
||||||
|
|
||||||
* #196: Add a warning if an extension module doesn't have a
|
* #196: Add a warning if an extension module doesn't have a
|
||||||
``setup()`` function.
|
``setup()`` function.
|
||||||
|
|
||||||
|
@ -449,7 +449,7 @@ class Glossary(Directive):
|
|||||||
li.insert(0, indexnode)
|
li.insert(0, indexnode)
|
||||||
items.append((termtext, li))
|
items.append((termtext, li))
|
||||||
if 'sorted' in self.options:
|
if 'sorted' in self.options:
|
||||||
items.sort()
|
items.sort(key=lambda x: x[0].lower())
|
||||||
new_dl.extend(item[1] for item in items)
|
new_dl.extend(item[1] for item in items)
|
||||||
node.children = [new_dl]
|
node.children = [new_dl]
|
||||||
return [node]
|
return [node]
|
||||||
|
Loading…
Reference in New Issue
Block a user