@@ -10,9 +10,9 @@ CONST_DECL = "const"
10
10
FUNC_DECL = "func"
11
11
12
12
13
- base_dir = "docs/ source"
13
+ base_dir = f "docs{ os . path . sep } source"
14
14
src_filename = "global.html"
15
- out_dir = "src/ editors/ ace/ docTooltip"
15
+ out_dir = f "src{ os . path . sep } editors{ os . path . sep } ace{ os . path . sep } docTooltip"
16
16
17
17
18
18
def new_title_node (title ):
@@ -76,7 +76,7 @@ def process_function(namespace, element):
76
76
77
77
def process_dir_globals (target ):
78
78
infile = os .path .join (base_dir , target , src_filename )
79
- with open (infile ) as f :
79
+ with open (infile , encoding = "utf-8" ) as f :
80
80
contents = "\n " .join (f .readlines ())
81
81
try :
82
82
tree = etree .HTML (contents )
@@ -96,7 +96,7 @@ def process_dir_globals(target):
96
96
97
97
Path (out_dir ).mkdir (parents = True , exist_ok = True )
98
98
outfile = os .path .join (out_dir , target + ".json" )
99
- with open (outfile , "w" ) as f :
99
+ with open (outfile , "w" , encoding = "utf-8" ) as f :
100
100
json .dump (names , f , indent = 2 )
101
101
102
102
# Folder names for jsdoc html
0 commit comments