mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 11:31:15 +00:00
Merge #5898
5898: Minor
r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
commit
6f6580dec7
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
use base_db::SourceDatabase;
|
use base_db::SourceDatabase;
|
||||||
use oorandom::Rand32;
|
use oorandom::Rand32;
|
||||||
|
use stdx::format_to;
|
||||||
use syntax::{AstNode, TextRange, TextSize};
|
use syntax::{AstNode, TextRange, TextSize};
|
||||||
|
|
||||||
use crate::{syntax_highlighting::highlight, FileId, RootDatabase};
|
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(),
|
_ => "".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();
|
prev_pos = range.range.end();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user