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:
fc7bd61
)
Remove an unused regex and optimize character escape regex usage.
author
Anton M
<obhvsbypqghgc@gmail.com>
Tue, 18 Jan 2011 23:15:28 +0000
(
00:15
+0100)
committer
Anton M
<obhvsbypqghgc@gmail.com>
Tue, 18 Jan 2011 23:15:28 +0000
(
00:15
+0100)
src/core.js
patch
|
blob
|
history
diff --git
a/src/core.js
b/src/core.js
index
4311e31
..
f116ef4
100644
(file)
--- a/
src/core.js
+++ b/
src/core.js
@@
-19,12
+19,8
@@
var jQuery = function( selector, context ) {
// (both of which we optimize for)
quickExpr = /^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,
// (both of which we optimize for)
quickExpr = /^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,
- // Is it a simple selector
- isSimple = /^.[^:#\[\.,]*$/,
-
// Check if a string has a non-whitespace character in it
rnotwhite = /\S/,
// Check if a string has a non-whitespace character in it
rnotwhite = /\S/,
- rwhite = /\s/,
// Used for trimming whitespace
trimLeft = /^\s+/,
// Used for trimming whitespace
trimLeft = /^\s+/,
@@
-1039,9
+1035,8
@@
if ( indexOf ) {
};
}
};
}
-// Verify that \s matches non-breaking spaces
-// (IE fails on this test)
-if ( !rwhite.test( "\xA0" ) ) {
+// IE doesn't match non-breaking spaces with \s
+if ( rnotwhite.test( "\xA0" ) ) {
trimLeft = /^[\s\xA0]+/;
trimRight = /[\s\xA0]+$/;
}
trimLeft = /^[\s\xA0]+/;
trimRight = /[\s\xA0]+$/;
}