diff options
author | Ariel Flesler <aflesler@gmail.com> | 2009-01-05 23:19:58 +0000 |
---|---|---|
committer | Ariel Flesler <aflesler@gmail.com> | 2009-01-05 23:19:58 +0000 |
commit | 2a81c359d5a45ecaf2dcbc736c8fcdb257a72432 (patch) | |
tree | 6ca1195790dc86e931a63c683f4ac16495c141e9 | |
parent | b1e161466cb7f68bc7447ffd580395764715d9ca (diff) | |
download | jquery-2a81c359d5a45ecaf2dcbc736c8fcdb257a72432.tar.gz jquery-2a81c359d5a45ecaf2dcbc736c8fcdb257a72432.zip |
jquery selector: Replacing {0,1} for ? in a regex.
-rw-r--r-- | src/selector.js | 2 |
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*)\)?(?:[^-]|$)/, |