]> luflow.net public git repositories - flow-web.git/blob - static/highlight/languages/dust.js
Initial commit.
[flow-web.git] / static / highlight / languages / dust.js
1 /*! `dust` grammar compiled for Highlight.js 11.11.1 */
2 (function(){
3 var hljsGrammar = (function () {
4 'use strict';
5
6 /*
7 Language: Dust
8 Requires: xml.js
9 Author: Michael Allen <michael.allen@benefitfocus.com>
10 Description: Matcher for dust.js templates.
11 Website: https://www.dustjs.com
12 Category: template
13 */
14
15 /** @type LanguageFn */
16 function dust(hljs) {
17 const EXPRESSION_KEYWORDS = 'if eq ne lt lte gt gte select default math sep';
18 return {
19 name: 'Dust',
20 aliases: [ 'dst' ],
21 case_insensitive: true,
22 subLanguage: 'xml',
23 contains: [
24 {
25 className: 'template-tag',
26 begin: /\{[#\/]/,
27 end: /\}/,
28 illegal: /;/,
29 contains: [
30 {
31 className: 'name',
32 begin: /[a-zA-Z\.-]+/,
33 starts: {
34 endsWithParent: true,
35 relevance: 0,
36 contains: [ hljs.QUOTE_STRING_MODE ]
37 }
38 }
39 ]
40 },
41 {
42 className: 'template-variable',
43 begin: /\{/,
44 end: /\}/,
45 illegal: /;/,
46 keywords: EXPRESSION_KEYWORDS
47 }
48 ]
49 };
50 }
51
52 return dust;
53
54 })();
55
56 hljs.registerLanguage('dust', hljsGrammar);
57 })();