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 --- .../highlight.js/lib/languages/autohotkey.js | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 node_modules/highlight.js/lib/languages/autohotkey.js (limited to 'node_modules/highlight.js/lib/languages/autohotkey.js') diff --git a/node_modules/highlight.js/lib/languages/autohotkey.js b/node_modules/highlight.js/lib/languages/autohotkey.js new file mode 100644 index 000000000..3c15fc549 --- /dev/null +++ b/node_modules/highlight.js/lib/languages/autohotkey.js @@ -0,0 +1,47 @@ +module.exports = function(hljs) { + var BACKTICK_ESCAPE = { + begin: /`[\s\S]/ + }; + + return { + case_insensitive: true, + keywords: { + keyword: 'Break Continue Else Gosub If Loop Return While', + literal: 'A|0 true false NOT AND OR', + built_in: 'ComSpec Clipboard ClipboardAll ErrorLevel', + }, + contains: [ + { + className: 'built_in', + begin: 'A_[a-zA-Z0-9]+' + }, + BACKTICK_ESCAPE, + hljs.inherit(hljs.QUOTE_STRING_MODE, {contains: [BACKTICK_ESCAPE]}), + hljs.COMMENT(';', '$', {relevance: 0}), + { + className: 'number', + begin: hljs.NUMBER_RE, + relevance: 0 + }, + { + className: 'variable', // FIXME + begin: '%', end: '%', + illegal: '\\n', + contains: [BACKTICK_ESCAPE] + }, + { + className: 'symbol', + contains: [BACKTICK_ESCAPE], + variants: [ + {begin: '^[^\\n";]+::(?!=)'}, + {begin: '^[^\\n";]+:(?!=)', relevance: 0} // zero relevance as it catches a lot of things + // followed by a single ':' in many languages + ] + }, + { + // consecutive commas, not for highlighting but just for relevance + begin: ',\\s*,' + } + ] + } +}; \ No newline at end of file -- cgit v1.2.3