File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 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) => {
194194 endLineOrChar ,
195195 _colonPlusEndCharOrNothing ,
196196 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+
198200 // language-server position is 0-based. Ours is 1-based. Convert
199201 // also, our end character is inclusive. Language-server's is exclusive
200202 let range ;
@@ -307,7 +309,7 @@ export let parseCompilerLogOutput = (
307309 let result : filesDiagnostics = { } ;
308310 parsedDiagnostics . forEach ( ( parsedDiagnostic ) => {
309311 let [ fileAndRangeLine , ...diagnosticMessage ] = parsedDiagnostic . content ;
310- let { file, range } = parseFileAndRange ( fileAndRangeLine . slice ( 2 ) ) ;
312+ let { file, range } = parseFileAndRange ( fileAndRangeLine ) ;
311313
312314 if ( result [ file ] == null ) {
313315 result [ file ] = [ ] ;
You can’t perform that action at this time.
0 commit comments