diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/ide/src/syntax_highlighting/html.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/ide/src/syntax_highlighting/html.rs b/crates/ide/src/syntax_highlighting/html.rs index 249368ff8..57e2d2923 100644 --- a/crates/ide/src/syntax_highlighting/html.rs +++ b/crates/ide/src/syntax_highlighting/html.rs | |||
@@ -2,6 +2,7 @@ | |||
2 | 2 | ||
3 | use base_db::SourceDatabase; | 3 | use base_db::SourceDatabase; |
4 | use oorandom::Rand32; | 4 | use oorandom::Rand32; |
5 | use stdx::format_to; | ||
5 | use syntax::{AstNode, TextRange, TextSize}; | 6 | use syntax::{AstNode, TextRange, TextSize}; |
6 | 7 | ||
7 | use crate::{syntax_highlighting::highlight, FileId, RootDatabase}; | 8 | use crate::{syntax_highlighting::highlight, FileId, RootDatabase}; |
@@ -40,7 +41,7 @@ pub(crate) fn highlight_as_html(db: &RootDatabase, file_id: FileId, rainbow: boo | |||
40 | } | 41 | } |
41 | _ => "".into(), | 42 | _ => "".into(), |
42 | }; | 43 | }; |
43 | buf.push_str(&format!("<span class=\"{}\"{}>{}</span>", class, color, html_escape(curr))); | 44 | format_to!(buf, "<span class=\"{}\"{}>{}</span>", class, color, html_escape(curr)); |
44 | 45 | ||
45 | prev_pos = range.range.end(); | 46 | prev_pos = range.range.end(); |
46 | } | 47 | } |