diff --git a/client/js/util/misc.js b/client/js/util/misc.js index 54c07315..a9521458 100644 --- a/client/js/util/misc.js +++ b/client/js/util/misc.js @@ -111,9 +111,9 @@ function formatMarkdown(text) { 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, '](#/posts/query=$1)'); + 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, '](/posts/text=$1)'); return text; }; @@ -131,7 +131,7 @@ function formatMarkdown(text) { //search permalinks text = text.replace( /\[search\]((?:[^\[]|\[(?!\/?search\]))+)\[\/search\]/ig, - '$1'); + '$1'); //spoilers text = text.replace( /\[spoiler\]((?:[^\[]|\[(?!\/?spoiler\]))+)\[\/spoiler\]/ig,