Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

refactor(url_template): simplify the parameter regexp #23

Merged
merged 1 commit into from

2 participants

Victor Berchet Pavel Jbanov
Victor Berchet
Collaborator

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

Victor Berchet
Collaborator

@pavelgj this should also be mergeable ?

Pavel Jbanov pavelgj merged commit f466df4 into from
Victor Berchet vicb deleted the 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. Victor Berchet

    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
4 lib/url_template.dart
View
@@ -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.