File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 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.
8383To ignore all headers on a specific page, you can use ` {docsify-ignore-all} ` on the first header of the page.
8484
8585``` markdown
86- # Getting Started
86+ # Getting Started {docsify-ignore-all}
8787
88- ## Header {docsify-ignore-all}
88+ ## Header
8989This header won't appear in the sidebar table of contents.
9090```
9191
Original file line number Diff line number Diff line change @@ -191,11 +191,12 @@ export class Compiler {
191191 const currentPath = this . router . getCurrentPath ( )
192192 const { cacheTree, toc } = this
193193
194- toc [ 0 ] && toc [ 0 ] . ignoreAllSubs && ( this . toc = [ ] )
194+ toc [ 0 ] && toc [ 0 ] . ignoreAllSubs && toc . splice ( 0 )
195195 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+ }
199200
200201 const tree = cacheTree [ currentPath ] || genTree ( toc , level )
201202
You can’t perform that action at this time.
0 commit comments