We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents abbc7e3 + 04decd5 commit 8e9ccbfCopy full SHA for 8e9ccbf
crates/ide/src/syntax_highlighting.rs
@@ -282,7 +282,10 @@ fn traverse(
282
283
// only attempt to descend if we are inside a macro call or attribute
284
// as calling `descend_into_macros_single` gets rather expensive if done for every single token
285
- let descend_token = current_macro_call.is_some() || current_attr_call.is_some();
+ // additionally, do not descend into comments, descending maps down to doc attributes which get
286
+ // tagged as string literals.
287
+ let descend_token = (current_macro_call.is_some() || current_attr_call.is_some())
288
+ && element.kind() != COMMENT;
289
let element_to_highlight = if descend_token {
290
let token = match &element {
291
NodeOrToken::Node(_) => continue,
0 commit comments