1
Fork 0

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:
Manish Goregaokar 2020-07-16 11:18:31 -07:00 committed by GitHub
commit b700835118
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 133 additions and 22 deletions

View file

@ -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)
}