Skip to content

Commit 3494a23

Browse files
committed
[VIM] Fix syntax highlighting of nested comments
This example incorrectly highlights 'foo' as a comment: /* // */ foo This example does as well: // /* foo */ foo
1 parent 0b328f7 commit 3494a23

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

utils/vim/syntax/swift.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,9 @@ syn region swiftString contains=swiftInterpolationRegion
180180
\ start=/"/ skip=/\\\\\|\\"/ end=/"/
181181
syn region swiftInterpolationRegion contained contains=TOP
182182
\ matchgroup=swiftInterpolation start=/\\(/ end=/)/
183-
syn region swiftComment contains=swiftComment,swiftLineComment,swiftTodo
183+
syn region swiftComment contains=swiftComment,swiftTodo
184184
\ start="/\*" end="\*/"
185-
syn region swiftLineComment contains=swiftComment,swiftTodo
185+
syn region swiftLineComment contains=swiftTodo
186186
\ start="//" end="$"
187187

188188
syn match swiftDecimal

0 commit comments

Comments
 (0)