Commit 265cf0ef authored by Anton M's avatar Anton M

Remove an unused regex and optimize character escape regex usage.

parent fc7bd612
...@@ -19,12 +19,8 @@ var jQuery = function( selector, context ) { ...@@ -19,12 +19,8 @@ var jQuery = function( selector, context ) {
// (both of which we optimize for) // (both of which we optimize for)
quickExpr = /^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/, quickExpr = /^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,
// Is it a simple selector
isSimple = /^.[^:#\[\.,]*$/,
// Check if a string has a non-whitespace character in it // Check if a string has a non-whitespace character in it
rnotwhite = /\S/, rnotwhite = /\S/,
rwhite = /\s/,
// Used for trimming whitespace // Used for trimming whitespace
trimLeft = /^\s+/, trimLeft = /^\s+/,
...@@ -1039,9 +1035,8 @@ if ( indexOf ) { ...@@ -1039,9 +1035,8 @@ if ( indexOf ) {
}; };
} }
// Verify that \s matches non-breaking spaces // IE doesn't match non-breaking spaces with \s
// (IE fails on this test) if ( rnotwhite.test( "\xA0" ) ) {
if ( !rwhite.test( "\xA0" ) ) {
trimLeft = /^[\s\xA0]+/; trimLeft = /^[\s\xA0]+/;
trimRight = /[\s\xA0]+$/; trimRight = /[\s\xA0]+$/;
} }
......
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