mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
Syntax highlighting for documentation comments on macro definitions
This commit is contained in:
parent
491eda61e3
commit
df5b37cb61
3 changed files with 19 additions and 2 deletions
|
@ -121,7 +121,6 @@ pub(crate) fn highlight(
|
|||
assert!(current_macro_call == Some(mc));
|
||||
current_macro_call = None;
|
||||
format_string = None;
|
||||
continue;
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
|
@ -150,7 +149,7 @@ pub(crate) fn highlight(
|
|||
|
||||
let range = element.text_range();
|
||||
|
||||
let element_to_highlight = if current_macro_call.is_some() {
|
||||
let element_to_highlight = if current_macro_call.is_some() && element.kind() != COMMENT {
|
||||
// Inside a macro -- expand it first
|
||||
let token = match element.clone().into_token() {
|
||||
Some(it) if it.parent().kind() == TOKEN_TREE => it,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue