X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fjquery%2Fjquery.js;h=175da47029b081bfa6b1ac2e396bac96ff6fc425;hb=bcc8a837055fe720579628d758b7034d6b520f2e;hp=28f4825e83c89a4ef6b0b198e2ef7371b07d8fb4;hpb=3f47d3b8f5b2623a3bf289ad4446d0eafd12413d;p=jquery.git diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index 28f4825..175da47 100644 --- a/src/jquery/jquery.js +++ b/src/jquery/jquery.js @@ -1110,7 +1110,7 @@ jQuery.extend({ * @test t( "Adjacent", "p + p", ["ap","en","sap"] ); * @test t( "Comma, Child, and Adjacent", "a + a, code > a", ["groups","anchor1","anchor2"] ); * @test t( "First Child", "p:first-child", ["firstp","sndp"] ); - * @test t( "Attribute Exists", "a[@title]", ["google"] ); + * @test t( "Attribute Exists", "a[@title]", ["google"] ); * @test t( "Attribute Exists", "*[@title]", ["google"] ); * @test t( "Attribute Exists", "[@title]", ["google"] ); * @test t( "Attribute Equals", "a[@rel='bookmark']", ["simon1"] ); @@ -1199,6 +1199,8 @@ jQuery.extend({ var foundToken = false; for ( var i = 0; i < jQuery.token.length; i += 2 ) { + if ( foundToken ) continue; + var re = new RegExp("^(" + jQuery.token[i] + ")"); var m = re.exec(t); @@ -1235,8 +1237,9 @@ jQuery.extend({ ); } } - } + } + if ( t ) { var val = jQuery.filter(t,r); ret = r = val.r;