mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #3183: Randomized jump box order in generated index page.
This commit is contained in:
parent
5fc8d3db91
commit
4054b0b3a5
2
CHANGES
2
CHANGES
@ -23,7 +23,7 @@ Bugs fixed
|
||||
* #3228: ``build_sphinx`` command crashes when missing dependency
|
||||
* #2469: Ignore updates of catalog files for gettext builder. Thanks to
|
||||
Hiroshi Ohkubo.
|
||||
|
||||
* #3183: Randomized jump box order in generated index page.
|
||||
|
||||
Release 1.5 (released Dec 5, 2016)
|
||||
==================================
|
||||
|
@ -115,7 +115,11 @@ class IndexEntries(EnvironmentManager):
|
||||
# sort the index entries; put all symbols at the front, even those
|
||||
# following the letters in ASCII, this is where the chr(127) comes from
|
||||
def keyfunc(entry, lcletters=string.ascii_lowercase + '_'):
|
||||
lckey = unicodedata.normalize('NFD', entry[0].lower())
|
||||
key, (void, void, category_key) = entry
|
||||
if category_key:
|
||||
# using specified category key to sort
|
||||
key = category_key
|
||||
lckey = unicodedata.normalize('NFD', key.lower())
|
||||
if lckey[0:1] in lcletters:
|
||||
lckey = chr(127) + lckey
|
||||
# ensure a determinstic order *within* letters by also sorting on
|
||||
|
Loading…
Reference in New Issue
Block a user