X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fselector%2Fselector.js;h=be50d332f2e547a8200c4f88ac92b679d068ab35;hb=fce2bdf7ff1d5a293690c65de36a7824a50bc54f;hp=d6d87c03cb6cd17dc50bd078f3b070313d92bc60;hpb=610149fd19c087e51ccd5975ba2c2e5c3bfe49a8;p=jquery.git diff --git a/src/selector/selector.js b/src/selector/selector.js index d6d87c0..be50d33 100644 --- a/src/selector/selector.js +++ b/src/selector/selector.js @@ -80,7 +80,7 @@ jQuery.extend({ // Match: :even, :last-chlid, #id, .class new RegExp("^([:.#]*)(" + - ( jQuery.chars = "(?:[\\w\u0128-\uFFFF*-]|\\\\.)" ) + "+)") + ( jQuery.chars = "(?:[\\w\u0128-\uFFFF*_-]|\\\\.)" ) + "+)") ], token: [ @@ -152,7 +152,7 @@ jQuery.extend({ // An attempt at speeding up child selectors that // point to a specific element tag - var re = /^[\/>]\s*([\w*-]+)/; + var re = new RegExp("^[/>]\\s*(" + jQuery.chars + "+)"); var m = re.exec(t); if ( m ) { @@ -207,7 +207,7 @@ jQuery.extend({ } else { // Optomize for the case nodeName#idName - var re2 = new RegExp("^(\\w+)(#)(" + jQuery.chars + "+)"); + var re2 = new RegExp("^(" + jQuery.chars + "+)(#)(" + jQuery.chars + "+)"); var m = re2.exec(t); // Re-organize the results, so that they're consistent