remove deprecated methods

This commit is contained in:
ghost 2023-12-08 20:23:27 +02:00
parent c16c071952
commit 4063fabf30

View File

@ -52,20 +52,6 @@ class AppExtension extends AbstractExtension
'mentionToMarkdown'
]
),
new TwigFilter(
'url_to_html',
[
$this,
'urlToHtml'
]
),
new TwigFilter(
'mention_to_html',
[
$this,
'mentionToHtml'
]
),
new TwigFilter(
'keva_namespace_value',
[
@ -184,28 +170,6 @@ class AppExtension extends AbstractExtension
);
}
public function urlToHtml(
string $text
): string
{
return preg_replace(
'~(https?://(?:www\.)?[^\(\s\)]+)~i',
'<a href="$1">$1</a>',
$text
);
}
public function mentionToHtml(
string $text
): string
{
return preg_replace(
'~@([A-z0-9]{64})~i',
'<a href="#$1">@$1</a>',
$text
);
}
private function plural(int $number, array $texts)
{
$cases = [2, 0, 1, 1, 1, 2];