misc: remove buggy link handling

This commit is contained in:
Xyphyn committed 2023-08-21 07:54:28 -07:00
1 parent fe14cf7f50
commit 0392797677
1 file changed
-14
-14
View File
@@ -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]}`
},
})