aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/syntax_highlighting/html.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-08-27 14:02:56 +0100
committerAleksey Kladov <[email protected]>2020-08-27 14:02:56 +0100
commit4d0cfc07fd917615a65241ec5e8f05415718f07f (patch)
tree6f0a3cc5f814e66f66044db175f16b0de8256bbc /crates/ide/src/syntax_highlighting/html.rs
parente7da5816d67fadc056ee43310f9d04164c2617d9 (diff)
Minor
Diffstat (limited to 'crates/ide/src/syntax_highlighting/html.rs')
-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 }