提交 b025856f 编写于 作者: D DCloud_LXH

chore: createSidebar

上级 38c9f974
...@@ -13,7 +13,7 @@ function parseBar(tab, file, options) { ...@@ -13,7 +13,7 @@ function parseBar(tab, file, options) {
const contents = [] const contents = []
new MarkdownIt() new MarkdownIt()
.parse(fs.readFileSync(file, { encoding: 'utf-8' }).replace(/<!--([\s\S]*?)-->/g, "")) .parse(fs.readFileSync(file, { encoding: 'utf-8' }).replace(/<!--([\s\S]*?)-->/g, "").replace(/\t/g, ' '))
.forEach(token => { .forEach(token => {
if (token.type === 'inline') { if (token.type === 'inline') {
let text let text
...@@ -80,4 +80,4 @@ module.exports = function (tabs = []) { ...@@ -80,4 +80,4 @@ module.exports = function (tabs = []) {
createSiteMap(links, () => links.length = 0) createSiteMap(links, () => links.length = 0)
return tabs.length ? sidebar : false return tabs.length ? sidebar : false
} }
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册