]>
luflow.net public git repositories - flow-web.git/blob - static/highlight/es/languages/ini.js
1 /*! `ini` grammar compiled for Highlight.js 11.11.1 */
2 var hljsGrammar
= (function () {
6 Language: TOML, also INI
7 Description: TOML aims to be a minimal configuration file format that's easy to read due to obvious semantics.
8 Contributors: Guillaume Gomez <guillaume1.gomez@gmail.com>
9 Category: common, config
10 Website: https://github.com/toml-lang/toml
14 const regex
= hljs
.regex
;
19 { begin: /([+-]+)?[\d]+_[\d_]+/ },
20 { begin: hljs
.NUMBER_RE
}
23 const COMMENTS
= hljs
.COMMENT();
35 className: 'variable',
37 { begin: /\$[\w\d"][\w\d_]*/ },
38 { begin: /\$\{(.*?)\}/ }
43 begin: /\bon|off|true|false|yes|no\b/
47 contains: [ hljs
.BACKSLASH_ESCAPE
],
83 const BARE_KEY
= /[A-Za-z0-9_-]+/;
84 const QUOTED_KEY_DOUBLE_QUOTE
= /"(\\"|[^"])*"/;
85 const QUOTED_KEY_SINGLE_QUOTE
= /'[^']*'/;
86 const ANY_KEY
= regex
.either(
87 BARE_KEY
, QUOTED_KEY_DOUBLE_QUOTE
, QUOTED_KEY_SINGLE_QUOTE
89 const DOTTED_KEY
= regex
.concat(
90 ANY_KEY
, '(\\s*\\.\\s*', ANY_KEY
, ')*',
91 regex
.lookahead(/\s*=\s*[^#\s]/)
95 name: 'TOML, also INI',
97 case_insensitive: true,
102 className: 'section',
129 export default hljsGrammar
;