diff options
author | Anton M <obhvsbypqghgc@gmail.com> | 2011-01-19 00:15:28 +0100 |
---|---|---|
committer | Anton M <obhvsbypqghgc@gmail.com> | 2011-01-19 00:15:28 +0100 |
commit | 265cf0efa7ab3296b3fc4917b863d7b09e3d8bb4 (patch) | |
tree | 2e87612f42270c8cd1a9bffc500f0580f55bc933 | |
parent | fc7bd61200a447b361b7d561cf376c29c165aed7 (diff) | |
download | jquery-265cf0efa7ab3296b3fc4917b863d7b09e3d8bb4.tar.gz jquery-265cf0efa7ab3296b3fc4917b863d7b09e3d8bb4.zip |
Remove an unused regex and optimize character escape regex usage.
-rw-r--r-- | src/core.js | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/core.js b/src/core.js index 4311e3103..f116ef4d1 100644 --- 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\-]+)$)/, - // Is it a simple selector - isSimple = /^.[^:#\[\.,]*$/, - // Check if a string has a non-whitespace character in it rnotwhite = /\S/, - rwhite = /\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]+$/; } |