]>
luflow.net public git repositories - flow-web.git/blob - static/highlight/es/languages/properties.js
1 /*! `properties` grammar compiled for Highlight.js 11.11.1 */
2 var hljsGrammar
= (function () {
7 Contributors: Valentin Aitken <valentin@nalisbg.com>, Egor Rogov <e.rogov@postgrespro.ru>
8 Website: https://en.wikipedia.org/wiki/.properties
12 /** @type LanguageFn */
13 function properties(hljs
) {
14 // whitespaces: space, tab, formfeed
15 const WS0
= '[ \\t\\f]*';
16 const WS1
= '[ \\t\\f]+';
18 const EQUAL_DELIM
= WS0
+ '[:=]' + WS0
;
20 const DELIM
= '(' + EQUAL_DELIM
+ '|' + WS_DELIM
+ ')';
21 const KEY
= '([^\\\\:= \\t\\f\\n]|\\\\.)+';
23 const DELIM_AND_VALUE
= {
28 // value: everything until end of line (again, taking into account backslashes)
33 { begin: '\\\\\\\\' },
41 disableAutodetect: true,
42 case_insensitive: true,
45 hljs
.COMMENT('^\\s*[!#]', '$'),
46 // key: everything until whitespace or = or : (taking into account backslashes)
47 // case of a key-value pair
51 { begin: KEY
+ EQUAL_DELIM
},
52 { begin: KEY
+ WS_DELIM
}
61 starts: DELIM_AND_VALUE
63 // case of an empty key
66 begin: KEY
+ WS0
+ '$'
76 export default hljsGrammar
;