File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -261,10 +261,13 @@ fn highlight_ident(node: &LinkedNode) -> Option<Tag> {
261
261
let next_leaf = node. next_leaf ( ) ;
262
262
if let Some ( next) = & next_leaf {
263
263
if node. range ( ) . end == next. offset ( )
264
- && next. kind ( ) == SyntaxKind :: LeftParen
265
- && matches ! ( next. parent_kind( ) , Some ( SyntaxKind :: Args | SyntaxKind :: Params ) )
266
- || ( next. kind ( ) == SyntaxKind :: LeftBracket
267
- && next. parent_kind ( ) == Some ( SyntaxKind :: ContentBlock ) )
264
+ && ( ( next. kind ( ) == SyntaxKind :: LeftParen
265
+ && matches ! (
266
+ next. parent_kind( ) ,
267
+ Some ( SyntaxKind :: Args | SyntaxKind :: Params )
268
+ ) )
269
+ || ( next. kind ( ) == SyntaxKind :: LeftBracket
270
+ && next. parent_kind ( ) == Some ( SyntaxKind :: ContentBlock ) ) )
268
271
{
269
272
return Some ( Tag :: Function ) ;
270
273
}
Original file line number Diff line number Diff line change @@ -38,4 +38,5 @@ $ #hello() $
38
38
$ #hello.world $
39
39
$ #hello.world() $
40
40
$ #box[] $
41
+ #if foo []
41
42
```
You can’t perform that action at this time.
0 commit comments