File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -282,8 +282,8 @@ export let runBuildWatcherUsingValidBuildPath = (
282
282
*/
283
283
284
284
// parser helpers
285
- let normalizeFileForWindows = ( file : string ) => {
286
- return process . platform === "win32" ? `file:\\\\\\${ file } ` : file ;
285
+ let pathToURI = ( file : string ) => {
286
+ return process . platform === "win32" ? `file:\\\\\\${ file } ` : ` file:// ${ file } ` ;
287
287
} ;
288
288
let parseFileAndRange = ( fileAndRange : string ) => {
289
289
// https://github.com/rescript-lang/rescript-compiler/blob/0a3f4bb32ca81e89cefd5a912b8795878836f883/jscomp/super_errors/super_location.ml#L15-L25
@@ -307,7 +307,7 @@ let parseFileAndRange = (fileAndRange: string) => {
307
307
if ( match === null ) {
308
308
// no location! Though LSP insist that we provide at least a dummy location
309
309
return {
310
- file : normalizeFileForWindows ( trimmedFileAndRange ) ,
310
+ file : pathToURI ( trimmedFileAndRange ) ,
311
311
range : {
312
312
start : { line : 0 , character : 0 } ,
313
313
end : { line : 0 , character : 0 } ,
@@ -352,7 +352,7 @@ let parseFileAndRange = (fileAndRange: string) => {
352
352
} ;
353
353
}
354
354
return {
355
- file : normalizeFileForWindows ( file ) ,
355
+ file : pathToURI ( file ) ,
356
356
range,
357
357
} ;
358
358
} ;
You can’t perform that action at this time.
0 commit comments