Commit 7eb6a25d authored by John Resig's avatar John Resig

Fixed issues with @* and @foo selectors. Ticket #2

parent 4c572bdf
...@@ -496,7 +496,6 @@ $.g = { ...@@ -496,7 +496,6 @@ $.g = {
disabled: "a.disabled", disabled: "a.disabled",
checked: "a.checked" checked: "a.checked"
}, },
// TODO: Write getAttribute helper
".": "$.hasWord(a,m[2])", ".": "$.hasWord(a,m[2])",
"@": { "@": {
"=": "$.attr(a,m[3]) == m[4]", "=": "$.attr(a,m[3]) == m[4]",
...@@ -661,7 +660,7 @@ $.filter = function(t,r,not) { ...@@ -661,7 +660,7 @@ $.filter = function(t,r,not) {
} }
while ( t.length > 0 && t.match(/^[:\\.#\\[a-zA-Z\\*]/) ) { while ( t.length > 0 && t.match(/^[:\\.#\\[a-zA-Z\\*]/) ) {
var re = new RegExp( "^\\[ *@([a-z0-9\\(\\)_-]+) *([~!\\|\\*$^=]*) *'?\"?([^'\"]*)'?\"? *\\]", "i" ); var re = new RegExp( "^\\[ *@([a-z0-9\\*\\(\\)_-]+) *([~!\\|\\*$^=]*) *'?\"?([^'\"]*)'?\"? *\\]", "i" );
var m = re.exec(t); var m = re.exec(t);
if ( m !== null ) { if ( m !== null ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment