Commit dfa1a024 authored by John Resig's avatar John Resig

Added minor regexp optimization.

parent 39b0976e
...@@ -312,13 +312,13 @@ jQuery.extend({ ...@@ -312,13 +312,13 @@ jQuery.extend({
var m = re.exec( t ); var m = re.exec( t );
if ( m ) { if ( m ) {
// Remove what we just matched
t = t.substring( m[0].length );
// Re-organize the first match // Re-organize the first match
if ( jQuery.expr[ m[1] ]._resort ) if ( jQuery.expr[ m[1] ]._resort )
m = jQuery.expr[ m[1] ]._resort( m ); m = jQuery.expr[ m[1] ]._resort( m );
// Remove what we just matched
t = t.replace( re, "" );
break; break;
} }
} }
......
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