Skip to content

Commit

Permalink
fix {docsify-ignore} bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mixj93 committed Oct 31, 2017
1 parent 8cd5902 commit 1411a88
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/core/render/compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,12 @@ export class Compiler {
const currentPath = this.router.getCurrentPath()
const { cacheTree, toc } = this

toc[0] && toc[0].ignoreAllSubs && toc.splice(0, toc.length)
toc[0] && toc[0].ignoreAllSubs && toc.splice(0)
toc[0] && toc[0].level === 1 && toc.shift()
toc.forEach((node, i) => {
node.ignoreSubHeading && toc.splice(i, 1)
})

for (let i = 0; i < toc.length; i++) {
toc[i].ignoreSubHeading && toc.splice(i, 1) && i--
}

const tree = cacheTree[currentPath] || genTree(toc, level)

Expand Down

0 comments on commit 1411a88

Please sign in to comment.