From 2afaf2f6186695a6c775ebe068358b8d2d0125a1 Mon Sep 17 00:00:00 2001 From: ghost Date: Sun, 19 Nov 2023 19:24:23 +0200 Subject: [PATCH] fix links regex condition --- src/Twig/AppExtension.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Twig/AppExtension.php b/src/Twig/AppExtension.php index 8da3975..440ca6c 100644 --- a/src/Twig/AppExtension.php +++ b/src/Twig/AppExtension.php @@ -154,7 +154,7 @@ class AppExtension extends AbstractExtension ): string { return preg_replace( - '~(https?://(?:www\.)?[^\s]+)~i', + '~(https?://(?:www\.)?[^\(\s\)]+)~i', '[$1]($1)', $text );