Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 33a7098

Browse files
Open all impl blocks by default
1 parent 13a2615 commit 33a7098

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/librustdoc/html/static/main.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1422,11 +1422,13 @@ function hideThemeButtonState() {
14221422
// errors in mobile browsers).
14231423
if (e.tagName === "H2" || e.tagName === "H3") {
14241424
var nextTagName = e.nextElementSibling.tagName;
1425-
if (nextTagName == "H2" || nextTagName == "H3") {
1425+
if (nextTagName === "H2" || nextTagName === "H3") {
14261426
e.nextElementSibling.style.display = "flex";
1427-
} else {
1427+
} else if (nextTagName !== "DETAILS") {
14281428
e.nextElementSibling.style.display = "block";
14291429
}
1430+
} else if (e.tagName === "DETAILS") {
1431+
e.open = true;
14301432
}
14311433
});
14321434
}

0 commit comments

Comments
 (0)