aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/directive/select.js
diff options
context:
space:
mode:
authorStefan hr Berder2013-09-06 17:00:26 +0800
committerPete Bacon Darwin2013-10-01 10:06:15 +0100
commit587e8e2ba5feb275f14d259afb72ae6b77dfef18 (patch)
tree9203fcadb1e4d397d05bcac8709b2c9dff148d04 /src/ng/directive/select.js
parent93ce5923e92f6d2db831d8715ec62734821c70ce (diff)
downloadangular.js-587e8e2ba5feb275f14d259afb72ae6b77dfef18.tar.bz2
refactor(select): simplify the ngOptions regular expression
\w matches [a-zA-Z0-9_] and \d matches [0-9], using both in a character set is simply redundant. Closes #3903
Diffstat (limited to 'src/ng/directive/select.js')
-rw-r--r--src/ng/directive/select.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ng/directive/select.js b/src/ng/directive/select.js
index 9fd2077d..41423361 100644
--- a/src/ng/directive/select.js
+++ b/src/ng/directive/select.js
@@ -126,8 +126,8 @@
var ngOptionsDirective = valueFn({ terminal: true });
var selectDirective = ['$compile', '$parse', function($compile, $parse) {
- //0000111110000000000022220000000000000000000000333300000000000000444444444444444440000000005555555555555555500000006666666666666666600000000000000007777000000000000000000088888
- var NG_OPTIONS_REGEXP = /^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w\d]*)|(?:\(\s*([\$\w][\$\w\d]*)\s*,\s*([\$\w][\$\w\d]*)\s*\)))\s+in\s+(.*?)(?:\s+track\s+by\s+(.*?))?$/,
+ //0000111110000000000022220000000000000000000000333300000000000000444444444444444000000000555555555555555000000066666666666666600000000000000007777000000000000000000088888
+ var NG_OPTIONS_REGEXP = /^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+(.*?)(?:\s+track\s+by\s+(.*?))?$/,
nullModelCtrl = {$setViewValue: noop};
return {