Use simpler regex in TRichText::removeZalgo

lmao i forgor character class selectors are a thing
This commit is contained in:
celestora 2023-02-17 14:53:45 +02:00 committed by GitHub
parent 668d4f2ada
commit 0da679fae6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -49,7 +49,7 @@ trait TRichText
private function removeZalgo(string $text): string
{
return preg_replace("%[\x{0300}-\x{036F}]{3,}%Xu", "<EFBFBD>", $text);
return preg_replace("%\p{M}{3,}%Xu", "<EFBFBD>", $text);
}
function resolveMentions(array $skipUsers = []): \Traversable