update reverse lookup code to deal with #711

This commit is contained in:
gorhill 2015-09-13 14:59:33 -04:00
parent f5bb9cec69
commit ce12fdba01
1 changed files with 2 additions and 3 deletions

View File

@ -103,11 +103,10 @@ var fromCosmeticFilter = function(details) {
var matches = rePlainSelector.exec(filter);
if ( matches ) {
if ( matches[0] === filter ) { // simple CSS selector
reStr = rescape('c\vlg\v');
reStr = rescape('c\vlg\v' + filter);
} else { // complex CSS selector
reStr = rescape('c\vlg+\v');
reStr = rescape('c\vlg+\v' + matches[0] + '\v' + filter);
}
reStr += '\\w+' + rescape('\v' + filter);
} else if ( reHighLow.test(filter) ) { // [alt] or [title]
reStr = rescape('c\vhlg0\v' + filter);
} else if ( reHighMedium.test(filter) ) { // [href^="..."]