-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmovable_type.syntax
162 lines (162 loc) · 4.39 KB
/
movable_type.syntax
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
---
name: Movable Type
fileTypes:
- mtml
firstLineMatch: <\$?MT
scopeName: text.html.mt
repository:
tag-stuff:
patterns:
- include: "#tag-generic-attribute"
- include: "#string-double-quoted"
- include: "#string-single-quoted"
string-double-quoted:
name: string.quoted.double.html
endCaptures:
"0":
name: punctuation.definition.string.end.html
begin: "\""
beginCaptures:
"0":
name: punctuation.definition.string.begin.html
end: "\""
patterns:
- include: "#embedded-code"
- include: "#entities"
mt-container-tag:
patterns:
- name: meta.tag.mt.container.html
endCaptures:
"0":
name: punctuation.definition.tag.mt
begin: (</?)(MT\w+)
beginCaptures:
"1":
name: punctuation.definition.tag.mt
"2":
name: entity.name.tag.mt
end: ">"
patterns:
- include: "#tag-stuff"
php:
patterns:
- name: source.php.embedded.html
captures:
"1":
name: punctuation.section.embedded.php
begin: (?:^\s*)(<\?(php|=)?)(?!.*\?>)
end: (\?>)(?:\s*$\n)?
patterns:
- include: "#php-source"
comment: match only multi-line PHP with leading whitespace
- name: source.php.embedded.html
captures:
"0":
name: punctuation.section.embedded.php
begin: <\?(php|=)?
end: \?>
patterns:
- include: "#php-source"
mt-variable-tag:
patterns:
- name: meta.tag.mt.variable.html
endCaptures:
"1":
name: variable.other.mt
"2":
name: punctuation.definition.tag.mt
begin: (<)(\$MT\w+)
beginCaptures:
"1":
name: punctuation.definition.tag.mt
"2":
name: variable.other.mt
end: (\$)?(>)
patterns:
- include: "#tag-stuff"
php-source:
patterns:
- name: comment.line.number-sign.ruby
captures:
"1":
name: punctuation.definition.comment.php
match: (#).*?(?=\?>)
- name: comment.line.double-slash.ruby
captures:
"1":
name: punctuation.definition.comment.php
match: (//).*?(?=\?>)
- include: source.php
entities:
patterns:
- name: constant.character.entity.html
captures:
"1":
name: punctuation.definition.constant.html
"3":
name: punctuation.definition.constant.html
match: (&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)
- name: invalid.illegal.bad-ampersand.html
match: "&"
string-single-quoted:
name: string.quoted.single.html
endCaptures:
"0":
name: punctuation.definition.string.end.html
begin: "'"
beginCaptures:
"0":
name: punctuation.definition.string.begin.html
end: "'"
patterns:
- include: "#embedded-code"
- include: "#entities"
tag-generic-attribute:
name: entity.other.attribute-name.html
match: \b([a-zA-Z-_:]+)
ruby:
name: source.ruby.embedded.html
captures:
"0":
name: punctuation.section.embedded.ruby
begin: <%+(?!>)=?
end: -?%>
patterns:
- name: comment.line.number-sign.ruby
captures:
"1":
name: punctuation.definition.comment.ruby
match: (#).*?(?=-?%>)
- include: source.ruby
smarty:
name: source.smarty.embedded.xhtml
captures:
"0":
name: punctuation.section.embedded.smarty
begin: "{{|{"
end: "}}|}"
disabled: "1"
patterns:
- include: source.smarty
embedded-code:
patterns:
- include: "#php"
- include: "#ruby"
- include: "#smarty"
uuid: 7071B5CA-849A-4D88-A96E-DD725ED622BF
foldingStartMarker: (<(?i:(head|table|tr|div|style|script|ul|ol|form|dl))\b.*?>|<MT\w+\b.*?>|\{\{(if|foreach|capture|literal|foreach|php|section|strip)|\{\s*$)
patterns:
- include: "#mt-container-tag"
- include: "#mt-variable-tag"
- include: text.html.basic
comment: This is set to use XHTML standards, but you can change that by changing .strict to .basic for HTML standards
- name: source.smarty.embedded.html
captures:
"0":
name: punctuation.section.embedded.smarty
begin: "{{"
end: "}}"
patterns:
- include: source.smarty
foldingStopMarker: (</(?i:(head|table|tr|div|style|script|ul|ol|form|dl))>|<\/MT\w+\b.*?>|\{\{/(if|foreach|capture|literal|foreach|php|section|strip)|(^|\s)\}\})
keyEquivalent: ^~M