Skip to content

Commit

Permalink
fix {docsify-ignore-all} not work bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mixj93 committed Oct 31, 2017
1 parent 752f68e commit 8cd5902
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/more-pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ This header won't appear in the sidebar table of contents.
To ignore all headers on a specific page, you can use `{docsify-ignore-all}` on the first header of the page.

```markdown
# Getting Started
# Getting Started {docsify-ignore-all}

## Header {docsify-ignore-all}
## Header
This header won't appear in the sidebar table of contents.
```

Expand Down
2 changes: 1 addition & 1 deletion src/core/render/compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export class Compiler {
const currentPath = this.router.getCurrentPath()
const { cacheTree, toc } = this

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

0 comments on commit 8cd5902

Please sign in to comment.