diff options
author | Michał Gołębiowski-Owczarek <m.goleb@gmail.com> | 2023-02-13 18:35:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-13 18:35:02 +0100 |
commit | ac1c59a354c1e333cbe3c40f3b3dc7f644d81f6b (patch) | |
tree | 35e72599b10e6a7ef095197e46231bf90ca45157 | |
parent | 582785e047ca1837ebffc8a87b2e51e03f727c0a (diff) | |
download | jquery-ac1c59a354c1e333cbe3c40f3b3dc7f644d81f6b.tar.gz jquery-ac1c59a354c1e333cbe3c40f3b3dc7f644d81f6b.zip |
Selector: Rename rcombinators to rleadingCombinator
Closes gh-5208
-rw-r--r-- | src/selector.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/selector.js b/src/selector.js index 47e4cbe14..998700db5 100644 --- a/src/selector.js +++ b/src/selector.js @@ -92,7 +92,7 @@ var i, rwhitespace = new RegExp( whitespace + "+", "g" ), rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + + rleadingCombinator = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), rdescend = new RegExp( whitespace + "|>" ), @@ -270,7 +270,7 @@ function find( 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 ) || @@ -1527,7 +1527,7 @@ function tokenize( selector, parseOnly ) { matched = false; // Combinators - if ( ( match = rcombinators.exec( soFar ) ) ) { + if ( ( match = rleadingCombinator.exec( soFar ) ) ) { matched = match.shift(); tokens.push( { value: matched, |