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 (from parent 1:
9dc6e0c
)
Some minor lint fixes for the RegExp.
author
jeresig
<jeresig@gmail.com>
Wed, 22 Sep 2010 13:46:21 +0000
(09:46 -0400)
committer
jeresig
<jeresig@gmail.com>
Wed, 22 Sep 2010 13:46:21 +0000
(09:46 -0400)
src/attributes.js
patch
|
blob
|
history
src/core.js
patch
|
blob
|
history
diff --git
a/src/attributes.js
b/src/attributes.js
index
b0a0e91
..
73dee36
100644
(file)
--- a/
src/attributes.js
+++ b/
src/attributes.js
@@
-1,7
+1,7
@@
(function( jQuery ) {
var rclass = /[\n\t]/g,
(function( jQuery ) {
var rclass = /[\n\t]/g,
- rspace = /\s+/,
+ rspaces = /\s+/,
rreturn = /\r/g,
rspecialurl = /^(?:href|src|style)$/,
rtype = /^(?:button|input)$/i,
rreturn = /\r/g,
rspecialurl = /^(?:href|src|style)$/,
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++ ) {
var elem = this[i];
for ( var i = 0, l = this.length; i < l; 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++ ) {
var elem = this[i];
for ( var i = 0, l = this.length; i < l; i++ ) {
var elem = this[i];
@@
-104,7
+104,7
@@
jQuery.fn.extend({
// toggle individual class names
var className, i = 0, self = jQuery(this),
state = stateVal,
// toggle individual class names
var className, i = 0, self = jQuery(this),
state = stateVal,
- classNames = value.split( rspace );
+ classNames = value.split( rspaces );
while ( (className = classNames[ i++ ]) ) {
// check each className given, space seperated list
while ( (className = classNames[ i++ ]) ) {
// check each className given, space seperated list
diff --git
a/src/core.js
b/src/core.js
index
ab325ee
..
227dc30
100644
(file)
--- a/
src/core.js
+++ b/
src/core.js
@@
-17,7
+17,7
@@
var jQuery = function( selector, context ) {
// A simple way to check for HTML strings or ID strings
// (both of which we optimize for)
// A simple way to check for HTML strings or ID strings
// (both of which we optimize for)
- quickExpr = /^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w-]+)$)/,
+ quickExpr = /^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,
// Is it a simple selector
isSimple = /^.[^:#\[\.,]*$/,
// Is it a simple selector
isSimple = /^.[^:#\[\.,]*$/,