git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
39b0976
)
Added minor regexp optimization.
author
John Resig
<jeresig@gmail.com>
Fri, 12 Jan 2007 07:32:15 +0000
(07:32 +0000)
committer
John Resig
<jeresig@gmail.com>
Fri, 12 Jan 2007 07:32:15 +0000
(07:32 +0000)
src/selector/selector.js
patch
|
blob
|
history
diff --git
a/src/selector/selector.js
b/src/selector/selector.js
index
e9e859e
..
08b6406
100644
(file)
--- 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;
}
}