You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
549 B
26 lines
549 B
Prism.languages.editorconfig = { |
|
// https://editorconfig-specification.readthedocs.io |
|
'comment': /[;#].*/, |
|
'section': { |
|
pattern: /(^[ \t]*)\[.+\]/m, |
|
lookbehind: true, |
|
alias: 'selector', |
|
inside: { |
|
'regex': /\\\\[\[\]{},!?.*]/, // Escape special characters with '\\' |
|
'operator': /[!?]|\.\.|\*{1,2}/, |
|
'punctuation': /[\[\]{},]/ |
|
} |
|
}, |
|
'key': { |
|
pattern: /(^[ \t]*)[^\s=]+(?=[ \t]*=)/m, |
|
lookbehind: true, |
|
alias: 'attr-name' |
|
}, |
|
'value': { |
|
pattern: /=.*/, |
|
alias: 'attr-value', |
|
inside: { |
|
'punctuation': /^=/ |
|
} |
|
} |
|
};
|
|
|