1
Fork 0

Add hide/show detail toggles to rustdoc

All doccomments are now collapsable via a nearby [-] button
Adds [collapse all] and [expand all] buttons to the top of all api pages
Tweaks some layout to accomadate this
This commit is contained in:
Alexis Beingessner 2014-07-30 21:31:34 -04:00
parent cd1216a054
commit 88fe6dfa31
3 changed files with 96 additions and 3 deletions

View file

@ -1316,6 +1316,12 @@ impl<'a> fmt::Show for Item<'a> {
_ => {}
};
try!(write!(fmt,
r##"<span id='render-detail'>
<a id="collapse-all" href="#">[collapse all]</a>
<a id="expand-all" href="#">[expand all]</a>
</span>"##));
// Write `src` tag
//
// When this item is part of a `pub use` in a downstream crate, the