-
Notifications
You must be signed in to change notification settings - Fork 79
Expand file tree
/
Copy pathee-lang.js
More file actions
executable file
·61 lines (58 loc) · 1.33 KB
/
ee-lang.js
File metadata and controls
executable file
·61 lines (58 loc) · 1.33 KB
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
61
/*!
* This source file is part of the open source project
* ExpressionEngine User Guide (https://github.com/ExpressionEngine/ExpressionEngine-User-Guide)
*
* @link https://expressionengine.com/
* @copyright Copyright (c) 2003-2019, EllisLab, Inc. (https://ellislab.com)
* @license https://expressionengine.com/license Licensed under Apache License, Version 2.0
*/
module.exports = function(hljs) {
var ATTR_ASSIGNMENT = {
illegal: /\}/,
begin: /[a-zA-Z0-9_]+=/,
returnBegin: true,
relevance: 0,
contains: [{
className: 'attr',
begin: /[a-zA-Z0-9_]+/
}]
}
return {
aliases: ['expressionengine', 'eecms'],
case_insensitive: true,
subLanguage: 'xml',
contains: [
hljs.COMMENT('{!--', '--}'),
{
className: 'template-tag',
begin: /{\/?/,
end: /}/,
contains: [
{
className: 'name',
begin: /[a-zA-Z][a-zA-Z:\.\-_0-9]+/,
lexemes: '[a-zA-Z][a-zA-Z0-9_:]*',
relevance: 0,
keywords: {
keyword: 'if if:else if:elseif',
},
starts: {
endsWithParent: true,
relevance: 0,
keywords: {
keyword: 'and or xor',
literal: 'false true null'
},
contains: [
hljs.QUOTE_STRING_MODE,
hljs.APOS_STRING_MODE,
ATTR_ASSIGNMENT,
hljs.NUMBER_MODE
]
}
}
]
},
]
}
}