1
Fork 0

Toggle-wrap items differently than top-doc.

This makes sure things like trait methods get wrapped at the
`<h3><code>` level rather than at the `.docblock` level. Also it ensures
that only the actual top documentation gets the `.top-doc` class.
This commit is contained in:
Jacob Hoffman-Andrews 2021-05-13 23:09:24 -07:00
parent 754d17121d
commit 73a5c1f944
2 changed files with 7 additions and 2 deletions

View file

@ -509,7 +509,11 @@ fn document(w: &mut Buffer, cx: &Context<'_>, item: &clean::Item, parent: Option
info!("Documenting {}", name);
}
document_item_info(w, cx, item, parent);
document_full_collapsible(w, item, cx);
if parent.is_none() {
document_full_collapsible(w, item, cx);
} else {
document_full(w, item, cx);
}
}
/// Render md_text as markdown.