mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Minor
This commit is contained in:
parent
e7da5816d6
commit
4d0cfc07fd
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue