Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Highlight embedded graphql #187

Merged
merged 1 commit into from
Jan 11, 2017
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
34 changes: 34 additions & 0 deletions grammars/ruby.cson
Original file line number Diff line number Diff line change
Expand Up @@ -1475,6 +1475,40 @@
}
]
}
{
'begin': '(?=(?><<[-~]("?)((?:[_\\w]+_|)GRAPHQL)\\b\\1))'
'comment': 'Heredoc with embedded GraphQL'
'end': '(?!\\G)'
'name': 'meta.embedded.block.graphql'
'patterns': [
{
'begin': '(?><<[-~]("?)((?:[_\\w]+_|)GRAPHQL)\\b\\1)'
'beginCaptures':
'0':
'name': 'punctuation.definition.string.begin.ruby'
'contentName': 'source.graphql'
'end': '\\s*\\2$\\n?'
'endCaptures':
'0':
'name': 'punctuation.definition.string.end.ruby'
'name': 'string.unquoted.heredoc.ruby'
'patterns': [
{
'include': '#heredoc'
}
{
'include': '#interpolated_ruby'
}
{
'include': 'source.graphql'
}
{
'include': '#escaped_char'
}
]
}
]
}
{
'begin': '(?=(?><<[-~]("?)((?:[_\\w]+_|)CSS)\\b\\1))'
'comment': 'Heredoc with embedded css'
Expand Down