mirror of
https://github.com/jquery/sizzle.git
synced 2025-12-28 04:43:44 +00:00
Selector: Rename rcombinators to rleadingCombinator
Closes gh-494 Ref jquery/jquery#5186 Ref jquery/jquery#5208
This commit is contained in:
parent
ac08bb9d24
commit
248b59c008
@ -110,7 +110,7 @@ var i,
|
||||
whitespace + "+$", "g" ),
|
||||
|
||||
rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
|
||||
rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace +
|
||||
rleadingCombinator = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace +
|
||||
"*" ),
|
||||
rdescend = new RegExp( whitespace + "|>" ),
|
||||
|
||||
@ -327,7 +327,7 @@ function Sizzle( selector, context, results, seed ) {
|
||||
// as such selectors are not recognized by querySelectorAll.
|
||||
// Thanks to Andrew Dupont for this technique.
|
||||
if ( nodeType === 1 &&
|
||||
( rdescend.test( selector ) || rcombinators.test( selector ) ) ) {
|
||||
( rdescend.test( selector ) || rleadingCombinator.test( selector ) ) ) {
|
||||
|
||||
// Expand context for sibling selectors
|
||||
newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
|
||||
@ -1883,7 +1883,7 @@ tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
|
||||
matched = false;
|
||||
|
||||
// Combinators
|
||||
if ( ( match = rcombinators.exec( soFar ) ) ) {
|
||||
if ( ( match = rleadingCombinator.exec( soFar ) ) ) {
|
||||
matched = match.shift();
|
||||
tokens.push( {
|
||||
value: matched,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user