fix(markdown): keep CJK punctuation out of bare-URL autolinks

marked's GFM url tokenizer swallows any non-space text after a bare URL,
including fullwidth punctuation and Chinese annotations written directly
after it ("https://x.com/docs(说明)了解更多"). Switch the autolink
tokenizer to marked-linkify-it, which treats Unicode punctuation as a URL
boundary, so fullwidth parens and CJK punctuation are trimmed naturally.
This commit is contained in:
gaojunran
2026-08-21 13:10:42 +08:00
parent 0d70a631f6
commit 19c5cc1f1e
4 changed files with 47 additions and 6 deletions
+1
View File
@@ -66,6 +66,7 @@
"http-proxy-middleware": "^3.0.5",
"katex": "^0.17.0",
"marked": "^17.0.3",
"marked-linkify-it": "^4.0.2",
"morphdom": "^2.7.7",
"motion": "^12.23.24",
"next-themes": "^0.4.6",