ea13aa94 by Adam Heath

If the value passed to getAttrValueMatch is quoted, then remove the

quotes.
1 parent 2626a712
......@@ -98,6 +98,7 @@ const compileMatcher = (ast: AST, selector: string): MatcherProducer => {
const getAttrValueMatch = (value: string, operator: string = '=', caseSensitive: boolean): AttrValueMatch => {
if (value === undefined) return (attrValue) => attrValue !== undefined
if (value[ 0 ] === '"' || value[ 0 ] === '\'') value = value.substring(1, value.length - 1)
const isCaseInsensitive = caseSensitive === 'i'
if (isCaseInsensitive) value = value.toLowerCase()
const adjustMatcher = (matcher) => isCaseInsensitive ? (attrValue) => matcher(attrValue.toLowerCase()) : matcher
......