]>
luflow.net public git repositories - flow-web.git/blob - static/highlight/languages/properties.js
1 /*! `properties` grammar compiled for Highlight.js 11.11.1 */
3 var hljsGrammar
= (function () {
8 Contributors: Valentin Aitken <valentin@nalisbg.com>, Egor Rogov <e.rogov@postgrespro.ru>
9 Website: https://en.wikipedia.org/wiki/.properties
13 /** @type LanguageFn */
14 function properties(hljs
) {
15 // whitespaces: space, tab, formfeed
16 const WS0
= '[ \\t\\f]*';
17 const WS1
= '[ \\t\\f]+';
19 const EQUAL_DELIM
= WS0
+ '[:=]' + WS0
;
21 const DELIM
= '(' + EQUAL_DELIM
+ '|' + WS_DELIM
+ ')';
22 const KEY
= '([^\\\\:= \\t\\f\\n]|\\\\.)+';
24 const DELIM_AND_VALUE
= {
29 // value: everything until end of line (again, taking into account backslashes)
34 { begin: '\\\\\\\\' },
42 disableAutodetect: true,
43 case_insensitive: true,
46 hljs
.COMMENT('^\\s*[!#]', '$'),
47 // key: everything until whitespace or = or : (taking into account backslashes)
48 // case of a key-value pair
52 { begin: KEY
+ EQUAL_DELIM
},
53 { begin: KEY
+ WS_DELIM
}
62 starts: DELIM_AND_VALUE
64 // case of an empty key
67 begin: KEY
+ WS0
+ '$'
77 hljs
.registerLanguage('properties', hljsGrammar
);