From 0392797677e30d81d975cc4251bde4d26112498d Mon Sep 17 00:00:00 2001 From: Xyphyn Date: Mon, 21 Aug 2023 07:54:28 -0700 Subject: [PATCH] misc: remove buggy link handling --- src/lib/components/markdown/markdown.ts | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/lib/components/markdown/markdown.ts b/src/lib/components/markdown/markdown.ts index 765de06d..fc7030b1 100644 --- a/src/lib/components/markdown/markdown.ts +++ b/src/lib/components/markdown/markdown.ts @@ -97,17 +97,3 @@ md.linkify.add('@', { }, }) -md.linkify.add('https:', { - validate: function (text, pos, self) { - const tail = text.slice(pos) - - return tail.length - }, - normalize: function (match) { - const matched = match.url.match(/\/\/([\w-]+.[\w.]+)\/post\/(\d+)/) - if (!matched?.[1] || !matched?.[2]) { - return match - } - match.url = `/post/${matched?.[1]}/${matched?.[2]}` - }, -})