From 700e226ba8508641fc559d1d2ddd1fd00a1eb79c Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Wed, 30 Nov 2016 18:26:40 -0500 Subject: Fix link generation when user mention is followed by a punctuation mark --- app/Core/Markdown.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/Core') diff --git a/app/Core/Markdown.php b/app/Core/Markdown.php index b5abe5ed..b83a3ced 100644 --- a/app/Core/Markdown.php +++ b/app/Core/Markdown.php @@ -86,7 +86,7 @@ class Markdown extends Parsedown */ protected function inlineUserLink(array $Excerpt) { - if (! $this->isPublicLink && preg_match('/^@([^\s]+)/', $Excerpt['text'], $matches)) { + if (! $this->isPublicLink && preg_match('/^@([^\s,!.:?]+)/', $Excerpt['text'], $matches)) { $user_id = $this->container['userModel']->getIdByUsername($matches[1]); if (! empty($user_id)) { -- cgit v1.2.3