1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
!(function (e) {
e.languages.velocity = e.languages.extend('markup', {});
var n = {
variable: {
pattern:
/(^|[^\\](?:\\\\)*)\$!?(?:[a-z][\w-]*(?:\([^)]*\))?(?:\.[a-z][\w-]*(?:\([^)]*\))?|\[[^\]]+\])*|\{[^}]+\})/i,
lookbehind: !0,
inside: {},
},
string: { pattern: /"[^"]*"|'[^']*'/, greedy: !0 },
number: /\b\d+\b/,
boolean: /\b(?:false|true)\b/,
operator: /[=!<>]=?|[+*/%-]|&&|\|\||\.\.|\b(?:eq|g[et]|l[et]|n(?:e|ot))\b/,
punctuation: /[(){}[\]:,.]/,
};
(n.variable.inside = {
string: n.string,
function: { pattern: /([^\w-])[a-z][\w-]*(?=\()/, lookbehind: !0 },
number: n.number,
boolean: n.boolean,
punctuation: n.punctuation,
}),
e.languages.insertBefore('velocity', 'comment', {
unparsed: {
pattern: /(^|[^\\])#\[\[[\s\S]*?\]\]#/,
lookbehind: !0,
greedy: !0,
inside: { punctuation: /^#\[\[|\]\]#$/ },
},
'velocity-comment': [
{
pattern: /(^|[^\\])#\*[\s\S]*?\*#/,
lookbehind: !0,
greedy: !0,
alias: 'comment',
},
{
pattern: /(^|[^\\])##.*/,
lookbehind: !0,
greedy: !0,
alias: 'comment',
},
],
directive: {
pattern:
/(^|[^\\](?:\\\\)*)#@?(?:[a-z][\w-]*|\{[a-z][\w-]*\})(?:\s*\((?:[^()]|\([^()]*\))*\))?/i,
lookbehind: !0,
inside: {
keyword: {
pattern: /^#@?(?:[a-z][\w-]*|\{[a-z][\w-]*\})|\bin\b/,
inside: { punctuation: /[{}]/ },
},
rest: n,
},
},
variable: n.variable,
}),
(e.languages.velocity.tag.inside['attr-value'].inside.rest =
e.languages.velocity);
})(Prism);
|