Rollup merge of #87444 - camelid:flatten-nested-format, r=jyn514

Flatten nested `format!` calls
This commit is contained in:
Guillaume Gomez 2021-07-26 16:04:32 +02:00 committed by GitHub
commit b745a2881d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -234,9 +234,9 @@ impl<'a, I: Iterator<Item = Event<'a>>> Iterator for CodeBlocks<'_, 'a, I> {
return Some(Event::Html(
format!(
"<div class=\"example-wrap\">\
<pre{}>{}</pre>\
<pre class=\"language-{}\">{}</pre>\
</div>",
format!(" class=\"language-{}\"", lang),
lang,
Escape(&text),
)
.into(),