Skip to content

Commit 3a7336a

Browse files
committed
Match in terms of ReasonML multiline strings
1 parent a1e2551 commit 3a7336a

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

after/syntax/reason/graphql.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ syn include @GraphQLSyntax syntax/graphql.vim
2929
if exists('s:current_syntax')
3030
let b:current_syntax = s:current_syntax
3131
endif
32-
syntax region graphqlExtensionPoint start=/\[%graphql\_s*{|/ end=/|}\_s*\]/ contains=@GraphQLSyntax,reasonTemplateExpression keepend
33-
hi def link graphqlExtensionPoint reasonTaggedTemplate
32+
33+
syntax region graphqlMultilineString matchgroup=reasonMultilineString start=+graphql\_s*\zs{|+ end=+|}+ contains=@GraphQLSyntax,reasonEscape,reasonEscapeUnicode,reasonEscapeError,reasonStringContinuation keepend

test/reason/default.vader

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Before:
22
source ../after/syntax/reason/graphql.vim
33

44
Execute (Expected syntax groups):
5-
Assert graphql#has_syntax_group('graphqlExtensionPoint')
5+
Assert graphql#has_syntax_group('graphqlMultilineString')
66

77
Given reason (Template):
88
[%graphql {|
@@ -15,6 +15,4 @@ Given reason (Template):
1515
|}];
1616

1717
Execute (Syntax assertions):
18-
" AssertEqual 'graphqlTaggedTemplate', SyntaxOf('gql')
19-
" AssertEqual 'graphqlTemplateString', SyntaxOf('`')
2018
AssertEqual 'graphqlName', SyntaxOf('user')

0 commit comments

Comments
 (0)