mirror of https://github.com/gorhill/uBlock.git
Fix missing regex flags
Related feedback: - https://www.reddit.com/r/uBlockOrigin/comments/1005a8f/suddenly_my_filters_doesnt_work/j2htwof/
This commit is contained in:
parent
e14cb609f3
commit
dfe9d3a1da
|
@ -36,7 +36,7 @@ const nonVisualElements = {
|
||||||
|
|
||||||
const regexFromString = (s, exact = false) => {
|
const regexFromString = (s, exact = false) => {
|
||||||
if ( s === '' ) { return /^/; }
|
if ( s === '' ) { return /^/; }
|
||||||
const match = /^\/(.+)\/([i]?)$/.exec(s);
|
const match = /^\/(.+)\/([imu]*)$/.exec(s);
|
||||||
if ( match !== null ) {
|
if ( match !== null ) {
|
||||||
return new RegExp(match[1], match[2] || undefined);
|
return new RegExp(match[1], match[2] || undefined);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue