astro-vscode 0.8.0 → 0.8.4

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,35 @@
1
1
  # astro-vscode
2
2
 
3
+ ## 0.8.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [481e009]
8
+ - @astrojs/language-server@0.8.4
9
+
10
+ ## 0.8.3
11
+
12
+ ### Patch Changes
13
+
14
+ - cad5430: Fix plain script and style blocks
15
+ - Updated dependencies [fef3091]
16
+ - @astrojs/language-server@0.8.3
17
+
18
+ ## 0.8.2
19
+
20
+ ### Patch Changes
21
+
22
+ - a408131: Several fixes for the syntax highlighter
23
+ - Updated dependencies [528c6bd]
24
+ - @astrojs/language-server@0.8.2
25
+
26
+ ## 0.8.1
27
+
28
+ ### Patch Changes
29
+
30
+ - Updated dependencies [b20db6e]
31
+ - @astrojs/language-server@0.8.1
32
+
3
33
  ## 0.8.0
4
34
 
5
35
  ### Minor Changes
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "color": "#FFBE2D",
9
9
  "theme": "dark"
10
10
  },
11
- "version": "0.8.0",
11
+ "version": "0.8.4",
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.4",
28
28
  "@astrojs/ts-plugin": "0.1.0",
29
29
  "vscode-emmet-helper": "2.1.2",
30
30
  "vscode-html-languageservice": "^3.0.3",
@@ -42,7 +42,7 @@
42
42
  "include": "#frontmatter"
43
43
  },
44
44
  {
45
- "begin": "^(?=\\S)|(?!\\G)",
45
+ "begin": "(?<=^\\s*)(?=\\S)|(?!\\G)",
46
46
  "end": "(?<=\\s*([`~]{3,})\\s*$)(^|\\G)",
47
47
  "patterns": [
48
48
  {
@@ -57,13 +57,13 @@
57
57
  ]
58
58
  },
59
59
  "frontmatter": {
60
- "begin": "^-{3}\\s*$",
60
+ "begin": "(^\\s*|(?<=\\s*))-{3}\\s*$",
61
61
  "beginCaptures": {
62
62
  "0": {
63
63
  "name": "punctuation.definition.tag.xi.begin.t"
64
64
  }
65
65
  },
66
- "end": "^-{3}\\s*$",
66
+ "end": "(^\\s*|(?<=\\s*))-{3}\\s*$",
67
67
  "endCaptures": {
68
68
  "0": {
69
69
  "name": "punctuation.definition.tag.xi.end.t"
@@ -8,533 +8,457 @@
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)))(?![\\w:-])",
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)))(?![\\w:-])\\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"
109
- },
110
- {
111
- "begin": "\"",
112
- "end": "\"",
113
- "name": "string.quoted.double.html"
124
+ "name": "meta.tag.metadata.$2$3.end.html"
114
125
  },
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
- },
162
- "2": {
163
- "name": "entity.name.tag.style.html"
164
153
  },
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
+ "begin": "(?<=(?i:lang)=(['\"`]?)(?i:css)\\1[^>]*>)(?!\\G)",
156
+ "end": "(?=</[\\w:-])",
157
+ "contentName": "source.css",
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
+ "begin": "(?<=(?i:lang)=(['\"`]?)(?i:jsx?)\\1[^>]*>)(?!\\G)",
166
+ "end": "(?=</[\\w:-])",
167
+ "contentName": "source.js",
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
173
  },
197
- "2": {
198
- "name": "entity.name.tag.style.html"
199
- },
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
+ "begin": "(?<=(?i:lang)=(['\"`]?)(?i:less)\\1[^>]*>)(?!\\G)",
176
+ "end": "(?=</[\\w:-])",
177
+ "contentName": "source.css.css",
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
+ "begin": "(?<=(?i:lang)=(['\"`]?)(?i:sass)\\1[^>]*>)(?!\\G)",
186
+ "end": "(?=</[\\w:-])",
187
+ "contentName": "source.sass",
188
+ "patterns": [
189
+ {
190
+ "include": "source.sass"
215
191
  }
216
- },
217
- "end": "(?=</(?i:style))",
192
+ ]
193
+ },
194
+ {
195
+ "begin": "(?<=(?i:lang)=(['\"`]?)(?i:scss)\\1[^>]*>)(?!\\G)",
196
+ "end": "(?=</[\\w:-])",
197
+ "contentName": "source.css.scss",
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
203
  },
