From 55d6e1068754a3c227d5408a7a91e0952376f201 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Thu, 9 Apr 2015 15:19:17 +0200 Subject: [PATCH] support URI patterns --- src/compiler/core.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 4b93081dc31..65c711475d6 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -434,7 +434,7 @@ module ts { return path.replace(/\\/g, "/"); } - // Returns length of path root (i.e. length of "/", "x:/", "//server/share/") + // Returns length of path root (i.e. length of "/", "x:/", "//server/share/, file:///user/files") export function getRootLength(path: string): number { if (path.charCodeAt(0) === CharacterCodes.slash) { if (path.charCodeAt(1) !== CharacterCodes.slash) return 1; @@ -448,6 +448,8 @@ module ts { if (path.charCodeAt(2) === CharacterCodes.slash) return 3; return 2; } + let idx = path.indexOf('://'); + if (idx !== -1) return idx + 3 return 0; }