Skip to content

Commit

Permalink
Improved field highlighting for GraphQL (#1711)
Browse files Browse the repository at this point in the history
Adds highlighting for GraphQL fields with arguments.
  • Loading branch information
kuldar authored and RunDevelopment committed Jan 17, 2019
1 parent b94b56c commit 44aeffb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions components/prism-graphql.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Prism.languages.graphql = {
pattern: /@[a-z_]\w*/i,
alias: 'function'
},
'attr-name': /[a-z_]\w*(?=\s*:)/i,
'attr-name': /[a-z_]\w*(?=\s*(?:\([^()]*\))?:)/i,
'keyword': [
{
pattern: /(fragment\s+(?!on)[a-z_]\w*\s+|\.{3}\s*)on\b/,
Expand All @@ -21,4 +21,4 @@ Prism.languages.graphql = {
],
'operator': /!|=|\.{3}/,
'punctuation': /[!(){}\[\]:=,]/
};
};
2 changes: 1 addition & 1 deletion components/prism-graphql.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 44aeffb

Please sign in to comment.