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
@ -173,7 +173,6 @@ pub fn collapse_docs(crate: clean::Crate) -> plugins::PluginResult {
|
||||
(crate, None)
|
||||
}
|
||||
|
||||
// n.b. this is copied from src/librustdoc/unindent_pass.rs
|
||||
pub fn unindent(s: &str) -> ~str {
|
||||
let lines = s.any_line_iter().collect::<~[&str]>();
|
||||
let mut saw_first_line = false;
|
||||
|
@ -61,10 +61,10 @@ static PASSES: &'static [Pass] = &[
|
||||
];
|
||||
|
||||
static DEFAULT_PASSES: &'static [&'static str] = &[
|
||||
"unindent-comments",
|
||||
"collapse-docs",
|
||||
"strip-hidden",
|
||||
"strip-private",
|
||||
"collapse-docs",
|
||||
"unindent-comments",
|
||||
];
|
||||
|
||||
local_data_key!(pub ctxtkey: @core::DocContext)
|
||||
|
Loading…
x
Reference in New Issue
Block a user