diff options
Diffstat (limited to 'src/selector')
-rw-r--r-- | src/selector/rbuggyQSA.js | 2 | ||||
-rw-r--r-- | src/selector/selectorError.js | 4 | ||||
-rw-r--r-- | src/selector/tokenize.js | 4 |
3 files changed, 7 insertions, 3 deletions
diff --git a/src/selector/rbuggyQSA.js b/src/selector/rbuggyQSA.js index 7e4632c7f..b056ffe75 100644 --- a/src/selector/rbuggyQSA.js +++ b/src/selector/rbuggyQSA.js @@ -2,6 +2,8 @@ import { isIE } from "../var/isIE.js"; import { whitespace } from "../var/whitespace.js"; import { support } from "./support.js"; +// Build QSA regex. +// Regex strategy adopted from Diego Perini. export var rbuggyQSA = []; if ( isIE ) { diff --git a/src/selector/selectorError.js b/src/selector/selectorError.js index 69770ec6a..da2b239f9 100644 --- a/src/selector/selectorError.js +++ b/src/selector/selectorError.js @@ -1,3 +1,5 @@ +import { jQuery } from "../core.js"; + export function selectorError( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); + jQuery.error( "Syntax error, unrecognized expression: " + msg ); } diff --git a/src/selector/tokenize.js b/src/selector/tokenize.js index 3c1e06c46..fb25cb207 100644 --- a/src/selector/tokenize.js +++ b/src/selector/tokenize.js @@ -1,7 +1,7 @@ import { jQuery } from "../core.js"; import { rcomma } from "./var/rcomma.js"; import { rleadingCombinator } from "./var/rleadingCombinator.js"; -import { rtrim } from "../var/rtrim.js"; +import { rtrimCSS } from "../var/rtrimCSS.js"; import { createCache } from "./createCache.js"; import { selectorError } from "./selectorError.js"; import { filterMatchExpr } from "./filterMatchExpr.js"; @@ -42,7 +42,7 @@ export function tokenize( selector, parseOnly ) { value: matched, // Cast descendant combinators to space - type: match[ 0 ].replace( rtrim, " " ) + type: match[ 0 ].replace( rtrimCSS, " " ) } ); soFar = soFar.slice( matched.length ); } |