1
0
mirror of https://github.com/tooot-app/app synced 2025-01-09 16:12:51 +01:00
This commit is contained in:
Zhiyuan Zheng 2022-06-01 23:39:48 +02:00
parent 5ba3290254
commit 316096cf57

View File

@ -55,7 +55,7 @@ export const shouldFilter = ({
) // $& means the whole matched string
switch (filter.whole_word) {
case true:
if (new RegExp('\\B' + escapedPhrase + '\\B').test(text)) {
if (new RegExp('\\b' + escapedPhrase + '\\b').test(text)) {
shouldFilter = true
}
break
@ -100,6 +100,7 @@ export const shouldFilter = ({
})
}
})
status.spoiler_text && parser.write(status.spoiler_text)
parser.write(status.content)
parser.end()
}