Skip to content
Snippets Groups Projects
Unverified Commit ec3ca303 authored by syuilo's avatar syuilo
Browse files

ミュートワードで正規表現を使えるように

parent 890770c2
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,8 @@ export default function(me, settings, note) {
const includesMutedWords = (text: string) =>
text
? settings.mutedWords.some(q => q.length > 0 && !q.some(word => !text.includes(word)))
? settings.mutedWords.some(q => q.length > 0 && !q.some(word =>
word.startsWith('/') && word.endsWith('/') ? !(new RegExp(word.substr(1, word.length - 2)).test(text)) : !text.includes(word)))
: false;
return (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment