Rollup merge of #73807 - euclio:rustdoc-highlighting, r=ollie27,GuillaumeGomez
rustdoc: glue tokens before highlighting Fixes #72684. This commit also modifies the signature of `Classifier::new` to avoid copying the source being highlighted.
This commit is contained in:
commit
b700835118
5 changed files with 133 additions and 22 deletions
|
@ -4526,7 +4526,12 @@ fn sidebar_foreign_type(buf: &mut Buffer, it: &clean::Item) {
|
|||
|
||||
fn item_macro(w: &mut Buffer, cx: &Context, it: &clean::Item, t: &clean::Macro) {
|
||||
wrap_into_docblock(w, |w| {
|
||||
w.write_str(&highlight::render_with_highlighting(&t.source, Some("macro"), None, None))
|
||||
w.write_str(&highlight::render_with_highlighting(
|
||||
t.source.clone(),
|
||||
Some("macro"),
|
||||
None,
|
||||
None,
|
||||
))
|
||||
});
|
||||
document(w, cx, it)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue