diff options
author | John Resig <jeresig@gmail.com> | 2007-01-12 07:32:15 +0000 |
---|---|---|
committer | John Resig <jeresig@gmail.com> | 2007-01-12 07:32:15 +0000 |
commit | dfa1a0246f0249056f3ce85f62a61e609f20fd07 (patch) | |
tree | 5d12a258623b653ec2f279b51e6136cbc6854ebe /src/selector | |
parent | 39b0976e3ed605ec985a6171b059f20ad566808d (diff) | |
download | jquery-dfa1a0246f0249056f3ce85f62a61e609f20fd07.tar.gz jquery-dfa1a0246f0249056f3ce85f62a61e609f20fd07.zip |
Added minor regexp optimization.
Diffstat (limited to 'src/selector')
-rw-r--r-- | src/selector/selector.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/selector/selector.js b/src/selector/selector.js index e9e859e08..08b640669 100644 --- a/src/selector/selector.js +++ b/src/selector/selector.js @@ -312,13 +312,13 @@ jQuery.extend({ var m = re.exec( t ); if ( m ) { + // Remove what we just matched + t = t.substring( m[0].length ); + // Re-organize the first match if ( jQuery.expr[ m[1] ]._resort ) m = jQuery.expr[ m[1] ]._resort( m ); - // Remove what we just matched - t = t.replace( re, "" ); - break; } } |