aboutsummaryrefslogtreecommitdiffstats
path: root/src/selector
diff options
context:
space:
mode:
authorJohn Resig <jeresig@gmail.com>2007-01-09 06:04:54 +0000
committerJohn Resig <jeresig@gmail.com>2007-01-09 06:04:54 +0000
commitaa424984f7c37956f568512aa94bc16787e4c651 (patch)
tree228169c16ac6043438b16bb7e8619a7795db6530 /src/selector
parent76d6d445bb68009c010e0b91dbf21747bc2d35ba (diff)
downloadjquery-aa424984f7c37956f568512aa94bc16787e4c651.tar.gz
jquery-aa424984f7c37956f568512aa94bc16787e4c651.zip
Added support for (basic) nested parens and (basic) nested brackets. You can now do: div:not(.foo[a:not(.even)]) or div[p[a.even]].
Diffstat (limited to 'src/selector')
-rw-r--r--src/selector/selector.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/selector/selector.js b/src/selector/selector.js
index d9114c240..e21102c8d 100644
--- a/src/selector/selector.js
+++ b/src/selector/selector.js
@@ -70,10 +70,10 @@ jQuery.extend({
"\\[ *(@)S *([!*$^=]*) *('?\"?)(.*?)\\4 *\\]",
// Match: [div], [div p]
- "(\\[)\\s*(.*?)\\s*\\]",
+ "(\\[)\\s*(.*?(\\[.*?\\])?[^[]*?)\\s*\\]",
// Match: :contains('foo')
- "(:)S\\(\"?'?([^\\)]*?)\"?'?\\)",
+ "(:)S\\(\"?'?(.*?(\\(.*?\\))?[^(]*?)\"?'?\\)",
// Match: :even, :last-chlid
"([:.#]*)S"