Skip to content

Commit

Permalink
Change warnings for invalid regular expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
iorate committed Nov 14, 2018
1 parent 78f908a commit a65ef2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ const compileBlockRule = raw => {
try {
const compiled = new RegExp(re[1], re[2]);
if (compiled.global || compiled.sticky) {
console.warn('uBlacklist: unsupported regular expression flag: ' + raw);
console.warn('Unsupported regular expression flag: ' + raw);
return null;
}
return compiled;
} catch (e) {
console.warn('uBlacklist: invalid regular expression: ' + raw);
console.warn('Invalid regular expression: ' + raw);
return null;
}
}
Expand Down

0 comments on commit a65ef2e

Please sign in to comment.