Skip to content
New issue

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

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

Already on GitHub? # to your account

Add support for block strings (triple quotes) #6

Merged
merged 1 commit into from
Jun 17, 2019

Conversation

fermads
Copy link
Contributor

@fermads fermads commented Dec 2, 2018

As per GraphQL RFC and its implementation, block strings are part of the spec for a while as a way to add multi-line documentation to GraphQL types. This PR adds syntax highlight support for triple quotes (""") block strings.

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.
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)

@Conjuror
Copy link

Conjuror commented Jun 5, 2019

This is helpful. Please consider to merge it :)

@fermads
Copy link
Contributor Author

fermads commented Jun 16, 2019

I don't have merge access 😢 Waiting for the repo owner to approve.

@dncrews
Copy link
Owner

dncrews commented Jun 17, 2019

Sorry mate. I don't know how I never saw this originally.

@dncrews dncrews merged commit 66ce871 into dncrews:master Jun 17, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants