rustdoc: Collapse before unindenting
Doesn't make much sense to unindent each line individually and *then* collapse them all together.
This commit is contained in:
parent
e7fa081c18
commit
bcb8657842
2 changed files with 2 additions and 3 deletions
|
@ -173,7 +173,6 @@ pub fn collapse_docs(crate: clean::Crate) -> plugins::PluginResult {
|
||||||
(crate, None)
|
(crate, None)
|
||||||
}
|
}
|
||||||
|
|
||||||
// n.b. this is copied from src/librustdoc/unindent_pass.rs
|
|
||||||
pub fn unindent(s: &str) -> ~str {
|
pub fn unindent(s: &str) -> ~str {
|
||||||
let lines = s.any_line_iter().collect::<~[&str]>();
|
let lines = s.any_line_iter().collect::<~[&str]>();
|
||||||
let mut saw_first_line = false;
|
let mut saw_first_line = false;
|
||||||
|
|
|
@ -61,10 +61,10 @@ static PASSES: &'static [Pass] = &[
|
||||||
];
|
];
|
||||||
|
|
||||||
static DEFAULT_PASSES: &'static [&'static str] = &[
|
static DEFAULT_PASSES: &'static [&'static str] = &[
|
||||||
"unindent-comments",
|
|
||||||
"collapse-docs",
|
|
||||||
"strip-hidden",
|
"strip-hidden",
|
||||||
"strip-private",
|
"strip-private",
|
||||||
|
"collapse-docs",
|
||||||
|
"unindent-comments",
|
||||||
];
|
];
|
||||||
|
|
||||||
local_data_key!(pub ctxtkey: @core::DocContext)
|
local_data_key!(pub ctxtkey: @core::DocContext)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue