Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

refactor(url_template): simplify the parameter regexp #23

Merged
merged 1 commit into from

2 participants

@vicb
Collaborator

as "\w" already includes "0-9"

@vicb
Collaborator

@pavelgj this should also be mergeable ?

@pavelgj pavelgj merged commit f466df4 into angular:master

1 check failed

Details default The Travis CI build failed
@vicb vicb deleted the vicb:patch-1 branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 6, 2014
  1. @vicb

    refactor(url_template): simplify the parameter regexp

    vicb authored
    as "\w" already includes "0-9"
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/url_template.dart
View
4 lib/url_template.dart
@@ -51,7 +51,7 @@ class UrlTemplate implements UrlMatcher {
replaceAllMapped(_specialChars, (m) => r'\' + m.group(0));
_fields = <String>[];
_chunks = [];
- var exp = new RegExp(r':([\w0-9]+)');
+ var exp = new RegExp(r':(\w+)');
StringBuffer sb = new StringBuffer('^');
int start = 0;
exp.allMatches(template).forEach((Match m) {
@@ -88,4 +88,4 @@ class UrlTemplate implements UrlMatcher {
_chunks.map((c) => c is Function ? c(parameters) : c).join() + tail;
List<String> urlParameterNames() => _fields;
-}
+}
Something went wrong with that request. Please try again.