aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/syntax_highlighting.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide/src/syntax_highlighting.rs')
-rw-r--r--crates/ra_ide/src/syntax_highlighting.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/ra_ide/src/syntax_highlighting.rs b/crates/ra_ide/src/syntax_highlighting.rs
index f8f790e59..448645bdc 100644
--- a/crates/ra_ide/src/syntax_highlighting.rs
+++ b/crates/ra_ide/src/syntax_highlighting.rs
@@ -121,7 +121,6 @@ pub(crate) fn highlight(
121 assert!(current_macro_call == Some(mc)); 121 assert!(current_macro_call == Some(mc));
122 current_macro_call = None; 122 current_macro_call = None;
123 format_string = None; 123 format_string = None;
124 continue;
125 } 124 }
126 _ => (), 125 _ => (),
127 } 126 }
@@ -150,7 +149,7 @@ pub(crate) fn highlight(
150 149
151 let range = element.text_range(); 150 let range = element.text_range();
152 151
153 let element_to_highlight = if current_macro_call.is_some() { 152 let element_to_highlight = if current_macro_call.is_some() && element.kind() != COMMENT {
154 // Inside a macro -- expand it first 153 // Inside a macro -- expand it first
155 let token = match element.clone().into_token() { 154 let token = match element.clone().into_token() {
156 Some(it) if it.parent().kind() == TOKEN_TREE => it, 155 Some(it) if it.parent().kind() == TOKEN_TREE => it,