Commit cc98f56 1 parent 752f68e commit cc98f56 Copy full SHA for cc98f56
File tree 2 files changed +7
-6
lines changed
2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -83,9 +83,9 @@ This header won't appear in the sidebar table of contents.
83
83
To ignore all headers on a specific page, you can use ` {docsify-ignore-all} ` on the first header of the page.
84
84
85
85
``` markdown
86
- # Getting Started
86
+ # Getting Started {docsify-ignore-all}
87
87
88
- ## Header {docsify-ignore-all}
88
+ ## Header
89
89
This header won't appear in the sidebar table of contents.
90
90
```
91
91
Original file line number Diff line number Diff line change @@ -191,11 +191,12 @@ export class Compiler {
191
191
const currentPath = this . router . getCurrentPath ( )
192
192
const { cacheTree, toc } = this
193
193
194
- toc [ 0 ] && toc [ 0 ] . ignoreAllSubs && ( this . toc = [ ] )
194
+ toc [ 0 ] && toc [ 0 ] . ignoreAllSubs && toc . splice ( 0 )
195
195
toc [ 0 ] && toc [ 0 ] . level === 1 && toc . shift ( )
196
- toc . forEach ( ( node , i ) => {
197
- node . ignoreSubHeading && toc . splice ( i , 1 )
198
- } )
196
+
197
+ for ( let i = 0 ; i < toc . length ; i ++ ) {
198
+ toc [ i ] . ignoreSubHeading && toc . splice ( i , 1 ) && i --
199
+ }
199
200
200
201
const tree = cacheTree [ currentPath ] || genTree ( toc , level )
201
202
You can’t perform that action at this time.
0 commit comments