Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 587e8e2

Browse files
hrbonzpetebacondarwin
authored andcommittedOct 1, 2013
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
1 parent 93ce592 commit 587e8e2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/ng/directive/select.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@
126126

127127
var ngOptionsDirective = valueFn({ terminal: true });
128128
var selectDirective = ['$compile', '$parse', function($compile, $parse) {
129-
//0000111110000000000022220000000000000000000000333300000000000000444444444444444440000000005555555555555555500000006666666666666666600000000000000007777000000000000000000088888
130-
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+(.*?))?$/,
129+
//0000111110000000000022220000000000000000000000333300000000000000444444444444444000000000555555555555555000000066666666666666600000000000000007777000000000000000000088888
130+
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+(.*?))?$/,
131131
nullModelCtrl = {$setViewValue: noop};
132132

133133
return {

0 commit comments

Comments
 (0)
This repository has been archived.