TOC html
Jump to navigation
Jump to search
| Line 68: | Line 68: | ||
for(var value of children) { | for(var value of children) { | ||
| + | // '&&' does not work ! | ||
if(value.path) { | if(value.path) { | ||
| − | var repeat = depth | + | if(value.state.selected) { |
| + | var repeat = depth | ||
| − | + | // '&&' does not work ! | |
| − | + | if(parent) { | |
| − | + | if(!parent.path) { | |
| − | + | var regExp = new RegExp('\\b' + parent.text + '$') | |
| − | + | if(regExp.test(value.path)) { | |
| − | + | repeat--; | |
| + | } | ||
} | } | ||
} | } | ||
| + | wiki_list.push('#'.repeat(repeat) + '[[' + value.path + '|' + value.text + ']]') | ||
} | } | ||
| − | |||
} | } | ||
Revision as of 16:51, 17 July 2020