Skip to content

Commit 55d6e10

Browse files
jriekenmhegazy
authored andcommitted
support URI patterns
1 parent 4eb8c73 commit 55d6e10

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/compiler/core.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ module ts {
434434
return path.replace(/\\/g, "/");
435435
}
436436

437-
// Returns length of path root (i.e. length of "/", "x:/", "//server/share/")
437+
// Returns length of path root (i.e. length of "/", "x:/", "//server/share/, file:///user/files")
438438
export function getRootLength(path: string): number {
439439
if (path.charCodeAt(0) === CharacterCodes.slash) {
440440
if (path.charCodeAt(1) !== CharacterCodes.slash) return 1;
@@ -448,6 +448,8 @@ module ts {
448448
if (path.charCodeAt(2) === CharacterCodes.slash) return 3;
449449
return 2;
450450
}
451+
let idx = path.indexOf('://');
452+
if (idx !== -1) return idx + 3
451453
return 0;
452454
}
453455

0 commit comments

Comments
 (0)