Better highlight for fixtures

This commit is contained in:
Aleksey Kladov 2021-01-09 16:07:41 +03:00
parent 62b17bac92
commit 4a8d2c098d
2 changed files with 6 additions and 2 deletions

View file

@ -42,6 +42,10 @@ pub(super) fn highlight_injection(
offset += TextSize::of(chunk);
if let Some(next) = text.strip_prefix(marker) {
if let Some(range) = literal.map_range_up(TextRange::at(offset, TextSize::of(marker))) {
hl.add(HlRange { range, highlight: HlTag::Keyword.into(), binding_hash: None });
}
text = next;
let marker_len = TextSize::of(marker);