Hashtag handling with Diaspora improved

This commit is contained in:
Michael 2020-04-19 16:33:06 +00:00
parent 98b3058601
commit 538e212a84
4 changed files with 41 additions and 4 deletions

View file

@ -2100,7 +2100,7 @@ class BBCode
$ret = [];
// Convert hashtag links to hashtags
$string = preg_replace('/#\[url\=([^\[\]]*)\](.*?)\[\/url\]/ism', '#$2', $string);
$string = preg_replace('/#\[url\=([^\[\]]*)\](.*?)\[\/url\]/ism', '#$2 ', $string);
// ignore anything in a code block
$string = preg_replace('/\[code.*?\].*?\[\/code\]/sm', '', $string);