Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for block strings (triple quotes) #6

Merged
merged 1 commit into from
Jun 17, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion GraphQL.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -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+'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needed for normal strings (single double-quotes) to not match multi-line strings (triple double-quotes)

scope: punctuation.definition.string.begin.graphql
push: double_quoted_string

Expand Down