Commits

Georg Brandl committed 984aeca

#148: Support sorting a limited range of accented characters in the glossary.

Comments (0)

Files changed (2)

 Release 1.0.6 (in development)
 ==============================
 
-* #383: Support sorting a limited range of accented characters
-  in the general index.
+* #383, #148: Support sorting a limited range of accented characters
+  in the general index and the glossary.
 
 * #570: Try decoding ``-D`` and ``-A`` command-line arguments with
   the locale's preferred encoding.

sphinx/domains/std.py

 """
 
 import re
+import unicodedata
 
 from docutils import nodes
 from docutils.parsers.rst import directives
                 li.insert(0, indexnode)
                 items.append((termtext, li))
         if 'sorted' in self.options:
-            items.sort(key=lambda x: x[0].lower())
+            items.sort(key=lambda x: unicodedata.normalize('NFD', x[0].lower()))
         new_dl.extend(item[1] for item in items)
         node.children = [new_dl]
         return [node]