Skip to content

Commit 66ce871

Browse files
fermadsdncrews
authored andcommitted
Add support for block strings (triple quotes)
As per [GraphqQL RFC](https://facebook.github.io/graphql/draft/#sec-String-Value) and its [implementation](graphql/graphql-spec#327), block strings are being a GraphQL supported feature for a while and are used for GraphiQL documentation. This PR add support for the triple quotes (""") block string.
1 parent 081da0d commit 66ce871

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

GraphQL.sublime-syntax

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,18 @@ contexts:
1313
scope: punctuation.definition.comment.graphql
1414
push: line_comment
1515

16+
- match: (""")
17+
scope: punctuation.definition.comment.begin.graphql
18+
push:
19+
- meta_scope: comment.block.graphql
20+
- match: (""")
21+
scope: punctuation.definition.comment.end.graphql
22+
pop: true
23+
1624
main:
1725
# Strings begin and end with quotes, and use backslashes as an escape
1826
# character
19-
- match: '"'
27+
- match: '"\w+'
2028
scope: punctuation.definition.string.begin.graphql
2129
push: double_quoted_string
2230

0 commit comments

Comments
 (0)