refactor(RegExp): use /.../ to create RegExp literal

fixes #2691
This commit is contained in:
Victor Berchet
2015-06-23 12:46:38 +02:00
parent 258da88765
commit 447926dc08
17 changed files with 62 additions and 84 deletions

View File

@ -78,8 +78,8 @@ class StarSegment {
}
var paramMatcher = RegExpWrapper.create("^:([^\/]+)$");
var wildcardMatcher = RegExpWrapper.create("^\\*([^\/]+)$");
var paramMatcher = /^:([^\/]+)$/g;
var wildcardMatcher = /^\*([^\/]+)$/g;
function parsePathString(route: string): StringMap<string, any> {
// normalize route as not starting with a "/". Recognition will