From 0e5b2618a38540e1d71b95a00e135e045c828d49 Mon Sep 17 00:00:00 2001 From: DCloud_LXH <283700113@qq.com> Date: Mon, 29 Jan 2024 11:32:27 +0800 Subject: [PATCH] fix: normallizeLink --- docs/.vuepress/markdown/normallizeLink.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/.vuepress/markdown/normallizeLink.js b/docs/.vuepress/markdown/normallizeLink.js index 2f3e8598..4511bf59 100644 --- a/docs/.vuepress/markdown/normallizeLink.js +++ b/docs/.vuepress/markdown/normallizeLink.js @@ -21,9 +21,9 @@ module.exports = function (md) { url = isExternal(url) ? url : normalizeLink(url) - .replace(/\.md\b/, '') - .replace(/\bREADME\b/, '') - .replace(/\/index/, '/') + .replace(/\.md\b/, '.html') + .replace(/\bREADME\b/, 'index.html') + .replace(/\/index(?!\.)/, 'index.html') .replace(/\?id=/, '#') .replace(/\\/g, '/') return oldNormalizeLink.bind(this)(url) -- GitLab