source: node_modules/refractor/lang/editorconfig.js

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: 781 bytes
RevLine 
[d24f17c]1'use strict'
2
3module.exports = editorconfig
4editorconfig.displayName = 'editorconfig'
5editorconfig.aliases = []
6function editorconfig(Prism) {
7 Prism.languages.editorconfig = {
8 // https://editorconfig-specification.readthedocs.io
9 comment: /[;#].*/,
10 section: {
11 pattern: /(^[ \t]*)\[.+\]/m,
12 lookbehind: true,
13 alias: 'selector',
14 inside: {
15 regex: /\\\\[\[\]{},!?.*]/,
16 // Escape special characters with '\\'
17 operator: /[!?]|\.\.|\*{1,2}/,
18 punctuation: /[\[\]{},]/
19 }
20 },
21 key: {
22 pattern: /(^[ \t]*)[^\s=]+(?=[ \t]*=)/m,
23 lookbehind: true,
24 alias: 'attr-name'
25 },
26 value: {
27 pattern: /=.*/,
28 alias: 'attr-value',
29 inside: {
30 punctuation: /^=/
31 }
32 }
33 }
34}
Note: See TracBrowser for help on using the repository browser.