mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
Rollup merge of #58146 - GuillaumeGomez:dont-collapse-everything, r=QuietMisdreavus
Prevent automatic collapse of methods impl blocks Fixes #57582. r? @QuietMisdreavus
This commit is contained in:
commit
064b787fc9
@ -1886,12 +1886,30 @@ if (!DOMTokenList.prototype.remove) {
|
||||
updateLocalStorage("rustdoc-collapse", "true");
|
||||
addClass(innerToggle, "will-expand");
|
||||
onEveryMatchingChild(innerToggle, "inner", function(e) {
|
||||
e.innerHTML = labelForToggleButton(true);
|
||||
var parent = e.parentNode;
|
||||
var superParent = null;
|
||||
|
||||
if (parent) {
|
||||
superParent = parent.parentNode;
|
||||
}
|
||||
if (!parent || !superParent || superParent.id !== "main" ||
|
||||
hasClass(parent, "impl") === false) {
|
||||
e.innerHTML = labelForToggleButton(true);
|
||||
}
|
||||
});
|
||||
innerToggle.title = "expand all docs";
|
||||
if (fromAutoCollapse !== true) {
|
||||
onEachLazy(document.getElementsByClassName("collapse-toggle"), function(e) {
|
||||
collapseDocs(e, "hide", pageId);
|
||||
var parent = e.parentNode;
|
||||
var superParent = null;
|
||||
|
||||
if (parent) {
|
||||
superParent = parent.parentNode;
|
||||
}
|
||||
if (!parent || !superParent || superParent.id !== "main" ||
|
||||
hasClass(parent, "impl") === false) {
|
||||
collapseDocs(e, "hide", pageId);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user