astro-vscode 0.7.19 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # astro-vscode
2
2
 
3
+ ## 0.8.2
4
+
5
+ ### Patch Changes
6
+
7
+ - a408131: Several fixes for the syntax highlighter
8
+ - Updated dependencies [528c6bd]
9
+ - @astrojs/language-server@0.8.2
10
+
11
+ ## 0.8.1
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies [b20db6e]
16
+ - @astrojs/language-server@0.8.1
17
+
18
+ ## 0.8.0
19
+
20
+ ### Minor Changes
21
+
22
+ - cf48420: Adds syntax highlighting support for Astro fenced codeblocks in all Markdown files
23
+
24
+ ## 0.7.20
25
+
26
+ ### Patch Changes
27
+
28
+ - 5034f23: Adds support for running as a [Web Extension](https://code.visualstudio.com/api/extension-guides/web-extensions)
29
+
3
30
  ## 0.7.19
4
31
 
5
32
  ### Patch Changes
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "color": "#FFBE2D",
9
9
  "theme": "dark"
10
10
  },
11
- "version": "0.7.19",
11
+ "version": "0.8.2",
12
12
  "author": "Astro",
13
13
  "license": "MIT",
14
14
  "publisher": "astro-build",
@@ -24,7 +24,7 @@
24
24
  "onLanguage:astro"
25
25
  ],
26
26
  "dependencies": {
27
- "@astrojs/language-server": "0.7.19",
27
+ "@astrojs/language-server": "0.8.2",
28
28
  "@astrojs/ts-plugin": "0.1.0",
29
29
  "vscode-emmet-helper": "2.1.2",
30
30
  "vscode-html-languageservice": "^3.0.3",
@@ -36,6 +36,7 @@
36
36
  "execa": "^5.0.0"
37
37
  },
38
38
  "main": "./dist/index.js",
39
+ "browser": "./dist/index.js",
39
40
  "files": [
40
41
  "dist/",
41
42
  "languages/",
@@ -232,7 +233,17 @@
232
233
  "meta.embedded.block.csharp": "csharp",
233
234
  "meta.embedded.block.fsharp": "fsharp"
234
235
  }
236
+ },
237
+ {
238
+ "scopeName": "text.html.markdown.astro",
239
+ "path": "./syntaxes/astro.inject-to-markdown.tmLanguage.json",
240
+ "injectTo": [
241
+ "text.html.markdown"
242
+ ],
243
+ "embeddedLanguages": {
244
+ "meta.embedded.block.astro": "astro"
245
+ }
235
246
  }
236
247
  ]
237
248
  }
238
- }
249
+ }
@@ -0,0 +1,87 @@
1
+ {
2
+ "name": "Astro Markdown Block",
3
+ "scopeName": "text.html.markdown.astro",
4
+ "injectionSelector": "L:text.html.markdown",
5
+ "patterns": [
6
+ {
7
+ "include": "#fenced_code_block_astro"
8
+ }
9
+ ],
10
+ "repository": {
11
+ "fenced_code_block_astro": {
12
+ "name": "markup.fenced_code.block.markdown",
13
+ "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(astro)((\\s+|:|\\{)[^`~]*)?$)",
14
+ "beginCaptures": {
15
+ "3": {
16
+ "name": "punctuation.definition.markdown"
17
+ },
18
+ "4": {
19
+ "name": "fenced_code.block.language.markdown"
20
+ },
21
+ "5": {
22
+ "name": "fenced_code.block.language.attributes.markdown"
23
+ }
24
+ },
25
+ "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
26
+ "endCaptures": {
27
+ "3": {
28
+ "name": "punctuation.definition.markdown"
29
+ }
30
+ },
31
+ "patterns": [
32
+ {
33
+ "begin": "(^|\\G)(\\s*)(.*)",
34
+ "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)",
35
+ "contentName": "meta.embedded.block.astro",
36
+ "patterns": [
37
+ {
38
+ "begin": "\\G",
39
+ "end": "(?<=\\s*([`~]{3,})\\s*$)(^|\\G)",
40
+ "patterns": [
41
+ {
42
+ "include": "#frontmatter"
43
+ },
44
+ {
45
+ "begin": "(?<=^\\s*)(?=\\S)|(?!\\G)",
46
+ "end": "(?<=\\s*([`~]{3,})\\s*$)(^|\\G)",
47
+ "patterns": [
48
+ {
49
+ "include": "#astro"
50
+ }
51
+ ]
52
+ }
53
+ ]
54
+ }
55
+ ]
56
+ }
57
+ ]
58
+ },
59
+ "frontmatter": {
60
+ "begin": "(^\\s*|(?<=\\s*))-{3}\\s*$",
61
+ "beginCaptures": {
62
+ "0": {
63
+ "name": "punctuation.definition.tag.xi.begin.t"
64
+ }
65
+ },
66
+ "end": "(^\\s*|(?<=\\s*))-{3}\\s*$",
67
+ "endCaptures": {
68
+ "0": {
69
+ "name": "punctuation.definition.tag.xi.end.t"
70
+ }
71
+ },
72
+ "contentName": "meta.embedded.block.frontmatter",
73
+ "patterns": [
74
+ {
75
+ "include": "source.tsx"
76
+ }
77
+ ]
78
+ },
79
+ "astro": {
80
+ "patterns": [
81
+ {
82
+ "include": "text.html.astro"
83
+ }
84
+ ]
85
+ }
86
+ }
87
+ }
@@ -8,533 +8,447 @@
8
8
  "scopeName": "text.html.astro",
