summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorneobooru <50623835+neobooru@users.noreply.github.com>2021-10-06 14:59:17 +0200
committerneobooru <50623835+neobooru@users.noreply.github.com>2022-01-26 20:29:31 +0000
commitd5a6609f754b62536a1d884b0d488adab3ee218e (patch)
tree8d12c3bf687b047aa5dd8ad860535a4f984832d6
parent106dcc41356fdf7671a3b2a98a5fe3023c0e7af9 (diff)
client: remove URL rewriting from the markdown handler
-rw-r--r--client/js/util/markdown.js11
1 files changed, 0 insertions, 11 deletions
diff --git a/client/js/util/markdown.js b/client/js/util/markdown.js
index 7bd4d58..6d82134 100644
--- a/client/js/util/markdown.js
+++ b/client/js/util/markdown.js
@@ -65,17 +65,6 @@ class TagPermalinkFixWrapper extends BaseMarkdownWrapper {
// post, user and tags permalinks
class EntityPermalinkWrapper extends BaseMarkdownWrapper {
preprocess(text) {
- // URL-based permalinks
- text = text.replace(new RegExp("\\b/post/(\\d+)/?\\b", "g"), "@$1");
- text = text.replace(
- new RegExp("\\b/tag/([a-zA-Z0-9_-]+?)/?", "g"),
- "#$1"
- );
- text = text.replace(
- new RegExp("\\b/user/([a-zA-Z0-9_-]+?)/?", "g"),
- "+$1"
- );
-
text = text.replace(
/(^|^\(|(?:[^\]])\(|[\s<>\[\]\)])([+#@][a-zA-Z0-9_-]+)/g,
"$1[$2]($2)"