Skip to content

Commit bb98df4

Browse files
author
Akshay Hegde
committed
Fix syntax coloring in string interpolation
Start the match just before the \( part
1 parent 9fb609e commit bb98df4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

syntax/swift.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ delfunction s:CommentKeywordMatch
5454
" Literals
5555
" Strings
5656
syntax region swiftString start=/"/ skip=/\\\\\|\\"/ end=/"/ contains=swiftInterpolatedWrapper oneline
57-
syntax region swiftInterpolatedWrapper start="\v[^\\]\\\(\s*" end="\v\s*\)" contained containedin=swiftString contains=swiftInterpolatedString,swiftString oneline
57+
syntax region swiftInterpolatedWrapper start="\v[^\\]\zs\\\(\s*" end="\v\s*\)" contained containedin=swiftString contains=swiftInterpolatedString,swiftString oneline
5858
syntax match swiftInterpolatedString "\v\w+(\(\))?" contained containedin=swiftInterpolatedWrapper oneline
5959

6060
" Numbers

0 commit comments

Comments
 (0)