提交 e5687c50 编写于 作者: D DCloud_LXH

feat(sidebar): 处理一个 tab 为两个空格

上级 fd9f9b14
...@@ -13,7 +13,7 @@ function parseBar(tab, file, options) { ...@@ -13,7 +13,7 @@ function parseBar(tab, file, options) {
const linkName = options.link || 'link' const linkName = options.link || 'link'
const contents = [] const contents = []
new MarkdownIt().parse(fs.readFileSync(file, { encoding: 'utf-8' }).replace(/<!--([\s\S]*?)-->/g, '')).forEach(token => { new MarkdownIt().parse(fs.readFileSync(file, { encoding: 'utf-8' }).replace(/<!--([\s\S]*?)-->/g, '').replace(/\t/g, ' ')).forEach(token => {
if (token.type === 'inline') { if (token.type === 'inline') {
let text let text
let link let link
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册