On second thought, we want to preserve the textMate here where all punctuation that are from a Attr be highlited as Attribute
This commit is contained in:
@@ -540,7 +540,6 @@ fn highlight_element(
|
||||
}
|
||||
}
|
||||
p if p.is_punct() => match p {
|
||||
T![#] => HighlightTag::Attribute.into(),
|
||||
T![::] | T![->] | T![=>] | T![&] | T![..] | T![=] | T![@] => {
|
||||
HighlightTag::Operator.into()
|
||||
}
|
||||
@@ -581,6 +580,9 @@ fn highlight_element(
|
||||
_ if element.parent().and_then(ast::DotDotPat::cast).is_some() => {
|
||||
HighlightTag::Operator.into()
|
||||
}
|
||||
_ if element.parent().and_then(ast::Attr::cast).is_some() => {
|
||||
HighlightTag::Attribute.into()
|
||||
}
|
||||
_ => HighlightTag::Punctuation.into(),
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user