aboutsummaryrefslogtreecommitdiff
path: root/doc/tools
diff options
context:
space:
mode:
authorJim Fehrle2021-02-09 16:44:36 -0800
committerJim Fehrle2021-03-04 17:28:37 -0800
commitfb0666d50e1fe95ad2325f4ef2cc9fdd2666ac8a (patch)
tree3abcf04c1c8a5000d52faaaf9d559a51a9292b0b /doc/tools
parenta5bea627d1fe742229497b466ca24b470c20d269 (diff)
Correctly sort the glossary
Diffstat (limited to 'doc/tools')
-rw-r--r--doc/tools/coqrst/coqdomain.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/doc/tools/coqrst/coqdomain.py b/doc/tools/coqrst/coqdomain.py
index fa739e97bc..edb8db1e94 100644
--- a/doc/tools/coqrst/coqdomain.py
+++ b/doc/tools/coqrst/coqdomain.py
@@ -1171,9 +1171,12 @@ class StdGlossaryIndex(Index):
name, localname, shortname = "glossindex", "Glossary", "terms"
def generate(self, docnames=None):
- content = defaultdict(list)
+ def ci_sort(entry):
+ ((type, itemname), (docname, anchor)) = entry
+ return itemname.lower()
- for ((type, itemname), (docname, anchor)) in self.domain.data['objects'].items():
+ content = defaultdict(list)
+ for ((type, itemname), (docname, anchor)) in sorted(self.domain.data['objects'].items(), key=ci_sort):
if type == 'term':
entries = content[itemname[0].lower()]
entries.append([itemname, 0, docname, anchor, '', '', ''])