Skip to content

Commit

Permalink
GraphQL: Regexp optimisation and simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
Golmote committed Oct 22, 2017
1 parent 88caabb commit 2474f06
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
@@ -1,7 +1,7 @@
Prism.languages.graphql = {
'comment': /#.*/,
'string': {
pattern: /"(?:\\.|[^\\"])*"/,
pattern: /"(?:\\.|[^\\"\r\n])*"/,
greedy: true
},
'number': /(?:\B-|\b)\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b/,
Expand All @@ -14,7 +14,7 @@ Prism.languages.graphql = {
'attr-name': /[a-z_]\w*(?=\s*:)/i,
'keyword': [
{
pattern: /(fragment\s+(?!on)[a-z_]\w*\s+|\.\.\.\s*)on\b/,
pattern: /(fragment\s+(?!on)[a-z_]\w*\s+|\.{3}\s*)on\b/,
lookbehind: true
},
/\b(?:query|fragment|mutation)\b/
Expand Down
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 2474f06

Please sign in to comment.