Browse Source

fix links regex condition

main
ghost 1 year ago
parent
commit
2afaf2f618
  1. 2
      src/Twig/AppExtension.php

2
src/Twig/AppExtension.php

@ -154,7 +154,7 @@ class AppExtension extends AbstractExtension
): string ): string
{ {
return preg_replace( return preg_replace(
'~(https?://(?:www\.)?[^\s]+)~i', '~(https?://(?:www\.)?[^\(\s\)]+)~i',
'[$1]($1)', '[$1]($1)',
$text $text
); );

Loading…
Cancel
Save