aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/ide/src/syntax_highlighting/html.rs3
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
3use base_db::SourceDatabase; 3use base_db::SourceDatabase;
4use oorandom::Rand32; 4use oorandom::Rand32;
5use stdx::format_to;
5use syntax::{AstNode, TextRange, TextSize}; 6use syntax::{AstNode, TextRange, TextSize};
6 7
7use crate::{syntax_highlighting::highlight, FileId, RootDatabase}; 8use 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 }