1
|
{"version":3,"file":"highlight/ini.js?v=399de0961c87502704e9","mappings":"2GASA,SAASA,EAAOC,GACd,OAAKA,EACa,iBAAPA,EAAwBA,EAE5BA,EAAGD,OAHM,IAIlB,CAcA,SAASE,KAAUC,GAEjB,OADeA,EAAKC,KAAKC,GAAML,EAAOK,KAAIC,KAAK,GAEjD,CA6IAC,EAAOC,QAvHP,SAAaC,GACX,MAAMC,EAAU,CACdC,UAAW,SACXC,UAAW,EACXC,SAAU,CACR,CACEC,MAAO,wBAET,CACEA,MAAOL,EAAKM,aAIZC,EAAWP,EAAKQ,UACtBD,EAASH,SAAW,CAClB,CACEC,MAAO,IACPI,IAAK,KAEP,CACEJ,MAAO,IACPI,IAAK,MAGT,MAAMC,EAAY,CAChBR,UAAW,WACXE,SAAU,CACR,CACEC,MAAO,qBAET,CACEA,MAAO,iBAIPM,EAAW,CACfT,UAAW,UACXG,MAAO,gCAEHO,EAAU,CACdV,UAAW,SACXW,SAAU,CAACb,EAAKc,kBAChBV,SAAU,CACR,CACEC,MAAO,MACPI,IAAK,MACLN,UAAW,IAEb,CACEE,MAAO,MACPI,IAAK,MACLN,UAAW,IAEb,CACEE,MAAO,IACPI,IAAK,KAEP,CACEJ,MAAO,IACPI,IAAK,OAILM,EAAQ,CACZV,MAAO,KACPI,IAAK,KACLI,SAAU,CACRN,EACAI,EACAD,EACAE,EACAX,EACA,QAEFE,UAAW,GAMPa,EA7FR,YAAmBtB,GAEjB,MADe,IAAMA,EAAKC,KAAKC,GAAML,EAAOK,KAAIC,KAAK,KAAO,GAE9D,CA0FkBoB,CAHC,iBACe,gBACA,WAShC,MAAO,CACLC,KAAM,iBACNC,QAAS,CAAC,QACVC,kBAAkB,EAClBC,QAAS,KACTR,SAAU,CACRN,EACA,CACEL,UAAW,UACXG,MAAO,MACPI,IAAK,OAEP,CACEJ,MAlBaZ,EACjBuB,EAAS,eAAgBA,EAAS,KApH7BvB,EAAO,MAqHF,gBArHa,MAsInBS,UAAW,OACXoB,OAAQ,CACNb,IAAK,IACLI,SAAU,CACRN,EACAQ,EACAJ,EACAD,EACAE,EACAX,MAMZ,C","sources":["webpack:///text/node_modules/highlight.js/lib/languages/ini.js"],"sourcesContent":["/**\n * @param {string} value\n * @returns {RegExp}\n * */\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction source(re) {\n if (!re) return null;\n if (typeof re === \"string\") return re;\n\n return re.source;\n}\n\n/**\n * @param {RegExp | string } re\n * @returns {string}\n */\nfunction lookahead(re) {\n return concat('(?=', re, ')');\n}\n\n/**\n * @param {...(RegExp | string) } args\n * @returns {string}\n */\nfunction concat(...args) {\n const joined = args.map((x) => source(x)).join(\"\");\n return joined;\n}\n\n/**\n * Any of the passed expresssions may match\n *\n * Creates a huge this | this | that | that match\n * @param {(RegExp | string)[] } args\n * @returns {string}\n */\nfunction either(...args) {\n const joined = '(' + args.map((x) => source(x)).join(\"|\") + \")\";\n return joined;\n}\n\n/*\nLanguage: TOML, also INI\nDescription: TOML aims to be a minimal configuration file format that's easy to read due to obvious semantics.\nContributors: Guillaume Gomez <guillaume1.gomez@gmail.com>\nCategory: common, config\nWebsite: https://github.com/toml-lang/toml\n*/\n\nfunction ini(hljs) {\n const NUMBERS = {\n className: 'number',\n relevance: 0,\n variants: [\n {\n begin: /([+-]+)?[\\d]+_[\\d_]+/\n },\n {\n begin: hljs.NUMBER_RE\n }\n ]\n };\n const COMMENTS = hljs.COMMENT();\n COMMENTS.variants = [\n {\n begin: /;/,\n end: /$/\n },\n {\n begin: /#/,\n end: /$/\n }\n ];\n const VARIABLES = {\n className: 'variable',\n variants: [\n {\n begin: /\\$[\\w\\d\"][\\w\\d_]*/\n },\n {\n begin: /\\$\\{(.*?)\\}/\n }\n ]\n };\n const LITERALS = {\n className: 'literal',\n begin: /\\bon|off|true|false|yes|no\\b/\n };\n const STRINGS = {\n className: \"string\",\n contains: [hljs.BACKSLASH_ESCAPE],\n variants: [\n {\n begin: \"'''\",\n end: \"'''\",\n relevance: 10\n },\n {\n begin: '\"\"\"',\n end: '\"\"\"',\n relevance: 10\n },\n {\n begin: '\"',\n end: '\"'\n },\n {\n begin: \"'\",\n end: \"'\"\n }\n ]\n };\n const ARRAY = {\n begin: /\\[/,\n end: /\\]/,\n contains: [\n COMMENTS,\n LITERALS,\n VARIABLES,\n STRINGS,\n NUMBERS,\n 'self'\n ],\n relevance: 0\n };\n\n const BARE_KEY = /[A-Za-z0-9_-]+/;\n const QUOTED_KEY_DOUBLE_QUOTE = /\"(\\\\\"|[^\"])*\"/;\n const QUOTED_KEY_SINGLE_QUOTE = /'[^']*'/;\n const ANY_KEY = either(\n BARE_KEY, QUOTED_KEY_DOUBLE_QUOTE, QUOTED_KEY_SINGLE_QUOTE\n );\n const DOTTED_KEY = concat(\n ANY_KEY, '(\\\\s*\\\\.\\\\s*', ANY_KEY, ')*',\n lookahead(/\\s*=\\s*[^#\\s]/)\n );\n\n return {\n name: 'TOML, also INI',\n aliases: ['toml'],\n case_insensitive: true,\n illegal: /\\S/,\n contains: [\n COMMENTS,\n {\n className: 'section',\n begin: /\\[+/,\n end: /\\]+/\n },\n {\n begin: DOTTED_KEY,\n className: 'attr',\n starts: {\n end: /$/,\n contains: [\n COMMENTS,\n ARRAY,\n LITERALS,\n VARIABLES,\n STRINGS,\n NUMBERS\n ]\n }\n }\n ]\n };\n}\n\nmodule.exports = ini;\n"],"names":["source","re","concat","args","map","x","join","module","exports","hljs","NUMBERS","className","relevance","variants","begin","NUMBER_RE","COMMENTS","COMMENT","end","VARIABLES","LITERALS","STRINGS","contains","BACKSLASH_ESCAPE","ARRAY","ANY_KEY","either","name","aliases","case_insensitive","illegal","starts"],"sourceRoot":""}
|