From 7a3df06eb573d36142bd1a8e03c5ce8752d300b3 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 24 May 2017 15:10:37 +0200 Subject: fix build issues and add typedoc --- node_modules/highlight.js/lib/languages/ini.js | 65 ++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 node_modules/highlight.js/lib/languages/ini.js (limited to 'node_modules/highlight.js/lib/languages/ini.js') diff --git a/node_modules/highlight.js/lib/languages/ini.js b/node_modules/highlight.js/lib/languages/ini.js new file mode 100644 index 000000000..f2f94166b --- /dev/null +++ b/node_modules/highlight.js/lib/languages/ini.js @@ -0,0 +1,65 @@ +module.exports = function(hljs) { + var STRING = { + className: "string", + contains: [hljs.BACKSLASH_ESCAPE], + variants: [ + { + begin: "'''", end: "'''", + relevance: 10 + }, { + begin: '"""', end: '"""', + relevance: 10 + }, { + begin: '"', end: '"' + }, { + begin: "'", end: "'" + } + ] + }; + return { + aliases: ['toml'], + case_insensitive: true, + illegal: /\S/, + contains: [ + hljs.COMMENT(';', '$'), + hljs.HASH_COMMENT_MODE, + { + className: 'section', + begin: /^\s*\[+/, end: /\]+/ + }, + { + begin: /^[a-z0-9\[\]_-]+\s*=\s*/, end: '$', + returnBegin: true, + contains: [ + { + className: 'attr', + begin: /[a-z0-9\[\]_-]+/ + }, + { + begin: /=/, endsWithParent: true, + relevance: 0, + contains: [ + { + className: 'literal', + begin: /\bon|off|true|false|yes|no\b/ + }, + { + className: 'variable', + variants: [ + {begin: /\$[\w\d"][\w\d_]*/}, + {begin: /\$\{(.*?)}/} + ] + }, + STRING, + { + className: 'number', + begin: /([\+\-]+)?[\d]+_[\d_]+/ + }, + hljs.NUMBER_MODE + ] + } + ] + } + ] + }; +}; \ No newline at end of file -- cgit v1.2.3