main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
775 bytes
|
Line | |
---|
1 | 'use strict'
|
---|
2 |
|
---|
3 | module.exports = json
|
---|
4 | json.displayName = 'json'
|
---|
5 | json.aliases = ['webmanifest']
|
---|
6 | function json(Prism) {
|
---|
7 | // https://www.json.org/json-en.html
|
---|
8 | Prism.languages.json = {
|
---|
9 | property: {
|
---|
10 | pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,
|
---|
11 | lookbehind: true,
|
---|
12 | greedy: true
|
---|
13 | },
|
---|
14 | string: {
|
---|
15 | pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,
|
---|
16 | lookbehind: true,
|
---|
17 | greedy: true
|
---|
18 | },
|
---|
19 | comment: {
|
---|
20 | pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,
|
---|
21 | greedy: true
|
---|
22 | },
|
---|
23 | number: /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,
|
---|
24 | punctuation: /[{}[\],]/,
|
---|
25 | operator: /:/,
|
---|
26 | boolean: /\b(?:false|true)\b/,
|
---|
27 | null: {
|
---|
28 | pattern: /\bnull\b/,
|
---|
29 | alias: 'keyword'
|
---|
30 | }
|
---|
31 | }
|
---|
32 | Prism.languages.webmanifest = Prism.languages.json
|
---|
33 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.