From 0c932b763d24a9f57ce3285927ea54308b7be902 Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Thu, 18 Jul 2024 19:49:32 -0700 Subject: [PATCH] Rearrange sidebar modnav builder to more logical order --- src/librustdoc/html/static/js/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/librustdoc/html/static/js/main.js b/src/librustdoc/html/static/js/main.js index 116ce615d8c55..9506bc9ed220b 100644 --- a/src/librustdoc/html/static/js/main.js +++ b/src/librustdoc/html/static/js/main.js @@ -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);