mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #80: use string.ascii_* constants in case locale.setlocale() is
somehow called which then leads to UnicodeErrors.
This commit is contained in:
parent
f07d0afef2
commit
8af0caea30
@ -319,7 +319,7 @@ def parse_c_type(node, ctype):
|
|||||||
# add cross-ref nodes for all words
|
# add cross-ref nodes for all words
|
||||||
for part in filter(None, wsplit_re.split(ctype)):
|
for part in filter(None, wsplit_re.split(ctype)):
|
||||||
tnode = nodes.Text(part, part)
|
tnode = nodes.Text(part, part)
|
||||||
if part[0] in string.letters+'_' and part not in stopwords:
|
if part[0] in string.ascii_letters+'_' and part not in stopwords:
|
||||||
pnode = addnodes.pending_xref(
|
pnode = addnodes.pending_xref(
|
||||||
'', reftype='ctype', reftarget=part, modname=None, classname=None)
|
'', reftype='ctype', reftarget=part, modname=None, classname=None)
|
||||||
pnode += tnode
|
pnode += tnode
|
||||||
|
@ -19,7 +19,7 @@ import difflib
|
|||||||
import cPickle as pickle
|
import cPickle as pickle
|
||||||
from os import path
|
from os import path
|
||||||
from glob import glob
|
from glob import glob
|
||||||
from string import uppercase
|
from string import ascii_uppercase as uppercase
|
||||||
from itertools import izip, groupby
|
from itertools import izip, groupby
|
||||||
try:
|
try:
|
||||||
import hashlib
|
import hashlib
|
||||||
|
Loading…
Reference in New Issue
Block a user