misc: remove buggy link handling
This commit is contained in:
1 parent
fe14cf7f50
commit
0392797677
1 file changed
-14
@@ -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]}`
|
|
||||||
},
|
|
||||||
})
|
|
||||||
Reference in new issue
Block a user