Browse Source

check string not converted before to link by "/" prefix

main
ghost 7 months ago
parent
commit
3990d570e1
  1. 3
      src/Twig/AppExtension.php

3
src/Twig/AppExtension.php

@ -185,8 +185,9 @@ class AppExtension extends AbstractExtension
string $text string $text
): string ): string
{ {
// check string not converted before to link by "/" prefix
return preg_replace( return preg_replace(
'~(N[A-z0-9]{33})~i', '~[^/](N[A-z0-9]{33})~i',
'[$1]($1#latest)', '[$1]($1#latest)',
$text $text
); );

Loading…
Cancel
Save