Fixed user Markdown links

This commit is contained in:
rr- 2016-03-13 15:53:53 +01:00
parent f12ce7a7c5
commit f248a6ab4e

View file

@ -208,7 +208,7 @@ App.Util.Misc = function(_, jQuery, marked, promise) {
//post, user and tags premalinks
text = text.replace(/(^|^\(|(?:[^\]])\(|[\s<>\[\]\)])([+#@][a-zA-Z0-9_-]+)/g, '$1[$2]($2)');
text = text.replace(/\]\(@(\d+)\)/g, '](#/post/$1)');
text = text.replace(/\]\(+([a-zA-Z0-9_-]+)\)/g, '](#/user/$1)');
text = text.replace(/\]\(\+([a-zA-Z0-9_-]+)\)/g, '](#/user/$1)');
text = text.replace(/\]\(#([a-zA-Z0-9_-]+)\)/g, '](#/posts/query=$1)');
return text;
};