mirror of
https://github.com/gorhill/uBlock.git
synced 2024-09-15 15:32:28 +02:00
Fix regression in reverse lookup of cosmetic filters
Related commit:
- d1715fb19f
This commit is contained in:
parent
5e949981e0
commit
000886002d
@ -126,7 +126,7 @@ const fromCosmeticFilter = function(details) {
|
||||
// The longer the needle, the lower the number of false positives.
|
||||
// https://github.com/uBlockOrigin/uBlock-issues/issues/1139
|
||||
// Mind that there is no guarantee a selector has `\w` characters.
|
||||
const needle = selector.match(/\w+|^.*$/g).reduce(function(a, b) {
|
||||
const needle = selector.match(/\w+|\*/g).reduce(function(a, b) {
|
||||
return a.length > b.length ? a : b;
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user