File tree Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -170,22 +170,16 @@ function get_links(map,title) {
170
170
}
171
171
172
172
async function parse_wiki_map ( ) {
173
- let API_BASE_URL = `https://raw.githubusercontent.com/` ;
174
- let url = API_BASE_URL + `saucelabs/sauce-docs/fix-link-checker-workflow/tests/sauce-docs-checker/map.conf` ;
175
- let res = await axios . get ( url ) ;
176
- let text = res . data ;
177
- // console.log(text);
173
+ const text = fs . readFileSync ( 'map.conf' , 'utf-8' )
178
174
let arr = text . split ( '\n' ) ;
179
175
for ( let i = 0 ; i < arr . length ; i ++ ) {
180
176
let line = arr [ i ] ;
181
177
if ( line . startsWith ( ' /' ) ) {
182
178
line = line . trim ( ) . replace ( ';' , '' ) . replace ( '\t' , ' ' ) . replace ( / \s + / g, ' ' ) ;
183
- // console.log(line)
184
179
let map = line . split ( ' ' ) ;
185
180
let from = wiki_url + map [ 0 ] ;
186
181
let to = 'https://' + map [ 1 ] ;
187
182
wiki_map [ from ] = to ;
188
- // console.log(from,'=>',to);
189
183
}
190
184
}
191
185
}
You can’t perform that action at this time.
0 commit comments