mirror of
https://github.com/openvk/openvk
synced 2024-12-22 16:42:32 +03:00
Use simpler regex in TRichText::removeZalgo
lmao i forgor character class selectors are a thing
This commit is contained in:
parent
668d4f2ada
commit
0da679fae6
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue