提交 0e5b2618 编写于 作者: D DCloud_LXH

fix: normallizeLink

上级 d6e9a643
...@@ -21,9 +21,9 @@ module.exports = function (md) { ...@@ -21,9 +21,9 @@ module.exports = function (md) {
url = isExternal(url) url = isExternal(url)
? url ? url
: normalizeLink(url) : normalizeLink(url)
.replace(/\.md\b/, '') .replace(/\.md\b/, '.html')
.replace(/\bREADME\b/, '') .replace(/\bREADME\b/, 'index.html')
.replace(/\/index/, '/') .replace(/\/index(?!\.)/, 'index.html')
.replace(/\?id=/, '#') .replace(/\?id=/, '#')
.replace(/\\/g, '/') .replace(/\\/g, '/')
return oldNormalizeLink.bind(this)(url) return oldNormalizeLink.bind(this)(url)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册