From ae22565c88738c769ec2a3cb57354d7701a2e115 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Mi=C3=A7alli?= Date: Sat, 1 Dec 2018 16:32:31 -0800 Subject: [PATCH] Add support for block strings (triple quotes) As per [GraphqQL RFC](https://facebook.github.io/graphql/draft/#sec-String-Value) and its [implementation](https://github.com/facebook/graphql/pull/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. --- GraphQL.sublime-syntax | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/GraphQL.sublime-syntax b/GraphQL.sublime-syntax index e57c321..2d52a02 100644 --- a/GraphQL.sublime-syntax +++ b/GraphQL.sublime-syntax @@ -13,10 +13,18 @@ contexts: scope: punctuation.definition.comment.graphql push: line_comment + - match: (""") + scope: punctuation.definition.comment.begin.graphql + push: + - meta_scope: comment.block.graphql + - match: (""") + scope: punctuation.definition.comment.end.graphql + pop: true + main: # Strings begin and end with quotes, and use backslashes as an escape # character - - match: '"' + - match: '"\w+' scope: punctuation.definition.string.begin.graphql push: double_quoted_string