diff options
Diffstat (limited to 'crates/ide/src/syntax_highlighting.rs')
-rw-r--r-- | crates/ide/src/syntax_highlighting.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/crates/ide/src/syntax_highlighting.rs b/crates/ide/src/syntax_highlighting.rs index ad456bc00..079248511 100644 --- a/crates/ide/src/syntax_highlighting.rs +++ b/crates/ide/src/syntax_highlighting.rs | |||
@@ -4,7 +4,7 @@ mod highlights; | |||
4 | mod injector; | 4 | mod injector; |
5 | 5 | ||
6 | mod format; | 6 | mod format; |
7 | mod injection; | 7 | mod inject; |
8 | mod macro_rules; | 8 | mod macro_rules; |
9 | 9 | ||
10 | mod html; | 10 | mod html; |
@@ -135,9 +135,7 @@ pub(crate) fn highlight( | |||
135 | if ast::Attr::can_cast(node.kind()) { | 135 | if ast::Attr::can_cast(node.kind()) { |
136 | inside_attribute = false | 136 | inside_attribute = false |
137 | } | 137 | } |
138 | if let Some((new_comments, inj)) = injection::extract_doc_comments(node) { | 138 | inject::doc_comment(&mut hl, node); |
139 | injection::highlight_doc_comment(new_comments, inj, &mut hl); | ||
140 | } | ||
141 | } | 139 | } |
142 | WalkEvent::Enter(NodeOrToken::Node(node)) if ast::Attr::can_cast(node.kind()) => { | 140 | WalkEvent::Enter(NodeOrToken::Node(node)) if ast::Attr::can_cast(node.kind()) => { |
143 | inside_attribute = true | 141 | inside_attribute = true |
@@ -181,7 +179,7 @@ pub(crate) fn highlight( | |||
181 | if let Some(token) = element.as_token().cloned().and_then(ast::String::cast) { | 179 | if let Some(token) = element.as_token().cloned().and_then(ast::String::cast) { |
182 | if token.is_raw() { | 180 | if token.is_raw() { |
183 | let expanded = element_to_highlight.as_token().unwrap().clone(); | 181 | let expanded = element_to_highlight.as_token().unwrap().clone(); |
184 | if injection::highlight_injection(&mut hl, &sema, token, expanded).is_some() { | 182 | if inject::ra_fixture(&mut hl, &sema, token, expanded).is_some() { |
185 | continue; | 183 | continue; |
186 | } | 184 | } |
187 | } | 185 | } |