9
9
  "patterns": [
10
10
  {
11
- "include": "#astro-markdown"
11
+ "include": "#astro:markdown"
12
12
  },
13
13
  {
14
- "include": "#astro-expressions"
14
+ "include": "#astro:expressions"
15
15
  },
16
16
  {
17
- "begin": "(<)([a-z0-9:-]++)(?=[^>]*></\\2>)",
17
+ "include": "#html:comment"
18
+ },
19
+ {
20
+ "include": "#html:comment:bogus"
21
+ },
22
+ {
23
+ "include": "#html:doctype"
24
+ },
25
+ {
26
+ "include": "#astro:fragment"
27
+ },
28
+ {
29
+ "include": "#astro:lang"
30
+ },
31
+ {
32
+ "include": "#astro:component"
33
+ },
34
+ {
35
+ "include": "#html:element"
36
+ },
37
+ {
38
+ "include": "#html:entity"
39
+ },
40
+ {
41
+ "include": "#html:entity:bogus"
42
+ },
43
+ {
44
+ "include": "#frontmatter"
45
+ }
46
+ ],
47
+ "repository": {
48
+ "astro:attribute": {
49
+ "patterns": [
50
+ {
51
+ "include": "#html:attribute"
52
+ },
53
+ {
54
+ "include": "#string-double-quoted"
55
+ },
56
+ {
57
+ "include": "#string-single-quoted"
58
+ },
59
+ {
60
+ "include": "#string-template-literal"
61
+ },
62
+ {
63
+ "include": "#astro:expressions"
64
+ }
65
+ ]
66
+ },
67
+ "astro:component": {
68
+ "name": "meta.tag.component.astro",
69
+ "begin": "(</?)([$A-Z_][^/?!\\s:<>]*|[^/?!\\s:<>.]+\\.[^/?!\\s:<>]+)\\b",
18
70
  "beginCaptures": {
19
71
  "1": {
20
- "name": "punctuation.definition.tag.begin.html"
72
+ "name": "punctuation.definition.tag.begin.astro"
21
73
  },
22
74
  "2": {
23
- "name": "entity.name.tag.html"
75
+ "name": "entity.name.tag.astro support.class.component.astro"
24
76
  }
25
77
  },
26
- "end": "(>)(<)(/)(\\2)(>)",
78
+ "end": "(/?>)",
27
79
  "endCaptures": {
28
80
  "1": {
29
- "name": "punctuation.definition.tag.end.html"
30
- },
31
- "2": {
32
- "name": "punctuation.definition.tag.begin.html meta.scope.between-tag-pair.html"
33
- },
34
- "3": {
35
- "name": "punctuation.definition.tag.begin.html"
36
- },
37
- "4": {
38
- "name": "entity.name.tag.html"
39
- },
40
- "5": {
41
- "name": "punctuation.definition.tag.end.html"
81
+ "name": "punctuation.definition.tag.end.astro"
42
82
  }
43
83
  },
44
- "name": "meta.tag.any.html",
45
84
  "patterns": [
46
85
  {
47
- "include": "#tag-stuff"
86
+ "include": "#astro:attribute"
48
87
  }
49
88
  ]
50
89
  },
51
- {
52
- "begin": "(<\\?)(xml)",
90
+ "astro:fragment": {
91
+ "name": "meta.tag.component.astro",
92
+ "match": "(</?)(Fragment)?(\\s*>)",
53
93
  "captures": {
54
94
  "1": {
55
- "name": "punctuation.definition.tag.html"
95
+ "name": "punctuation.definition.tag.astro"
56
96
  },
57
97
  "2": {
58
- "name": "entity.name.tag.xml.html"
59
- }
60
- },
61
- "end": "(\\?>)",
62
- "name": "meta.tag.preprocessor.xml.html",
63
- "patterns": [
64
- {
65
- "include": "#tag-generic-attribute"
98
+ "name": "entity.name.tag.astro support.class.fragment.astro"
66
99
  },
67
- {
68
- "include": "#string-double-quoted"
69
- },
70
- {
71
- "include": "#string-single-quoted"
72
- }
73
- ]
74
- },
75
- {
76
- "begin": "<!--",
77
- "captures": {
78
- "0": {
79
- "name": "punctuation.definition.comment.html"
80
- }
81
- },
82
- "end": "--\\s*>",
83
- "name": "comment.block.html",
84
- "patterns": [
85
- {
86
- "match": "--",
87
- "name": "invalid.illegal.bad-comments-or-CDATA.html"
100
+ "3": {
101
+ "name": "punctuation.definition.tag.astro"
88
102
  }
89
- ]
103
+ }
90
104
  },
91
- {
92
- "begin": "<!(?=(?i:DOCTYPE\\s))",
105
+ "astro:lang": {
106
+ "begin": "(<)(?:(S(?i:cript|tyle))|((?i:script|style)))\\b",
93
107
  "beginCaptures": {
94
108
  "0": {
109
+ "name": "meta.tag.metadata.$2$3.start.html"
110
+ },
111
+ "1": {
95
112
  "name": "punctuation.definition.tag.begin.html"
113
+ },
114
+ "2": {
115
+ "name": "entity.name.tag.astro support.class.component.astro"
116
+ },
117
+ "3": {
118
+ "name": "entity.name.tag.html"
96
119
  }
97
120
  },
98
- "end": ">",
121
+ "end": "(</)(?:(S(?i:cript|tyle))|((?i:script|style)))\\s*(>)",
99
122
  "endCaptures": {
100
123
  "0": {
101
- "name": "punctuation.definition.tag.end.html"
102
- }
103
- },
104
- "name": "meta.tag.metadata.doctype.html",
105
- "patterns": [
106
- {
107
- "match": "\\G(?i:DOCTYPE)",
108
- "name": "entity.name.tag.html"
124
+ "name": "meta.tag.metadata.$2$3.end.html"
109
125
  },
110
- {
111
- "begin": "\"",
112
- "end": "\"",
113
- "name": "string.quoted.double.html"
114
- },
115
- {
116
- "match": "[^\\s>]+",
117
- "name": "entity.other.attribute-name.html"
118
- }
119
- ]
120
- },
121
- {
122
- "begin": "(?:^\\s+)?(<)((?i:style))\\b(?=[^>]*lang=(['\"])css\\1?)",
123
- "captures": {
124
126
  "1": {
125
127
  "name": "punctuation.definition.tag.begin.html"
126
128
  },
127
129
  "2": {
128
- "name": "entity.name.tag.style.html"
130
+ "name": "entity.name.tag.astro support.class.component.astro"
129
131
  },
130
132
  "3": {
131
- "name": "punctuation.definition.tag.html"
133
+ "name": "entity.name.tag.html"
134
+ },
135
+ "4": {
136
+ "name": "punctuation.definition.tag.end.html"
132
137
  }
133
138
  },
134
- "end": "(</)((?i:style))(>)(?:\\s*\\n)?",
135
- "name": "source.css.embedded.html",
136
139
  "patterns": [
137
140
  {
138
- "include": "#tag-stuff"
139
- },
140
- {
141
- "begin": "(>)",
142
- "beginCaptures": {
141
+ "begin": "\\G",
142
+ "end": "(>)",
143
+ "endCaptures": {
143
144
  "1": {
144
145
  "name": "punctuation.definition.tag.end.html"
145
146
  }
146
147
  },
147
- "end": "(?=</(?i:style))",
148
148
  "patterns": [
149
149
  {
150
- "include": "source.css"
150
+ "include": "#astro:attribute"
151
151
  }
152
152
  ]
153
- }
154
- ]
155
- },
156
- {
157
- "begin": "(?:^\\s+)?(<)((?i:style))\\b(?=[^>]*lang=(['\"])sass\\1?)",
158
- "captures": {
159
- "1": {
160
- "name": "punctuation.definition.tag.begin.html"
161
153
  },
162
- "2": {
163
- "name": "entity.name.tag.style.html"
164
- },
165
- "3": {
166
- "name": "punctuation.definition.tag.html"
167
- }
168
- },
169
- "end": "(</)((?i:style))(>)(?:\\s*\\n)?",
170
- "name": "source.sass.embedded.html",
171
- "patterns": [
172
154
  {
173
- "include": "#tag-stuff"
155
+ "name": "source.css.embedded.html",
156
+ "begin": "(?<=(?i:lang)=(['\"`]?)(?i:css)\\1[^>]*>)(?!\\G)",
157
+ "end": "(?=</(?i:script|style))",
158
+ "patterns": [
159
+ {
160
+ "include": "source.css"
161
+ }
162
+ ]
174
163
  },
175
164
  {
176
- "begin": "(>)",
177
- "beginCaptures": {
178
- "1": {
179
- "name": "punctuation.definition.tag.end.html"
180
- }
181
- },
182
- "end": "(?=</(?i:style))",
165
+ "name": "source.js.embedded.html",
166
+ "begin": "(?<=(?i:lang)=(['\"`]?)(?i:jsx?)\\1[^>]*>)(?!\\G)",
167
+ "end": "(?=</(?i:script|style))",
183
168
  "patterns": [
184
169
  {
185
- "include": "source.sass"
170
+ "include": "source.js"
186
171
  }
187
172
  ]
188
- }
189
- ]
190
- },
191
- {
192
- "begin": "(?:^\\s+)?(<)((?i:style))\\b(?=[^>]*lang=(['\"])scss\\1?)",
193
- "captures": {
194
- "1": {
195
- "name": "punctuation.definition.tag.begin.html"
196
- },
197
- "2": {
198
- "name": "entity.name.tag.style.html"
199
173
  },
200
- "3": {
201
- "name": "punctuation.definition.tag.html"
202
- }
203
- },
204
- "end": "(</)((?i:style))(>)(?:\\s*\\n)?",
205
- "name": "source.scss.embedded.html",
206
- "patterns": [
207
174
  {
208
- "include": "#tag-stuff"
175
+ "name": "source.less.embedded.html",
176
+ "begin": "(?<=(?i:lang)=(['\"`]?)(?i:less)\\1[^>]*>)(?!\\G)",
177
+ "end": "(?=</(?i:script|style))",
178
+ "patterns": [
179
+ {
180
+ "include": "source.css.less"
181
+ }
182
+ ]
209
183
  },
210
184
  {
211
- "begin": "(>)",
212
- "beginCaptures": {
213
- "1": {
214
- "name": "punctuation.definition.tag.end.html"
185
+ "name": "source.sass.embedded.html",
186
+ "begin": "(?<=(?i:lang)=(['\"`]?)(?i:sass)\\1[^>]*>)(?!\\G)",
187
+ "end": "(?=</(?i:script|style))",
188
+ "patterns": [
189
+ {
190
+ "include": "source.sass"
215
191
  }
216
- },
217
- "end": "(?=</(?i:style))",
192
+ ]
193
+ },
194
+ {
195
+ "name": "source.scss.embedded.html",
196
+ "begin": "(?<=(?i:lang)=(['\"`]?)(?i:scss)\\1[^>]*>)(?!\\G)",
197
+ "end": "(?=</(?i:script|style))",
218
198
  "patterns": [
219
199
  {
220
200
  "include": "source.css.scss"
221
201
  }
222
202
  ]
223
- }
224
- ]
225
- },
226
- {
227
- "begin": "(?:^\\s+)?(<)((?i:style))\\b(?![^>]*/>)",
228
- "captures": {
229
- "1": {
230
- "name": "punctuation.definition.tag.begin.html"
231
- },
232
- "2": {
233
- "name": "entity.name.tag.style.html"
234
203
  },
235
- "3": {
236
- "name": "punctuation.definition.tag.html"
237
- }
238
- },
239
- "end": "(</)((?i:style))(>)(?:\\s*\\n)?",
240
- "__DEFAULT_STYLE_NAME_START__": null,
241
- "name": "source.css.embedded.html",
242
- "__DEFAULT_STYLE_NAME_END__": null,
243
- "patterns": [
244
204
  {
245
- "include": "#tag-stuff"
205
+ "name": "source.stylus.embedded.html",
206
+ "begin": "(?<=(?i:lang)=(['\"`]?)(?i:styl(?:us)?)\\1[^>]*>)(?!\\G)",
207
+ "end": "(?=</(?i:script|style))",
208
+ "patterns": [
209
+ {
210
+ "include": "source.stylus"
211
+ }
212
+ ]
246
213
  },
247
214
  {
248
- "begin": "(>)",
249
- "beginCaptures": {
250
- "1": {
251
- "name": "punctuation.definition.tag.end.html"
252
- }
253
- },
254
- "end": "(?=</(?i:style))",
215
+ "name": "source.ts.embedded.html",
216
+ "begin": "(?<=(?i:lang)=(['\"`]?)(?i:tsx?)\\1[^>]*>)(?!\\G)",
217
+ "end": "(?=</(?i:script|style))",
255
218
  "patterns": [
256
219
  {
257
- "__DEFAULT_STYLE_INCLUDE_START__": null,
258
- "include": "source.css",
259
- "__DEFAULT_STYLE_INCLUDE_END__": null
220
+ "include": "source.tsx"
260
221
  }
261
222
  ]
262
- }
263
- ]
264
- },
265
- {
266
- "begin": "(?:^\\s+)?(<)((?i:script))\\b(?=[^>]*lang=(['\"])tsx\\1?)",
267
- "beginCaptures": {
268
- "1": {
269
- "name": "punctuation.definition.tag.begin.html"
270
223
  },
271
- "2": {
272
- "name": "entity.name.tag.script.html"
273
- }
274
- },
275
- "end": "(?<=</(script|SCRIPT))(>)(?:\\s*\\n)?",
276
- "endCaptures": {
277
- "2": {
278
- "name": "punctuation.definition.tag.html"
279
- }
280
- },
281
- "name": "source.tsx.embedded.html",
282
- "patterns": [
283
224
  {
284
- "include": "#tag-stuff"
225
+ "name": "source.js.embedded.html",
226
+ "begin": "(?<=<(?i:script|style)[^>]*>)(?!\\G)",
227
+ "end": "(?=</(?i:script|style))",
228
+ "patterns": [
229
+ {
230
+ "include": "source.js"
231
+ }
232
+ ]
285
233
  },
286
234
  {
287
- "begin": "(?<!</(?:script|SCRIPT))(>)",
288
- "captures": {
289
- "1": {
290
- "name": "punctuation.definition.tag.begin.html"
291
- },
292
- "2": {
293
- "name": "entity.name.tag.script.html"
294
- }
295
- },
296
- "end": "(</)((?i:script))",
235
+ "name": "source.css.embedded.html",
236
+ "begin": "(?<=<(?i:script|style)[^>]*>)(?!\\G)",
237
+ "end": "(?=</(?i:script|style))",
297
238
  "patterns": [
298
239
  {
299
- "include": "source.tsx"
240
+ "include": "source.css"
300
241
  }
301
242
  ]
302
243
  }
303
244
  ]
304
245
  },
305
- {
306
- "begin": "(?:^\\s+)?(<)((?i:script))\\b(?=[^>]*lang=(['\"])ts\\1?)",
307
- "beginCaptures": {
246
+ "html:attribute": {
247
+ "name": "meta.attribute.$1.html",
248
+ "match": "\\b(@?[a-zA-Z\\-:]+)(=?)",
249
+ "captures": {
308
250
  "1": {
309
- "name": "punctuation.definition.tag.begin.html"
251
+ "name": "entity.other.attribute-name.html"
310
252
  },
311
253
  "2": {
312
- "name": "entity.name.tag.script.html"
254
+ "name": "punctuation.separator.key-value.html"
255
+ }
256
+ }
257
+ },
258
+ "html:comment": {
259
+ "name": "comment.block.html",
260
+ "begin": "<!--",
261
+ "beginCaptures": {
262
+ "0": {
263
+ "name": "punctuation.definition.comment.html punctuation.definition.comment.begin.html"
313
264
  }
314
265
  },
315
- "end": "(?<=</(script|SCRIPT))(>)(?:\\s*\\n)?",
266
+ "end": "--!?>",
316
267
  "endCaptures": {
317
- "2": {
318
- "name": "punctuation.definition.tag.html"
268
+ "0": {
269
+ "name": "punctuation.definition.comment.html punctuation.definition.comment.end.html"
270
+ }
271
+ }
272
+ },
273
+ "html:comment:bogus": {
274
+ "name": "comment.block.html",
275
+ "begin": "<\\?",
276
+ "captures": {
277
+ "0": {
278
+ "name": "punctuation.definition.comment.html"
319
279
  }
320
280
  },
321
- "name": "source.tsx.embedded.html",
322
- "patterns": [
323
- {
324
- "include": "#tag-stuff"
325
- },
326
- {
327
- "begin": "(?<!</(?:script|SCRIPT))(>)",
328
- "captures": {
329
- "1": {
330
- "name": "punctuation.definition.tag.begin.html"
331
- },
332
- "2": {
333
- "name": "entity.name.tag.script.html"
334
- }
335
- },
336
- "end": "(</)((?i:script))",
337
- "patterns": [
338
- {
339
- "include": "source.tsx"
340
- }
341
- ]
281
+ "beginCaptures": {
282
+ "0": {
283
+ "name": "punctuation.definition.comment.html punctuation.definition.comment.begin.html"
342
284
  }
343
- ]
285
+ },
286
+ "end": ">",
287
+ "endCaptures": {
288
+ "0": {
289
+ "name": "punctuation.definition.comment.html punctuation.definition.comment.end.html"
290
+ }
291
+ }
344
292
  },
345
- {
346
- "begin": "(<)((?i:script))\\b(?![^>]*/>)(?![^>]*(?i:type.?=.?text/((?!javascript|babel|ecmascript).*)))",
293
+ "html:doctype": {
294
+ "name": "meta.tag.metadata.doctype.html",
295
+ "begin": "(<!)([Dd][Oo][Cc][Tt][Yy][Pp][Ee])",
347
296
  "beginCaptures": {
348
297
  "1": {
349
- "name": "punctuation.definition.tag.begin.html"
298
+ "name": "punctuation.definition.tag.html punctuation.definition.tag.begin.html"
350
299
  },
351
300
  "2": {
352
- "name": "entity.name.tag.script.html"
301
+ "name": "entity.name.tag.html"
353
302
  }
354
303
  },
355
- "end": "(?<=</(script|SCRIPT))(>)(?:\\s*\\n)?",
304
+ "end": ">",
356
305
  "endCaptures": {
357
- "2": {
358
- "name": "punctuation.definition.tag.html"
306
+ "0": {
307
+ "name": "punctuation.definition.tag.html punctuation.definition.tag.end.html"
359
308
  }
360
309
  },
361
- "name": "source.tsx.embedded.html",
362
310
  "patterns": [
363
311
  {
364
- "include": "#tag-stuff"
365
- },
366
- {
367
- "begin": "(?<!</(?:script|SCRIPT))(>)",
368
- "captures": {
312
+ "begin": "\"",
313
+ "end": "\"",
314
+ "name": "string.quoted.double.html"
315
+ },
316
+ {
317
+ "match": "[^\\s>]+",
318
+ "name": "entity.other.attribute-name.html"
319
+ }
320
+ ]
321
+ },
322
+ "html:element": {
323
+ "patterns": [
324
+ {
325
+ "name": "meta.tag.any.$2.start.html",
326
+ "begin": "(<)([^/?!\\s:<>]+)(?=\\s|/?>)",
327
+ "beginCaptures": {
369
328
  "1": {
370
329
  "name": "punctuation.definition.tag.begin.html"
371
330
  },
372
331
  "2": {
373
- "name": "entity.name.tag.script.html"
332
+ "name": "entity.name.tag.html"
333
+ }
334
+ },
335
+ "end": "/?>",
336
+ "endCaptures": {
337
+ "0": {
338
+ "name": "punctuation.definition.tag.end.html"
374
339
  }
375
340
  },
376
- "end": "(</)((?i:script))",
377
341
  "patterns": [
378
342
  {
379
- "captures": {
380
- "1": {
381
- "name": "punctuation.definition.comment.js"
382
- }
383
- },
384
- "match": "(//).*?((?=</script)|$\\n?)",
385
- "name": "comment.line.double-slash.js"
386
- },
387
- {
388
- "begin": "/\\*",
389
- "captures": {
390
- "0": {
391
- "name": "punctuation.definition.comment.js"
392
- }
393
- },
394
- "end": "\\*/|(?=</script)",
395
- "name": "comment.block.js"
343
+ "include": "#astro:attribute"
344
+ }
345
+ ]
346
+ },
347
+ {
348
+ "name": "meta.tag.any.$2.end.html",
349
+ "begin": "(</)([^/?!\\s:<>]+)(?=\\s|/?>)",
350
+ "beginCaptures": {
351
+ "1": {
352
+ "name": "punctuation.definition.tag.begin.html"
396
353
  },
354
+ "2": {
355
+ "name": "entity.name.tag.html"
356
+ }
357
+ },
358
+ "end": "/?>",
359
+ "endCaptures": {
360
+ "0": {
361
+ "name": "punctuation.definition.tag.end.html"
362
+ }
363
+ },
364
+ "patterns": [
397
365
  {
398
- "include": "source.tsx"
366
+ "include": "#astro:attribute"
399
367
  }
400
368
  ]
401
369
  }
402
370
  ]
403
371
  },
404
- {
405
- "begin": "(</?)((?i:body|head|html)\\b)",
372
+ "html:entity": {
373
+ "name": "constant.character.entity.html",
374
+ "match": "(&)([0-9A-Za-z]+|#x[0-9A-Fa-f]+|x[0-9]+)(;)",
406
375
  "captures": {
407
376
  "1": {
408
- "name": "punctuation.definition.tag.begin.html"
377
+ "name": "punctuation.definition.entity.html"
409
378
  },
410
- "2": {
411
- "name": "entity.name.tag.structure.any.html"
412
- }
413
- },
414
- "end": "(>)",
415
- "endCaptures": {
416
- "1": {
417
- "name": "punctuation.definition.tag.end.html"
418
- }
419
- },
420
- "name": "meta.tag.structure.any.html",
421
- "patterns": [
422
- {
423
- "include": "#tag-stuff"
379
+ "3": {
380
+ "name": "punctuation.definition.entity.html"
424
381
  }
425
- ]
382
+ }
426
383
  },
427
- {
428
- "begin": "(</?)((?i:address|blockquote|dd|div|dl|dt|fieldset|form|frame|frameset|h1|h2|h3|h4|h5|h6|iframe|noframes|object|ol|p|ul|applet|center|dir|hr|menu|pre)\\b)",
429
- "beginCaptures": {
384
+ "html:entity:bogus": {
385
+ "name": "constant.character.entity.html",
386
+ "match": "(&)([0-9A-Za-z]+|#x[0-9A-Fa-f]+|x[0-9]+)",
387
+ "captures": {
430
388
  "1": {
431
- "name": "punctuation.definition.tag.begin.html"
389
+ "name": "invalid.illegal.bad-ampersand.html"
432
390
  },
433
- "2": {
434
- "name": "entity.name.tag.block.any.html"
435
- }
436
- },
437
- "end": "(>)",
438
- "endCaptures": {
439
- "1": {
440
- "name": "punctuation.definition.tag.end.html"
441
- }
442
- },
443
- "name": "meta.tag.block.any.html",
444
- "patterns": [
445
- {
446
- "include": "#tag-stuff"
391
+ "3": {
392
+ "name": "punctuation.definition.entity.html"
447
393
  }
448
- ]
394
+ }
449
395
  },
450
- {
451
- "begin": "(</?)((?i:a|abbr|acronym|area|b|base|basefont|bdo|big|br|button|caption|cite|code|col|colgroup|del|dfn|em|font|head|html|i|img|input|ins|isindex|kbd|label|legend|li|link|map|meta|noscript|optgroup|option|param|q|s|samp|script|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|title|tr|tt|u|var)\\b)",
452
- "beginCaptures": {
453
- "1": {
454
- "name": "punctuation.definition.tag.begin.html"
455
- },
456
- "2": {
457
- "name": "entity.name.tag.inline.any.html"
458
- }
459
- },
460
- "end": "((?: ?/)?>)",
461
- "endCaptures": {
462
- "1": {
463
- "name": "punctuation.definition.tag.end.html"
464
- }
465
- },
466
- "name": "meta.tag.inline.any.html",
396
+ "astro:expressions": {
467
397
  "patterns": [
468
398
  {
469
- "include": "#tag-stuff"
399
+ "begin": "\\{",
400
+ "beginCaptures": {
401
+ "0": {
402
+ "name": "punctuation.definition.generic.begin.html"
403
+ }
404
+ },
405
+ "end": "\\}",
406
+ "endCaptures": {
407
+ "0": {
408
+ "name": "punctuation.definition.generic.end.html"
409
+ }
410
+ },
411
+ "name": "expression.embbeded.astro",
412
+ "patterns": [
413
+ {
414
+ "include": "source.tsx"
415
+ }
416
+ ]
470
417
  }
471
418
  ]
472
419
  },
473
- {
474
- "begin": "(</?)([A-Z][a-zA-Z0-9-\\.]*|[a-z]+\\.[a-zA-Z0-9-]+)",
420
+ "astro:markdown": {
421
+ "name": "text.html.astro.markdown",
422
+ "begin": "(<)(Markdown)(>)",
475
423
  "beginCaptures": {
476
424
  "1": {
477
425
  "name": "punctuation.definition.tag.begin.html"
478
426
  },
479
427
  "2": {
480
- "name": "support.class.component.astro"
428
+ "name": "entity.name.tag.html"
481
429
  },
482
430
  "3": {
483
- "name": "keyword.control.loading.astro"
484
- }
485
- },
486
- "end": "(/?>)",
487
- "endCaptures": {
488
- "1": {
489
431
  "name": "punctuation.definition.tag.end.html"
490
432
  }
491
433
  },
492
- "name": "meta.tag.component.astro",
493
- "patterns": [
494
- {
495
- "include": "#tag-stuff"
496
- }
497
- ]
498
- },
499
- {
500
- "begin": "(</?)([a-zA-Z0-9:-]+)",
501
- "beginCaptures": {
434
+ "end": "(</)(Markdown)(>)",
435
+ "endCaptures": {
502
436
  "1": {
503
437
  "name": "punctuation.definition.tag.begin.html"
504
438
  },
505
439
  "2": {
506
- "name": "entity.name.tag.other.html"
507
- }
508
- },
509
- "end": "(/?>)",
510
- "endCaptures": {
511
- "1": {
440
+ "name": "entity.name.tag.html"
441
+ },
442
+ "3": {
512
443
  "name": "punctuation.definition.tag.end.html"
513
444
  }
514
445
  },
515
- "name": "meta.tag.other.html",
516
446
  "patterns": [
517
447
  {
518
- "include": "#tag-stuff"
448
+ "include": "text.html.markdown.astro"
519
449
  }
520
450
  ]
521
451
  },
522
- {
523
- "include": "#entities"
524
- },
525
- {
526
- "include": "#frontmatter"
527
- },
528
- {
529
- "match": "<>",
530
- "name": "invalid.illegal.incomplete.html"
531
- },
532
- {
533
- "match": "<",
534
- "name": "invalid.illegal.bad-angle-bracket.html"
535
- }
536
- ],
537
- "repository": {
538
452
  "frontmatter": {
539
453
  "begin": "\\A(-{3})\\s*$",
540
454
  "beginCaptures": {
@@ -542,10 +456,10 @@
542
456
  "name": "comment.block.html"
543
457
  }
544
458
  },
545
- "contentName": "meta.embedded.block.frontmatter",
459
+ "contentName": "source.ts",
546
460
  "patterns": [
547
461
  {
548
- "include": "source.tsx"
462
+ "include": "source.ts"
549
463
  }
550
464
  ],
551
465
  "end": "(^|\\G)(-{3})|\\.{3}\\s*$",
@@ -555,26 +469,6 @@
555
469
  }
556
470
  }
557
471
  },
558
- "entities": {
559
- "patterns": [
560
- {
561
- "captures": {
562
- "1": {
563
- "name": "punctuation.definition.entity.html"
564
- },
565
- "3": {
566
- "name": "punctuation.definition.entity.html"
567
- }
568
- },
569
- "match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)",
570
- "name": "constant.character.entity.html"
571
- },
572
- {
573
- "match": "&",
574
- "name": "invalid.illegal.bad-ampersand.html"
575
- }
576
- ]
577
- },
578
472
  "string-double-quoted": {
579
473
  "begin": "\"",
580
474
  "beginCaptures": {
@@ -591,7 +485,10 @@
591
485
  "name": "string.quoted.double.html",
592
486
  "patterns": [
593
487
  {
594
- "include": "#entities"
488
+ "include": "#html:entity"
489
+ },
490
+ {
491
+ "include": "#html:entity:bogus"
595
492
  }
596
493
  ]
597
494
  },
@@ -611,155 +508,20 @@
611
508
  "name": "string.quoted.single.html",
612
509
  "patterns": [
613
510
  {
614
- "include": "#entities"
615
- }
616
- ]
617
- },
618
- "tag-generic-attribute": {
619
- "match": "(@|\\b)([a-zA-Z\\-:]+)",
620
- "name": "entity.other.attribute-name.html"
621
- },
622
- "tag-id-attribute": {
623
- "begin": "\\b(id)\\b\\s*(=)",
624
- "captures": {
625
- "1": {
626
- "name": "entity.other.attribute-name.id.html"
627
- },
628
- "2": {
629
- "name": "punctuation.separator.key-value.html"
630
- }
631
- },
632
- "end": "(?<='|\")",
633
- "name": "meta.attribute-with-value.id.html",
634
- "patterns": [
635
- {
636
- "begin": "\"",
637
- "beginCaptures": {
638
- "0": {
639
- "name": "punctuation.definition.string.begin.html"
640
- }
641
- },
642
- "contentName": "meta.toc-list.id.html",
643
- "end": "\"",
644
- "endCaptures": {
645
- "0": {
646
- "name": "punctuation.definition.string.end.html"
647
- }
648
- },
649
- "name": "string.quoted.double.html",
650
- "patterns": [
651
- {
652
- "include": "#astro-expressions"
653
- },
654
- {
655
- "include": "#entities"
656
- }
657
- ]
658
- },
659
- {
660
- "begin": "'",
661
- "beginCaptures": {
662
- "0": {
663
- "name": "punctuation.definition.string.begin.html"
664
- }
665
- },
666
- "contentName": "meta.toc-list.id.html",
667
- "end": "'",
668
- "endCaptures": {
669
- "0": {
670
- "name": "punctuation.definition.string.end.html"
671
- }
672
- },
673
- "name": "string.quoted.single.html",
674
- "patterns": [
675
- {
676
- "include": "#astro-expressions"
677
- },
678
- {
679
- "include": "#entities"
680
- }
681
- ]
682
- }
683
- ]
684
- },
685
- "tag-stuff": {
686
- "patterns": [
687
- {
688
- "include": "#tag-id-attribute"
689
- },
690
- {
691
- "include": "#tag-generic-attribute"
692
- },
693
- {
694
- "include": "#string-double-quoted"
695
- },
696
- {
697
- "include": "#string-single-quoted"
698
- },
699
- {
700
- "include": "#astro-load-directive"
701
- },
702
- {
703
- "include": "#astro-expressions"
704
- },
705
- {
706
- "include": "#astro-markdown"
707
- }
708
- ]
709
- },
710
- "astro-markdown": {
711
- "name": "text.html.astro.markdown",
712
- "begin": "(<)(Markdown)(>)",
713
- "beginCaptures": {
714
- "1": {
715
- "name": "punctuation.definition.tag.begin.html"
716
- },
717
- "2": {
718
- "name": "entity.name.tag.html"
719
- },
720
- "3": {
721
- "name": "punctuation.definition.tag.end.html"
722
- }
723
- },
724
- "end": "(</)(Markdown)(>)",
725
- "endCaptures": {
726
- "1": {
727
- "name": "punctuation.definition.tag.begin.html"
728
- },
729
- "2": {
730
- "name": "entity.name.tag.html"
511
+ "include": "#html:entity"
731
512
  },
732
- "3": {
733
- "name": "punctuation.definition.tag.end.html"
734
- }
735
- },
736
- "patterns": [
737
513
  {
738
- "include": "text.html.markdown.astro"
514
+ "include": "#html:entity:bogus"
739
515
  }
740
516
  ]
741
517
  },
742
- "astro-expressions": {
518
+ "string-template-literal": {
519
+ "begin": "`",
520
+ "end": "`",
521
+ "name": "string.template.html",
743
522
  "patterns": [
744
523
  {
745
- "begin": "\\{",
746
- "beginCaptures": {
747
- "0": {
748
- "name": "punctuation.definition.generic.begin.html"
749
- }
750
- },
751
- "end": "\\}",
752
- "endCaptures": {
753
- "0": {
754
- "name": "punctuation.definition.generic.end.html"
755
- }
756
- },
757
- "name": "expression.embbeded.astro",
758
- "patterns": [
759
- {
760
- "include": "source.tsx"
761
- }
762
- ]
524
+ "include": "source.tsx#template-substitution-element"
763
525
  }
764
526
  ]
765
527
  }