未验证 提交 064b787f 编写于 作者: G Guillaume Gomez 提交者: GitHub

Rollup merge of #58146 - GuillaumeGomez:dont-collapse-everything, r=QuietMisdreavus

Prevent automatic collapse of methods impl blocks

Fixes #57582.

r? @QuietMisdreavus
......@@ -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);
}
});
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册