232
- "2": {
233
- "name": "entity.name.tag.style.html"
234
- },
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
+ "begin": "(?<=(?i:lang)=(['\"`]?)(?i:styl(?:us)?)\\1[^>]*>)(?!\\G)",
206
+ "end": "(?=</[\\w:-])",
207
+ "contentName": "source.stylus",
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
+ "begin": "(?<=(?i:lang)=(['\"`]?)(?i:ts)\\1[^>]*>)(?!\\G)",
216
+ "end": "(?=</[\\w:-])",
217
+ "contentName": "source.ts",
255
218
  "patterns": [
256
219
  {
257
- "__DEFAULT_STYLE_INCLUDE_START__": null,
258
- "include": "source.css",
259
- "__DEFAULT_STYLE_INCLUDE_END__": null
220
+ "include": "source.ts"
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
+ "begin": "(?<=(?i:lang)=(['\"`]?)(?i:tsx)\\1[^>]*>)(?!\\G)",
226
+ "end": "(?=</[\\w:-])",
227
+ "contentName": "source.tsx",
228
+ "patterns": [
229
+ {
230
+ "include": "source.tsx"
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"
235
+ "begin": "(?<=<(?i:script)[^>]*>)(?!\\G)",
236
+ "end": "(?=</[\\w:-])",
237
+ "contentName": "source.js",
238
+ "patterns": [
239
+ {
240
+ "include": "source.js"
294
241
  }
295
- },
296
- "end": "(</)((?i:script))",
242
+ ]
243
+ },
244
+ {
245
+ "begin": "(?<=<(?i:style)[^>]*>)(?!\\G)",
246
+ "end": "(?=</[\\w:-])",
247
+ "contentName": "source.css",
297
248
  "patterns": [
298
249
  {
299
- "include": "source.tsx"
250
+ "include": "source.css"
300
251
  }
301
252
  ]
302
253
  }
303
254
  ]
304
255
  },
