From d5bb271dd8e8e805ab577fcd899a16b712358b43 Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Sat, 28 May 2022 14:21:03 +0800 Subject: [PATCH] doc: link error, close #5652 --- plugin/md/markdown/plugins/link.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugin/md/markdown/plugins/link.ts b/plugin/md/markdown/plugins/link.ts index 164f521a7..7a81c0091 100644 --- a/plugin/md/markdown/plugins/link.ts +++ b/plugin/md/markdown/plugins/link.ts @@ -45,10 +45,10 @@ export const linkPlugin = (md: MarkdownIt, externalAttrs: Record if (cleanUrl.endsWith('.md')) { cleanUrl = cleanUrl.replace(/\.md$/, '.html'); } - // ./foo -> ./foo.html - if (!cleanUrl.endsWith('.html') && !cleanUrl.endsWith('/')) { - cleanUrl += '.html'; - } + // // ./foo -> ./foo.html + // if (!cleanUrl.endsWith('.html') && !cleanUrl.endsWith('/')) { + // cleanUrl += '.html'; + // } const parsed = new URL(url, 'http://a.com'); url = cleanUrl + parsed.search + parsed.hash; }