Merge pull request #710 from ALawliet/fix-highlight-suspect-banned-words-regex

Make highlight suspect/banned words regex case insensitive
This commit is contained in:
Kim Gardner authored and GitHub committed 2017-06-26 12:48:11 +01:00
commit 0e152797ad
1 file changed
+1 -1
@@ -54,7 +54,7 @@ class Comment extends React.Component {
// currently the highlighter plugin does not support out of the box.
const searchWords = [...suspectWords, ...bannedWords]
.filter((w) => {
return new RegExp(`(^|\\s)${w}(\\s|$)`).test(comment.body);
return new RegExp(`(^|\\s)${w}(\\s|$)`, 'i').test(comment.body);
})
.concat(linkText);