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:
530 bytes
|
Line | |
---|
1 | (function (Prism) {
|
---|
2 |
|
---|
3 | var string = /("|')(?:\\(?:\r\n?|\n|.)|(?!\1)[^\\\r\n])*\1/;
|
---|
4 |
|
---|
5 | Prism.languages.json5 = Prism.languages.extend('json', {
|
---|
6 | 'property': [
|
---|
7 | {
|
---|
8 | pattern: RegExp(string.source + '(?=\\s*:)'),
|
---|
9 | greedy: true
|
---|
10 | },
|
---|
11 | {
|
---|
12 | pattern: /(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/,
|
---|
13 | alias: 'unquoted'
|
---|
14 | }
|
---|
15 | ],
|
---|
16 | 'string': {
|
---|
17 | pattern: string,
|
---|
18 | greedy: true
|
---|
19 | },
|
---|
20 | 'number': /[+-]?\b(?:NaN|Infinity|0x[a-fA-F\d]+)\b|[+-]?(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+\b)?/
|
---|
21 | });
|
---|
22 |
|
---|
23 | }(Prism));
|
---|
Note:
See
TracBrowser
for help on using the repository browser.