File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
crates/mdbook-html/front-end/templates Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -392,7 +392,7 @@ window.customElements.define('mdbook-sidebar-scrollbox', MDBookSidebarScrollbox)
392392 stack.push({level: nextLevel, ol: ol});
393393 }
394394 } else if (level < currentLevel) {
395- while (stack.length > 1 && stack[stack.length - 1].level >= level) {
395+ while (stack.length > 1 && stack[stack.length - 1].level > level) {
396396 stack.pop();
397397 }
398398 }
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ assert-text: (".current-header", "Heading 1")
1010assert-attribute: ("li:has(> span > a[href='#heading-12'])", {"class": "header-item"})
1111assert-attribute: ("li:has(> span > a[href='#heading-21'])", {"class": "header-item"})
1212
13- assert-property: ("div.on-this-page", {"innerHTML": '<ol class="section"><li class="header-item expanded"><span class="chapter-link-wrapper"><a href="#heading-1" class="header-in-summary current-header">Heading 1</a></span><ol class="section"><li class="header-item expanded"><span class="chapter-link-wrapper"><a href="#heading-11" class="header-in-summary">Heading 1.1</a></span></li><li class="header-item"><span class="chapter-link-wrapper"><a href="#heading-12" class="header-in-summary">Heading 1.2</a><a class="chapter-fold-toggle header-toggle"><div>❱</div></a></span><ol class="section"><li class="header-item expanded"><span class="chapter-link-wrapper"><a href="#heading-121" class="header-in-summary">Heading 1.2.1</a></span></li><li class="header-item expanded"><span class="chapter-link-wrapper"><a href="#heading-122" class="header-in-summary">Heading 1.2.2</a></span></li></ol></li></ol></li><li class="header-item expanded"><span class="chapter-link-wrapper"><a href="#heading-13" class="header-in-summary">Heading 1.3</a></span></li><li class="header-item expanded"><span class="chapter-link-wrapper"><a href="#heading-2" class="header-in-summary">Heading 2</a></span><ol class="section"><li class="header-item"><span class="chapter-link-wrapper"><a href="#heading-21" class="header-in-summary">Heading 2.1</a><a class="chapter-fold-toggle header-toggle"><div>❱</div></a></span><ol class="section"><li class="header-item"><span class="chapter-link-wrapper"><a href="#heading-211" class="header-in-summary">Heading 2.1.1</a><a class="chapter-fold-toggle header-toggle"><div>❱</div></a></span><ol class="section"><li class="header-item"><span class="chapter-link-wrapper"><a href="#heading-2111" class="header-in-summary">Heading 2.1.1.1</a><a class="chapter-fold-toggle header-toggle"><div>❱</div></a></span><ol class="section"><li class="header-item expanded"><span class="chapter-link-wrapper"><a href="#heading-21111" class="header-in-summary">Heading 2.1.1.1.1</a></span></li></ol></li></ol></li></ol></li></ol></li></ol>'})
13+ assert-property: ("div.on-this-page", {"innerHTML": '<ol class="section"><li class="header-item expanded"><span class="chapter-link-wrapper"><a href="#heading-1" class="header-in-summary current-header">Heading 1</a></span><ol class="section"><li class="header-item expanded"><span class="chapter-link-wrapper"><a href="#heading-11" class="header-in-summary">Heading 1.1</a></span></li><li class="header-item"><span class="chapter-link-wrapper"><a href="#heading-12" class="header-in-summary">Heading 1.2</a><a class="chapter-fold-toggle header-toggle"><div>❱</div></a></span><ol class="section"><li class="header-item expanded"><span class="chapter-link-wrapper"><a href="#heading-121" class="header-in-summary">Heading 1.2.1</a></span></li><li class="header-item expanded"><span class="chapter-link-wrapper"><a href="#heading-122" class="header-in-summary">Heading 1.2.2</a></span></li></ol></li><li class="header-item expanded"><span class="chapter-link-wrapper"><a href="#heading-13" class="header-in-summary">Heading 1.3</a></span></li></ol></li><li class="header-item expanded"><span class="chapter-link-wrapper"><a href="#heading-2" class="header-in-summary">Heading 2</a></span><ol class="section"><li class="header-item"><span class="chapter-link-wrapper"><a href="#heading-21" class="header-in-summary">Heading 2.1</a><a class="chapter-fold-toggle header-toggle"><div>❱</div></a></span><ol class="section"><li class="header-item"><span class="chapter-link-wrapper"><a href="#heading-211" class="header-in-summary">Heading 2.1.1</a><a class="chapter-fold-toggle header-toggle"><div>❱</div></a></span><ol class="section"><li class="header-item"><span class="chapter-link-wrapper"><a href="#heading-2111" class="header-in-summary">Heading 2.1.1.1</a><a class="chapter-fold-toggle header-toggle"><div>❱</div></a></span><ol class="section"><li class="header-item expanded"><span class="chapter-link-wrapper"><a href="#heading-21111" class="header-in-summary">Heading 2.1.1.1.1</a></span></li></ol></li></ol></li></ol></li></ol></li></ol>'})
1414
1515// Click 1.2, expands it.
1616click: "a.header-in-summary[href='#heading-12']"
You can’t perform that action at this time.
0 commit comments