Insert nav subheadings in the right place. (#4967)

* Insert nav subheadings in the right place.

Fixes #4924

* Undo erroneous commit
This commit is contained in:
Lars Eggert 2023-01-12 20:23:11 +02:00 committed by GitHub
parent 84e8daffaa
commit 6dd295b1a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -38,7 +38,7 @@ export function populate_nav(nav, heading_selector, classes) {
while (level < cur_level) {
let nav = nav_stack.pop();
cur_level--;
nav_stack[level].appendChild(nav);
nav_stack[cur_level].appendChild(nav);
}
} else {
while (level > cur_level) {