File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -46,9 +46,9 @@ def unicode_to_ascii(root_directory):
46
46
47
47
for root , dirnames , filenames in os .walk (root_directory ):
48
48
for filename in filenames :
49
- if (not filename .endswith ('.py ' ) and
50
- not filename .endswith ('.bib' ) and
51
- not filename .endswith ('.rst' )):
49
+ if (not filename .endswith ('.tex ' ) and not filename . endswith ( '.py' )
50
+ and not filename .endswith ('.bib' )
51
+ and not filename .endswith ('.rst' )):
52
52
continue
53
53
54
54
if filename == 'unicode_to_ascii.py' :
@@ -62,8 +62,7 @@ def unicode_to_ascii(root_directory):
62
62
for key , value in SUBSTITUTIONS .items ():
63
63
content = content .replace (key , value )
64
64
65
- content = unicodedata .normalize ('NFD' , content ).encode (
66
- 'ascii' , 'ignore' )
65
+ content = unicodedata .normalize ('NFD' , content )
67
66
68
67
file_handle .write (content )
69
68
You can’t perform that action at this time.
0 commit comments