File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -194,7 +194,9 @@ let parseFileAndRange = (fileAndRange: string) => {
194
194
endLineOrChar ,
195
195
_colonPlusEndCharOrNothing ,
196
196
endCharOrNothing ,
197
- ] = fileAndRange . match ( regex ) ! ;
197
+ ] = fileAndRange . trim ( ) . match ( regex ) ! ;
198
+ // for the trimming, see https://github.com/rescript-lang/rescript-vscode/pull/71#issuecomment-769160576
199
+
198
200
// language-server position is 0-based. Ours is 1-based. Convert
199
201
// also, our end character is inclusive. Language-server's is exclusive
200
202
let range ;
@@ -307,7 +309,7 @@ export let parseCompilerLogOutput = (
307
309
let result : filesDiagnostics = { } ;
308
310
parsedDiagnostics . forEach ( ( parsedDiagnostic ) => {
309
311
let [ fileAndRangeLine , ...diagnosticMessage ] = parsedDiagnostic . content ;
310
- let { file, range } = parseFileAndRange ( fileAndRangeLine . slice ( 2 ) ) ;
312
+ let { file, range } = parseFileAndRange ( fileAndRangeLine ) ;
311
313
312
314
if ( result [ file ] == null ) {
313
315
result [ file ] = [ ] ;
You can’t perform that action at this time.
0 commit comments