2022-09-20 11:43:28 -04:00
|
|
|
/*! `ini` grammar compiled for Highlight.js 11.6.0 */
|
|
|
|
(()=>{var e=(()=>{"use strict";return e=>{const n=e.regex,a={className:"number",
|
|
|
|
relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]
|
|
|
|
},s=e.COMMENT();s.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const i={
|
2021-03-10 11:35:00 -05:00
|
|
|
className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/
|
2022-09-20 11:43:28 -04:00
|
|
|
}]},t={className:"literal",begin:/\bon|off|true|false|yes|no\b/},r={
|
|
|
|
className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",
|
2021-03-10 11:35:00 -05:00
|
|
|
end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'
|
2022-09-20 11:43:28 -04:00
|
|
|
},{begin:"'",end:"'"}]},l={begin:/\[/,end:/\]/,contains:[s,t,i,r,a,"self"],
|
|
|
|
relevance:0},c=n.either(/[A-Za-z0-9_-]+/,/"(\\"|[^"])*"/,/'[^']*'/);return{
|
|
|
|
name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,
|
|
|
|
contains:[s,{className:"section",begin:/\[+/,end:/\]+/},{
|
|
|
|
begin:n.concat(c,"(\\s*\\.\\s*",c,")*",n.lookahead(/\s*=\s*[^#\s]/)),
|
|
|
|
className:"attr",starts:{end:/$/,contains:[s,l,t,i,r,a]}}]}}})()
|
|
|
|
;hljs.registerLanguage("ini",e)})();
|