提交 c2d36d4c 编写于 作者: D DCloud_LXH

fix: restore createSidebar

上级 ca5220ec
......@@ -46,15 +46,11 @@ function parseBar(tab, file, options) {
}
}
link = path.join(
'/',
link
.replace(/(\bREADME\.md\b)|(\bREADME(?!\.))/i, 'index.html') // README.md | README | readme.md | readme -> index.html
.replace(/(\bindex\.md\b)|(index(?!\.))/, 'index.html') // /index -> /index.html
.replace(/\.md\b/, '.html') // *.md -> *.html
.replace(/\?id=/, '#') // ?id= -> #
.replace(/\\/g, '/') // \ -> /
)
link = path.join('/', link.replace(/\.md\b/, '')
.replace(/\bREADME\b/, '')
.replace(/\/index/, '/')
.replace(/\?id=/, '#'))
.replace(/\\/g, '/')
links.push(link)
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册