Make highlight suspect/banned words regex case insensitive

This commit is contained in:
A Lawliet
2017-06-24 15:50:44 -04:00
parent e2a9a42ec6
commit 5e6a295f11
@@ -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);