File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -459,16 +459,18 @@ module ts {
459459 if ( path . charCodeAt ( 2 ) === CharacterCodes . slash ) return 3 ;
460460 return 2 ;
461461 }
462- // Per RFC 1738'file' URI schema has a shape file://<host>/<path>
463- // if <host> is omitted then it is assumed that host value is'localhost',
462+ // Per RFC 1738 'file' URI schema has the shape file://<host>/<path>
463+ // if <host> is omitted then it is assumed that host value is 'localhost',
464464 // however slash after the omitted <host> is not removed.
465- // file:///folder1/file1 - this is correct URI
466- // file://folder2/file2 - this is incorrect URI
465+ // file:///folder1/file1 - this is a correct URI
466+ // file://folder2/file2 - this is an incorrect URI
467467 if ( path . lastIndexOf ( "file:///" , 0 ) === 0 ) {
468468 return "file:///" . length ;
469469 }
470470 let idx = path . indexOf ( '://' ) ;
471- if ( idx !== - 1 ) return idx + 3
471+ if ( idx !== - 1 ) {
472+ return idx + "://" . length ;
473+ }
472474 return 0 ;
473475 }
474476
You can’t perform that action at this time.
0 commit comments