1 | Prism.languages.editorconfig = {
|
2 | // https://editorconfig-specification.readthedocs.io
|
3 | 'comment': /[;#].*/,
|
4 | 'section': {
|
5 | pattern: /(^[ \t]*)\[.+\]/m,
|
6 | lookbehind: true,
|
7 | alias: 'selector',
|
8 | inside: {
|
9 | 'regex': /\\\\[\[\]{},!?.*]/, // Escape special characters with '\\'
|
10 | 'operator': /[!?]|\.\.|\*{1,2}/,
|
11 | 'punctuation': /[\[\]{},]/
|
12 | }
|
13 | },
|
14 | 'key': {
|
15 | pattern: /(^[ \t]*)[^\s=]+(?=[ \t]*=)/m,
|
16 | lookbehind: true,
|
17 | alias: 'attr-name'
|
18 | },
|
19 | 'value': {
|
20 | pattern: /=.*/,
|
21 | alias: 'attr-value',
|
22 | inside: {
|
23 | 'punctuation': /^=/
|
24 | }
|
25 | }
|
26 | };
|