Skip to content
This repository has been archived by the owner on Feb 22, 2018. It is now read-only.

refactor(url_template): simplify the parameter regexp #23

Merged
merged 1 commit into from Apr 4, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/url_template.dart
Expand Up @@ -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) {
Expand Down Expand Up @@ -88,4 +88,4 @@ class UrlTemplate implements UrlMatcher {
_chunks.map((c) => c is Function ? c(parameters) : c).join() + tail;

List<String> urlParameterNames() => _fields;
}
}