305
- {
306
- "begin": "(?:^\\s+)?(<)((?i:script))\\b(?=[^>]*lang=(['\"])ts\\1?)",
307
- "beginCaptures": {
256
+ "html:attribute": {
257
+ "name": "meta.attribute.$1.html",
258
+ "match": "\\b(@?[a-zA-Z\\-:]+)(=?)",
259
+ "captures": {
308
260
  "1": {
309
- "name": "punctuation.definition.tag.begin.html"
261
+ "name": "entity.other.attribute-name.html"
310
262
  },
311
263
  "2": {
312
- "name": "entity.name.tag.script.html"
264
+ "name": "punctuation.separator.key-value.html"
265
+ }
266
+ }
267
+ },
268
+ "html:comment": {
269
+ "name": "comment.block.html",
270
+ "begin": "<!--",
271
+ "beginCaptures": {
272
+ "0": {
273
+ "name": "punctuation.definition.comment.html punctuation.definition.comment.begin.html"
313
274
  }
314
275
  },
315
- "end": "(?<=</(script|SCRIPT))(>)(?:\\s*\\n)?",
276
+ "end": "--!?>",
316
277
  "endCaptures": {
317
- "2": {
318
- "name": "punctuation.definition.tag.html"
278
+ "0": {
279
+ "name": "punctuation.definition.comment.html punctuation.definition.comment.end.html"
280
+ }
281
+ }
282
+ },
283
+ "html:comment:bogus": {
284
+ "name": "comment.block.html",
285
+ "begin": "<\\?",
286
+ "captures": {
287
+ "0": {
288
+ "name": "punctuation.definition.comment.html"
319
289
  }
320
290
  },
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
- ]
291
+ "beginCaptures": {
292
+ "0": {
293
+ "name": "punctuation.definition.comment.html punctuation.definition.comment.begin.html"
342
294
  }
343
- ]
295
+ },
296
+ "end": ">",
297
+ "endCaptures": {
298
+ "0": {
299
+ "name": "punctuation.definition.comment.html punctuation.definition.comment.end.html"
300
+ }
301
+ }
344
302
  },
345
- {
346
- "begin": "(<)((?i:script))\\b(?![^>]*/>)(?![^>]*(?i:type.?=.?text/((?!javascript|babel|ecmascript).*)))",
303
+ "html:doctype": {
304
+ "name": "meta.tag.metadata.doctype.html",
305
+ "begin": "(<!)([Dd][Oo][Cc][Tt][Yy][Pp][Ee])",
347
306
  "beginCaptures": {
348
307
  "1": {
349
- "name": "punctuation.definition.tag.begin.html"
308
+ "name": "punctuation.definition.tag.html punctuation.definition.tag.begin.html"
350
309
  },
351
310
  "2": {
352
- "name": "entity.name.tag.script.html"
311
+ "name": "entity.name.tag.html"
353
312
  }
354
313
  },
355
- "end": "(?<=</(script|SCRIPT))(>)(?:\\s*\\n)?",
314
+ "end": ">",
356
315
  "endCaptures": {
357
- "2": {
358
- "name": "punctuation.definition.tag.html"
316
+ "0": {
317
+ "name": "punctuation.definition.tag.html punctuation.definition.tag.end.html"
359
318
  }
360
319
  },
361
- "name": "source.tsx.embedded.html",
362
320
  "patterns": [
363
321
  {
364
- "include": "#tag-stuff"
365
- },
366
- {
367
- "begin": "(?<!</(?:script|SCRIPT))(>)",
368
- "captures": {
322
+ "begin": "\"",
323
+ "end": "\"",
324
+ "name": "string.quoted.double.html"
325
+ },
326
+ {
327
+ "match": "[^\\s>]+",
328
+ "name": "entity.other.attribute-name.html"
329
+ }
330
+ ]
331
+ },
332
+ "html:element": {
333
+ "patterns": [
334
+ {
335
+ "name": "meta.tag.any.$2.start.html",
336
+ "begin": "(<)([^/?!\\s:<>]+)(?=\\s|/?>)",
337
+ "beginCaptures": {
369
338
  "1": {
370
339
  "name": "punctuation.definition.tag.begin.html"
371
340
  },
372
341
  "2": {
373
- "name": "entity.name.tag.script.html"
342
+ "name": "entity.name.tag.html"
343
+ }
344
+ },
345
+ "end": "/?>",
346
+ "endCaptures": {
347
+ "0": {
348
+ "name": "punctuation.definition.tag.end.html"
374
349
  }
375
350
  },
376
- "end": "(</)((?i:script))",
377
351
  "patterns": [
378
352
  {
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"
353
+ "include": "#astro:attribute"
354
+ }
355
+ ]
356
+ },
357
+ {
358
+ "name": "meta.tag.any.$2.end.html",
359
+ "begin": "(</)([^/?!\\s:<>]+)(?=\\s|/?>)",
360
+ "beginCaptures": {
361
+ "1": {
362
+ "name": "punctuation.definition.tag.begin.html"
396
363
  },
364
+ "2": {
365
+ "name": "entity.name.tag.html"
366
+ }
367
+ },
368
+ "end": "/?>",
369
+ "endCaptures": {
370
+ "0": {
371
+ "name": "punctuation.definition.tag.end.html"
372
+ }
373
+ },
374
+ "patterns": [
397
375
  {
398
- "include": "source.tsx"
376
+ "include": "#astro:attribute"
399
377
  }
400
378
  ]
401
379
  }
402
380
  ]
403
381
  },
404
- {
405
- "begin": "(</?)((?i:body|head|html)\\b)",
382
+ "html:entity": {
383
+ "name": "constant.character.entity.html",
384
+ "match": "(&)([0-9A-Za-z]+|#x[0-9A-Fa-f]+|x[0-9]+)(;)",
406
385
  "captures": {
407
386
  "1": {
408
- "name": "punctuation.definition.tag.begin.html"
387
+ "name": "punctuation.definition.entity.html"
409
388
  },
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"
389
+ "3": {
390
+ "name": "punctuation.definition.entity.html"
424
391
  }
425
- ]
392
+ }
426
393
  },
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": {
394
+ "html:entity:bogus": {
395
+ "name": "constant.character.entity.html",
396
+ "match": "(&)([0-9A-Za-z]+|#x[0-9A-Fa-f]+|x[0-9]+)",
397
+ "captures": {
430
398
  "1": {
431
- "name": "punctuation.definition.tag.begin.html"
399
+ "name": "invalid.illegal.bad-ampersand.html"
432
400
  },
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"
401
+ "3": {
402
+ "name": "punctuation.definition.entity.html"
447
403
  }
448
- ]
404
+ }
449
405
  },
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",
406
+ "astro:expressions": {
467
407
  "patterns": [
468
408
  {
469
- "include": "#tag-stuff"
409
+ "begin": "\\{",
410
+ "beginCaptures": {
411
+ "0": {
412
+ "name": "punctuation.definition.generic.begin.html"
413
+ }
414
+ },
415
+ "end": "\\}",
416
+ "endCaptures": {
417
+ "0": {
418
+ "name": "punctuation.definition.generic.end.html"
419
+ }
420
+ },
421
+ "name": "expression.embbeded.astro",
422
+ "patterns": [
423
+ {
424
+ "include": "source.tsx"
425
+ }
426
+ ]
470
427
  }
471
428
  ]
472
429
  },
473
- {
474
- "begin": "(</?)([A-Z][a-zA-Z0-9-\\.]*|[a-z]+\\.[a-zA-Z0-9-]+)",
430
+ "astro:markdown": {
431
+ "name": "text.html.astro.markdown",
432
+ "begin": "(<)(Markdown)(>)",
475
433
  "beginCaptures": {
476
434
  "1": {
477
435
  "name": "punctuation.definition.tag.begin.html"
478
436
  },
479
437
  "2": {
480
- "name": "support.class.component.astro"
438
+ "name": "entity.name.tag.html"
481
439
  },
482
440
  "3": {
483
- "name": "keyword.control.loading.astro"
484
- }
485
- },
486
- "end": "(/?>)",
487
- "endCaptures": {
488
- "1": {
489
441
  "name": "punctuation.definition.tag.end.html"
490
442
  }
491
443
  },
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": {
444
+ "end": "(</)(Markdown)(>)",
445
+ "endCaptures": {
502
446
  "1": {
503
447
  "name": "punctuation.definition.tag.begin.html"
504
448
  },
505
449
  "2": {
506
- "name": "entity.name.tag.other.html"
507
- }
508
- },
509
- "end": "(/?>)",
510
- "endCaptures": {
511
- "1": {
450
+ "name": "entity.name.tag.html"
451
+ },
452
+ "3": {
512
453
  "name": "punctuation.definition.tag.end.html"
513
454
  }
514
455
  },
515
- "name": "meta.tag.other.html",
516
456
  "patterns": [
517
457
  {
518
- "include": "#tag-stuff"
458
+ "include": "text.html.markdown.astro"
519
459
  }
520
460
  ]
521
461
  },
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
462
  "frontmatter": {
539
463
  "begin": "\\A(-{3})\\s*$",
540
464
  "beginCaptures": {
@@ -542,10 +466,10 @@
542
466
  "name": "comment.block.html"
543
467
  }
544
468
  },
545
- "contentName": "meta.embedded.block.frontmatter",
469
+ "contentName": "source.ts",
546
470
  "patterns": [
547
471
  {
548
- "include": "source.tsx"
472
+ "include": "source.ts"
549
473
  }
550
474
  ],
551
475
  "end": "(^|\\G)(-{3})|\\.{3}\\s*$",
@@ -555,26 +479,6 @@
555
479
  }
556
480
  }
557
481
  },
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
482
  "string-double-quoted": {
579
483
  "begin": "\"",
580
484
  "beginCaptures": {
@@ -591,7 +495,10 @@
591
495
  "name": "string.quoted.double.html",
592
496
  "patterns": [
593
497
  {
594
- "include": "#entities"
498
+ "include": "#html:entity"
499
+ },
500
+ {
501
+ "include": "#html:entity:bogus"
595
502
  }
596
503
  ]
597
504
  },
@@ -611,155 +518,20 @@
611
518
  "name": "string.quoted.single.html",
612
519
  "patterns": [
613
520
  {
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"
521
+ "include": "#html:entity"
731
522
  },
732
- "3": {
733
- "name": "punctuation.definition.tag.end.html"
734
- }
735
- },
736
- "patterns": [
737
523
  {
738
- "include": "text.html.markdown.astro"
524
+ "include": "#html:entity:bogus"
739
525
  }
740
526
  ]
741
527
  },
742
- "astro-expressions": {
528
+ "string-template-literal": {
529
+ "begin": "`",
530
+ "end": "`",
531
+ "name": "string.template.html",
743
532
  "patterns": [
744
533
  {
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
- ]
534
+ "include": "source.tsx#template-substitution-element"
763
535
  }
764
536
  ]
765
537
  }