5898: Minor
 r=matklad a=matklad

bors r+
🤖

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
bors[bot] 2020-08-27 13:04:29 +00:00 committed by GitHub
commit 6f6580dec7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,6 +2,7 @@
use base_db::SourceDatabase;
use oorandom::Rand32;
use stdx::format_to;
use syntax::{AstNode, TextRange, TextSize};
use crate::{syntax_highlighting::highlight, FileId, RootDatabase};
@ -40,7 +41,7 @@ pub(crate) fn highlight_as_html(db: &RootDatabase, file_id: FileId, rainbow: boo
}
_ => "".into(),
};
buf.push_str(&format!("<span class=\"{}\"{}>{}</span>", class, color, html_escape(curr)));
format_to!(buf, "<span class=\"{}\"{}>{}</span>", class, color, html_escape(curr));
prev_pos = range.range.end();
}