mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Force index entries to be unicode to fix problems with unicode normalization
This commit is contained in:
parent
68820c94f4
commit
b048ea1edf
@ -1489,6 +1489,10 @@ class BuildEnvironment:
|
|||||||
new = {}
|
new = {}
|
||||||
|
|
||||||
def add_entry(word, subword, link=True, dic=new):
|
def add_entry(word, subword, link=True, dic=new):
|
||||||
|
# Force the word to be unicode if it's a ASCII bytestring.
|
||||||
|
# This will solve problems with unicode normalization later.
|
||||||
|
# For instance the RFC role will add bytestrings at the moment
|
||||||
|
word = unicode(word)
|
||||||
entry = dic.get(word)
|
entry = dic.get(word)
|
||||||
if not entry:
|
if not entry:
|
||||||
dic[word] = entry = [[], {}]
|
dic[word] = entry = [[], {}]
|
||||||
|
Loading…
Reference in New Issue
Block a user