aboutsummaryrefslogtreecommitdiff
path: root/crates/ide
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-08-27 14:04:29 +0100
committerGitHub <[email protected]>2020-08-27 14:04:29 +0100
commit6f6580dec764e136148f3fe55c203a9452176bdd (patch)
tree6f0a3cc5f814e66f66044db175f16b0de8256bbc /crates/ide
parente7da5816d67fadc056ee43310f9d04164c2617d9 (diff)
parent4d0cfc07fd917615a65241ec5e8f05415718f07f (diff)
Merge #5898
5898: Minor r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ide')
-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 }