mirror of
https://github.com/openvk/openvk
synced 2024-11-11 01:19:53 +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
|
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
|
function resolveMentions(array $skipUsers = []): \Traversable
|
||||||
|
|
Loading…
Reference in a new issue