Skip to content

Commit 32f70fa

Browse files
authored
Fix highlighting for nested multiline comments (#22)
* Fix highlighting for nested multiline comments * Fix bad highlighting when mixing single and multie line comments
1 parent d2e9a90 commit 32f70fa

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

syntax/rescript.vim

+4-3
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ syntax match resArrowPipe "\v\|\>"
5656
syntax match resArrowPipe "\v\@\@"
5757

5858
" Comment
59-
syntax region resComment start="//" end="$" contains=resTodo,@Spell
60-
syntax region resComment start="/\*\s*" end="\*/" contains=@Spell,resTodo
59+
syntax region resSingleLineComment start="//" end="$" contains=resTodo,@Spell
60+
syntax region resMultiLineComment start="/\*\s*" end="\*/" contains=@Spell,resTodo,resMultiLineComment
6161

6262
syntax keyword resTodo contained TODO FIXME XXX NOTE
6363

@@ -93,7 +93,8 @@ highlight default link resKeyword Keyword
9393
highlight default link resType Type
9494
highlight default link resOperator Operator
9595
highlight default link resArrowPipe Operator
96-
highlight default link resComment Comment
96+
highlight default link resSingleLineComment Comment
97+
highlight default link resMultiLineComment Comment
9798
highlight default link resTodo TODO
9899
highlight default link resChar Character
99100
highlight default link resNumber Number

0 commit comments

Comments
 (0)