Skip to content

Commit

Permalink
fix(detector): return if the content only has whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperchupuDev committed Oct 19, 2021
1 parent 27abf8d commit 4be1a1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion detector/levels/low.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = content => {
const badLetters = require('../detection.json').join('');
if (!content) return false;
if (!/[^\s]/u.test(content)) return false;
return !RegExp(`[^\\s${badLetters}]`, 'iu').test(content);
};

0 comments on commit 4be1a1f

Please sign in to comment.