Skip to content

Commit

Permalink
Rearrange sidebar modnav builder to more logical order
Browse files Browse the repository at this point in the history
  • Loading branch information
notriddle authored Jul 19, 2024
1 parent 2e1e627 commit 0c932b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/librustdoc/html/static/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -531,13 +531,13 @@ function preLoadCss(cssUrl) {
link.href = path;
link.textContent = name;
const li = document.createElement("li");
li.appendChild(link);
ul.appendChild(li);
// Don't "optimize" this to just use `path`.
// We want the browser to normalize this into an absolute URL.
if (link.href === current_page) {
li.classList.add("current");
}
li.appendChild(link);
ul.appendChild(li);
}
sidebar.appendChild(h3);
sidebar.appendChild(ul);
Expand Down

0 comments on commit 0c932b7

Please sign in to comment.