allow lone css selector in :if/:if-not operators

This commit is contained in:
gorhill 2016-12-27 12:32:52 -05:00
parent 7558fedc38
commit 5aa122e856
1 changed files with 6 additions and 1 deletions

View File

@ -850,7 +850,12 @@ FilterContainer.prototype.compileProceduralSelector = (function() {
var compile = function(raw) {
var matches = reParserEx.exec(raw);
if ( matches === null ) { return; }
if ( matches === null ) {
if ( isValidCSSSelector(raw) ) {
return { selector: raw, tasks: [] };
}
return;
}
var tasks = [],
firstOperand = raw.slice(0, matches.index),
currentOperator = matches[1],