Rollup merge of #44397 - GuillaumeGomez:codeblock-color, r=QuietMisdreavus
Codeblock color <img width="1440" alt="screen shot 2017-09-07 at 21 53 58" src="https://user-images.githubusercontent.com/3050060/30183045-4319108e-9419-11e7-98da-da54952cab37.png"> This screenshot has been generated from: ```rust /// foo /// /// ```compile_fail /// foo(); /// ``` /// /// ```ignore /// goo(); /// ``` /// /// ``` /// let x = 0; /// ``` pub fn bar() -> usize { 2 } ``` r? @QuietMisdreavus cc @rust-lang/docs
This commit is contained in:
commit
49bc845807
7 changed files with 173 additions and 10 deletions
|
@ -1819,6 +1819,7 @@ fn render_assoc_const_value(item: &clean::Item) -> String {
|
|||
None,
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
)
|
||||
}
|
||||
_ => String::new(),
|
||||
|
@ -3647,7 +3648,8 @@ impl<'a> fmt::Display for Source<'a> {
|
|||
write!(fmt, "<span id=\"{0}\">{0:1$}</span>\n", i, cols)?;
|
||||
}
|
||||
write!(fmt, "</pre>")?;
|
||||
write!(fmt, "{}", highlight::render_with_highlighting(s, None, None, None))?;
|
||||
write!(fmt, "{}",
|
||||
highlight::render_with_highlighting(s, None, None, None, None))?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
@ -3657,6 +3659,7 @@ fn item_macro(w: &mut fmt::Formatter, cx: &Context, it: &clean::Item,
|
|||
w.write_str(&highlight::render_with_highlighting(&t.source,
|
||||
Some("macro"),
|
||||
None,
|
||||
None,
|
||||
None))?;
|
||||
document(w, cx, it)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue