Some minor lint fixes for the RegExp.
This commit is contained in:
parent
9dc6e0c572
commit
8e1d369710
|
@ -1,7 +1,7 @@
|
||||||
(function( jQuery ) {
|
(function( jQuery ) {
|
||||||
|
|
||||||
var rclass = /[\n\t]/g,
|
var rclass = /[\n\t]/g,
|
||||||
rspace = /\s+/,
|
rspaces = /\s+/,
|
||||||
rreturn = /\r/g,
|
rreturn = /\r/g,
|
||||||
rspecialurl = /^(?:href|src|style)$/,
|
rspecialurl = /^(?:href|src|style)$/,
|
||||||
rtype = /^(?:button|input)$/i,
|
rtype = /^(?:button|input)$/i,
|
||||||
|
@ -32,7 +32,7 @@ jQuery.fn.extend({
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( value && typeof value === "string" ) {
|
if ( value && typeof value === "string" ) {
|
||||||
var classNames = (value || "").split( rspace );
|
var classNames = (value || "").split( rspaces );
|
||||||
|
|
||||||
for ( var i = 0, l = this.length; i < l; i++ ) {
|
for ( var i = 0, l = this.length; i < l; i++ ) {
|
||||||
var elem = this[i];
|
var elem = this[i];
|
||||||
|
@ -66,7 +66,7 @@ jQuery.fn.extend({
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( (value && typeof value === "string") || value === undefined ) {
|
if ( (value && typeof value === "string") || value === undefined ) {
|
||||||
var classNames = (value || "").split(rspace);
|
var classNames = (value || "").split( rspaces );
|
||||||
|
|
||||||
for ( var i = 0, l = this.length; i < l; i++ ) {
|
for ( var i = 0, l = this.length; i < l; i++ ) {
|
||||||
var elem = this[i];
|
var elem = this[i];
|
||||||
|
@ -104,7 +104,7 @@ jQuery.fn.extend({
|
||||||
// toggle individual class names
|
// toggle individual class names
|
||||||
var className, i = 0, self = jQuery(this),
|
var className, i = 0, self = jQuery(this),
|
||||||
state = stateVal,
|
state = stateVal,
|
||||||
classNames = value.split( rspace );
|
classNames = value.split( rspaces );
|
||||||
|
|
||||||
while ( (className = classNames[ i++ ]) ) {
|
while ( (className = classNames[ i++ ]) ) {
|
||||||
// check each className given, space seperated list
|
// check each className given, space seperated list
|
||||||
|
|
|
@ -17,7 +17,7 @@ var jQuery = function( selector, context ) {
|
||||||
|
|
||||||
// A simple way to check for HTML strings or ID strings
|
// A simple way to check for HTML strings or ID strings
|
||||||
// (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
|
// Is it a simple selector
|
||||||
isSimple = /^.[^:#\[\.,]*$/,
|
isSimple = /^.[^:#\[\.,]*$/,
|
||||||
|
|
Loading…
Reference in a new issue