mirror of https://github.com/gorhill/uBlock.git
this fixes #842
This commit is contained in:
parent
18a95a922c
commit
9ac84f9171
|
@ -1539,10 +1539,15 @@ FilterParser.prototype.parse = function(raw) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// options
|
// options
|
||||||
pos = s.indexOf('$');
|
// https://github.com/gorhill/uBlock/issues/842
|
||||||
if ( pos !== -1 ) {
|
// - ensure sure we are not dealing with a regex-based filter.
|
||||||
this.parseOptions(s.slice(pos + 1));
|
// - lookup the last occurrence of `$`.
|
||||||
s = s.slice(0, pos);
|
if ( s.charAt(0) !== '/' || s.slice(-1) !== '/' ) {
|
||||||
|
pos = s.lastIndexOf('$');
|
||||||
|
if ( pos !== -1 ) {
|
||||||
|
this.parseOptions(s.slice(pos + 1));
|
||||||
|
s = s.slice(0, pos);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// regex?
|
// regex?
|
||||||
|
|
Loading…
Reference in New Issue