diff --git a/src/CustomMarkdown.php b/src/CustomMarkdown.php index fdb3a2aa..846db8eb 100644 --- a/src/CustomMarkdown.php +++ b/src/CustomMarkdown.php @@ -137,7 +137,7 @@ class CustomMarkdown extends \Michelf\Markdown protected function doTags($text) { $link = \Chibi\UrlHelper::route('post', 'list', ['query' => '_query_']); - return preg_replace_callback('/(?:(?<![^\s\(\)\[\]]))#([a-zA-Z0-9_-]+)/', function($x) use ($link) + return preg_replace_callback('/(?:(?<![^\s\(\)\[\]]))#([()\[\]a-zA-Z0-9_.-]+)/', function($x) use ($link) { return $this->hashPart('<a href="' . str_replace('_query_', $x[1], $link) . '">' . $x[0] . '</a>'); }, $text);