diff options
author | Aleksey Kladov <[email protected]> | 2021-01-09 13:07:41 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2021-01-09 13:07:41 +0000 |
commit | 4a8d2c098d88da6f36f3cf95f424b471987c5daa (patch) | |
tree | a007952a8870e4d8c0b5fa1e0e0a088b399a8c8d /crates/ide/src/syntax_highlighting/injection.rs | |
parent | 62b17bac92595d384aaeb0a0fdc5c03269a0dbac (diff) |
Better highlight for fixtures
Diffstat (limited to 'crates/ide/src/syntax_highlighting/injection.rs')
-rw-r--r-- | crates/ide/src/syntax_highlighting/injection.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ide/src/syntax_highlighting/injection.rs b/crates/ide/src/syntax_highlighting/injection.rs index de2180b04..008d5ce24 100644 --- a/crates/ide/src/syntax_highlighting/injection.rs +++ b/crates/ide/src/syntax_highlighting/injection.rs | |||
@@ -42,6 +42,10 @@ pub(super) fn highlight_injection( | |||
42 | offset += TextSize::of(chunk); | 42 | offset += TextSize::of(chunk); |
43 | 43 | ||
44 | if let Some(next) = text.strip_prefix(marker) { | 44 | if let Some(next) = text.strip_prefix(marker) { |
45 | if let Some(range) = literal.map_range_up(TextRange::at(offset, TextSize::of(marker))) { | ||
46 | hl.add(HlRange { range, highlight: HlTag::Keyword.into(), binding_hash: None }); | ||
47 | } | ||
48 | |||
45 | text = next; | 49 | text = next; |
46 | 50 | ||
47 | let marker_len = TextSize::of(marker); | 51 | let marker_len = TextSize::of(marker); |