File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -132,7 +132,8 @@ npm test
132132 * 2.7.4 disable console
133133 * 2.7.7 fix bugs
134134 * 2.9.5 featuring collapsible lists
135- * 2.9.6 update readme
135+ * 2.9.6 update readme
136+ * 2.9.7 fix bugs
136137
137138### :fuelpump : How to contribute
138139
Original file line number Diff line number Diff line change @@ -292,7 +292,7 @@ const pageTreeview = module.exports = {
292292
293293 if ( levelTab [ i - nullCount ] < levelTab [ i + 1 - nullCount ] ) {
294294 /** it means that it's a current node */
295- parentNodes . push ( i ) ;
295+ parentNodes . push ( i - nullCount ) ;
296296 }
297297
298298 res . push ( tabs + '- [' + title + '](#' + href + ')' ) ;
@@ -316,6 +316,7 @@ const pageTreeview = module.exports = {
316316 var node = null ;
317317 var currentNodeIndex = 0 ;
318318 var regex = / < i [ \s \S ] + ?< \/ i > / g;
319+
319320 while ( node = regex . exec ( generatedHTML ) ) {
320321 if ( node . index === regex . lastIndex ) {
321322 /** Don't let browsers get stuck in an infinite loop */
@@ -340,7 +341,6 @@ const pageTreeview = module.exports = {
340341 + '} else {'
341342 + ' list.style.display = \'block\';'
342343 + '}'
343- + ''
344344 + '"'
345345 + generatedHTML . substring ( node . index + seperatorIndex ) ;
346346 }
Original file line number Diff line number Diff line change 11{
22 "name" : " gitbook-plugin-page-treeview" ,
3- "version" : " 2.9.6 " ,
3+ "version" : " 2.9.7 " ,
44 "description" : " a gitbook plugin for generating a treeview of each page" ,
55 "engines" : {
66 "gitbook" : " >=3.0.0-pre.0"
You can’t perform that action at this time.
0 commit comments