aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAriel Flesler <aflesler@gmail.com>2009-01-05 23:19:58 +0000
committerAriel Flesler <aflesler@gmail.com>2009-01-05 23:19:58 +0000
commit2a81c359d5a45ecaf2dcbc736c8fcdb257a72432 (patch)
tree6ca1195790dc86e931a63c683f4ac16495c141e9
parentb1e161466cb7f68bc7447ffd580395764715d9ca (diff)
downloadjquery-2a81c359d5a45ecaf2dcbc736c8fcdb257a72432.tar.gz
jquery-2a81c359d5a45ecaf2dcbc736c8fcdb257a72432.zip
jquery selector: Replacing {0,1} for ? in a regex.
-rw-r--r--src/selector.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/selector.js b/src/selector.js
index abe7562f0..9cc75fc0e 100644
--- a/src/selector.js
+++ b/src/selector.js
@@ -246,7 +246,7 @@ var Expr = Sizzle.selectors = {
ID: /#((?:[\w\u0128-\uFFFF_-]|\\.)+)/,
CLASS: /\.((?:[\w\u0128-\uFFFF_-]|\\.)+)/,
NAME: /\[name=['"]*((?:[\w\u0128-\uFFFF_-]|\\.)+)['"]*\]/,
- ATTR: /\[((?:[\w\u0128-\uFFFF_-]|\\.)+)\s*(?:(\S{0,1}=)\s*(['"]*)(.*?)\3|)\]/,
+ ATTR: /\[((?:[\w\u0128-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\]/,
TAG: /^((?:[\w\u0128-\uFFFF\*_-]|\\.)+)/,
CHILD: /:(only|nth|last|first)-child\(?(even|odd|[\dn+-]*)\)?/,
POS: /:(nth|eq|gt|lt|first|last|even|odd)\(?(\d*)\)?(?:[^-]|$)/,