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/haml.js | 106 ++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 node_modules/highlight.js/lib/languages/haml.js (limited to 'node_modules/highlight.js/lib/languages/haml.js') diff --git a/node_modules/highlight.js/lib/languages/haml.js b/node_modules/highlight.js/lib/languages/haml.js new file mode 100644 index 000000000..c8d0b6d86 --- /dev/null +++ b/node_modules/highlight.js/lib/languages/haml.js @@ -0,0 +1,106 @@ +module.exports = // TODO support filter tags like :javascript, support inline HTML +function(hljs) { + return { + case_insensitive: true, + contains: [ + { + className: 'meta', + begin: '^!!!( (5|1\\.1|Strict|Frameset|Basic|Mobile|RDFa|XML\\b.*))?$', + relevance: 10 + }, + // FIXME these comments should be allowed to span indented lines + hljs.COMMENT( + '^\\s*(!=#|=#|-#|/).*$', + false, + { + relevance: 0 + } + ), + { + begin: '^\\s*(-|=|!=)(?!#)', + starts: { + end: '\\n', + subLanguage: 'ruby' + } + }, + { + className: 'tag', + begin: '^\\s*%', + contains: [ + { + className: 'selector-tag', + begin: '\\w+' + }, + { + className: 'selector-id', + begin: '#[\\w-]+' + }, + { + className: 'selector-class', + begin: '\\.[\\w-]+' + }, + { + begin: '{\\s*', + end: '\\s*}', + contains: [ + { + begin: ':\\w+\\s*=>', + end: ',\\s+', + returnBegin: true, + endsWithParent: true, + contains: [ + { + className: 'attr', + begin: ':\\w+' + }, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + { + begin: '\\w+', + relevance: 0 + } + ] + } + ] + }, + { + begin: '\\(\\s*', + end: '\\s*\\)', + excludeEnd: true, + contains: [ + { + begin: '\\w+\\s*=', + end: '\\s+', + returnBegin: true, + endsWithParent: true, + contains: [ + { + className: 'attr', + begin: '\\w+', + relevance: 0 + }, + hljs.APOS_STRING_MODE, + hljs.QUOTE_STRING_MODE, + { + begin: '\\w+', + relevance: 0 + } + ] + } + ] + } + ] + }, + { + begin: '^\\s*[=~]\\s*' + }, + { + begin: '#{', + starts: { + end: '}', + subLanguage: 'ruby' + } + } + ] + }; +}; \ No newline at end of file -- cgit v1.2.3