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]].

This commit is contained in:
John Resig 2007-01-09 06:04:54 +00:00
parent 76d6d445bb
commit aa424984f7

View File

@ -70,10 +70,10 @@ jQuery.extend({
"\\[ *(@)S *([!*$^=]*) *('?\"?)(.*?)\\4 *\\]", "\\[ *(@)S *([!*$^=]*) *('?\"?)(.*?)\\4 *\\]",
// Match: [div], [div p] // Match: [div], [div p]
"(\\[)\\s*(.*?)\\s*\\]", "(\\[)\\s*(.*?(\\[.*?\\])?[^[]*?)\\s*\\]",
// Match: :contains('foo') // Match: :contains('foo')
"(:)S\\(\"?'?([^\\)]*?)\"?'?\\)", "(:)S\\(\"?'?(.*?(\\(.*?\\))?[^(]*?)\"?'?\\)",
// Match: :even, :last-chlid // Match: :even, :last-chlid
"([:.#]*)S" "([:.#]*)S"