diff options
Diffstat (limited to 'node_modules/prismjs/components/prism-graphql.js')
| -rw-r--r-- | node_modules/prismjs/components/prism-graphql.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/node_modules/prismjs/components/prism-graphql.js b/node_modules/prismjs/components/prism-graphql.js new file mode 100644 index 00000000..62990585 --- /dev/null +++ b/node_modules/prismjs/components/prism-graphql.js @@ -0,0 +1,24 @@ +Prism.languages.graphql = { + 'comment': /#.*/, + 'string': { + pattern: /"(?:\\.|[^\\"\r\n])*"/, + greedy: true + }, + 'number': /(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i, + 'boolean': /\b(?:true|false)\b/, + 'variable': /\$[a-z_]\w*/i, + 'directive': { + pattern: /@[a-z_]\w*/i, + alias: 'function' + }, + 'attr-name': /[a-z_]\w*(?=\s*:)/i, + 'keyword': [ + { + pattern: /(fragment\s+(?!on)[a-z_]\w*\s+|\.{3}\s*)on\b/, + lookbehind: true + }, + /\b(?:query|fragment|mutation)\b/ + ], + 'operator': /!|=|\.{3}/, + 'punctuation': /[!(){}\[\]:=,]/ +};
\ No newline at end of file |
