We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ab3d92 commit 77d3d0eCopy full SHA for 77d3d0e
doc/jekyll_fix.py
@@ -29,6 +29,7 @@
29
}
30
REWRITE_EXTENSIONS = set(['.html', '.js'])
31
32
+from io import open
33
import os
34
from sphinx.util.console import bold
35
@@ -42,11 +43,11 @@ def remove_directory_underscores(app, exception):
42
43
_, ext = os.path.splitext(filename)
44
if ext in REWRITE_EXTENSIONS:
45
path = os.path.join(dirpath, filename)
- with open(path) as fh:
46
+ with open(path, encoding='utf-8') as fh:
47
contents = fh.read()
48
for old, new in DIRS.items():
49
contents = contents.replace(old + '/', new + '/')
- with open(path, 'w') as fh:
50
+ with open(path, 'w', encoding='utf-8') as fh:
51
fh.write(contents)
52
# Move directory contents
53
0 commit comments