PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.13.0
Code Block Pro – Beautiful Syntax Highlighting v1.13.0
1.27.1 1.27.2 1.27.3 1.27.4 1.27.5 1.27.6 1.27.7 1.28.0 1.3.0 1.4.0 1.5.0 1.5.1 1.5.2 1.6.0 1.7.0 1.8.0 1.9.0 1.9.1 1.9.2 1.9.3 trunk 1.1.0 1.10.0 1.11.0 1.11.1 All 63 releases
code-block-pro / build / shiki / languages / marko.tmLanguage.json

marko.tmLanguage.json in Code Block Pro – Beautiful Syntax Highlighting 1.13.0, at build/shiki/languages/marko.tmLanguage.json

1,745 lines 46.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 {
2 "name": "marko",
3 "scopeName": "text.marko",
4 "uuid": "46c8c3f8-cabe-466a-a633-5deafdc51253",
5 "fileTypes": ["marko"],
6 "patterns": [
7 {
8 "comment": "CSS style block, eg: style { color: green }",
9 "name": "meta.embedded.css",
10 "contentName": "source.css",
11 "begin": "^\\s*(style)(\\b[^\\s]*\\.css)?\\s+({)",
12 "end": "}",
13 "patterns": [
14 {
15 "include": "source.css"
16 }
17 ],
18 "beginCaptures": {
19 "1": {
20 "name": "support.type.builtin.marko"
21 },
22 "2": {
23 "name": "storage.modifier.marko.css"
24 },
25 "3": {
26 "name": "punctuation.section.scope.begin.marko.css"
27 }
28 },
29 "endCaptures": {
30 "0": {
31 "name": "punctuation.section.scope.end.marko.css"
32 }
33 }
34 },
35 {
36 "comment": "Less style block, eg: style.less { color: green }",
37 "name": "meta.embedded.less",
38 "contentName": "source.less",
39 "begin": "^\\s*(style)(\\b[^\\s]*\\.less)\\s+({)",
40 "end": "}",
41 "patterns": [
42 {
43 "include": "source.css.less"
44 }
45 ],
46 "beginCaptures": {
47 "1": {
48 "name": "support.type.builtin.marko"
49 },
50 "2": {
51 "name": "storage.modifier.marko.css"
52 },
53 "3": {
54 "name": "punctuation.section.scope.begin.marko.css"
55 }
56 },
57 "endCaptures": {
58 "0": {
59 "name": "punctuation.section.scope.end.marko.css"
60 }
61 }
62 },
63 {
64 "comment": "SCSS style block, eg: style.scss { color: green }",
65 "name": "meta.embedded.scss",
66 "contentName": "source.scss",
67 "begin": "^\\s*(style)(\\b[^\\s]*\\.scss)\\s+({)",
68 "end": "}",
69 "patterns": [
70 {
71 "include": "source.css.scss"
72 }
73 ],
74 "beginCaptures": {
75 "1": {
76 "name": "support.type.builtin.marko"
77 },
78 "2": {
79 "name": "storage.modifier.marko.css"
80 },
81 "3": {
82 "name": "punctuation.section.scope.begin.marko.css"
83 }
84 },
85 "endCaptures": {
86 "0": {
87 "name": "punctuation.section.scope.end.marko.css"
88 }
89 }
90 },
91 {
92 "comment": "JS/TS style block",
93 "name": "meta.embedded.ts",
94 "contentName": "source.ts",
95 "begin": "^\\s*(style)(\\b[^\\s]*\\.[tj]s)\\s+({)",
96 "end": "}",
97 "patterns": [
98 {
99 "include": "source.ts"
100 }
101 ],
102 "beginCaptures": {
103 "1": {
104 "name": "support.type.builtin.marko"
105 },
106 "2": {
107 "name": "storage.modifier.marko.css"
108 },
109 "3": {
110 "name": "punctuation.section.scope.begin.marko.css"
111 }
112 },
113 "endCaptures": {
114 "0": {
115 "name": "punctuation.section.scope.end.marko.css"
116 }
117 }
118 },
119 {
120 "comment": "Top level blocks parsed as JavaScript",
121 "name": "meta.embedded.ts",
122 "contentName": "source.ts",
123 "begin": "^\\s*(?:(static\\b)|(?=(?:class|import|export)\\b))",
124 "end": "(?=\\n|$)",
125 "patterns": [
126 {
127 "include": "source.ts"
128 }
129 ],
130 "beginCaptures": {
131 "1": {
132 "name": "keyword.control.static.marko"
133 }
134 }
135 },
136 {
137 "include": "#content-concise-mode"
138 }
139 ],
140 "repository": {
141 "attrs": {
142 "patterns": [
143 {
144 "include": "#javascript-comments"
145 },
146 {
147 "comment": "Attribute with optional value",
148 "name": "meta.marko-attribute",
149 "applyEndPatternLast": 1,
150 "begin": "(?:(key|on[a-zA-Z0-9_$-]+|[a-zA-Z0-9_$]+Change|no-update(?:-body)?(?:-if)?)|([a-zA-Z0-9_$][a-zA-Z0-9_$-]*)|(#[a-zA-Z0-9_$][a-zA-Z0-9_$-]*))(:[a-zA-Z0-9_$][a-zA-Z0-9_$-]*)?",
151 "end": "(?=.|$)",
152 "beginCaptures": {
153 "1": {
154 "name": "support.type.attribute-name.marko"
155 },
156 "2": {
157 "name": "entity.other.attribute-name.marko"
158 },
159 "3": {
160 "name": "support.function.attribute-name.marko"
161 },
162 "4": {
163 "name": "support.function.attribute-name.marko"
164 }
165 },
166 "patterns": [
167 {
168 "include": "#html-args-or-method"
169 },
170 {
171 "include": "#attr-value"
172 }
173 ]
174 },
175 {
176 "comment": "A ...spread attribute",
177 "name": "meta.marko-spread-attribute",
178 "contentName": "source.ts",
179 "begin": "(\\.\\.\\.)",
180 "end": "(?=[,;\\]]|/>|(?<=[^=])>|(?<!(?:^|[!~*%&^|?:]|[!~*%&^|?/<>+=-]=|=>|>{2,}|[^.]\\.|[^-]-|^\\s*\\+\\+|[^\\+]\\+{2}*\\+|[a-zA-Z0-9%).<\\]}]\\s*/|\\b(?<![.]\\s*)(?:await|async|class|function|keyof|new|typeof|void))\\s*)(?:\\n|[ \\t]+(?![\\n{(+!~*%&^|?:]|[<>/=-]=|=>|>{2,}|\\.[^.]|-[^-]|/[^>]|(?:in|instanceof|as|extends)\\s+[^:=/,;>])))",
181 "patterns": [
182 {
183 "include": "#javascript-expression"
184 }
185 ],
186 "beginCaptures": {
187 "1": {
188 "name": "keyword.operator.spread.marko"
189 }
190 }
191 },
192 {
193 "comment": "Consume any whitespace after a comma",
194 "begin": "\\s*(,(?!,))",
195 "end": "(?=\\S)",
196 "captures": {
197 "1": {
198 "name": "punctuation.separator.comma.marko"
199 }
200 }
201 },
202 {
203 "include": "#invalid"
204 }
205 ]
206 },
207 "attr-value": {
208 "comment": "Attribute value",
209 "name": "meta.embedded.ts",
210 "contentName": "source.ts",
211 "begin": "\\s*(:?=)\\s*",
212 "end": "(?=[,;\\]]|/>|(?<=[^=])>|(?<!(?:^|[!~*%&^|?:]|[!~*%&^|?/<>+=-]=|=>|>{2,}|[^.]\\.|[^-]-|^\\s*\\+\\+|[^\\+]\\+{2}*\\+|[a-zA-Z0-9%).<\\]}]\\s*/|\\b(?<![.]\\s*)(?:await|async|class|function|keyof|new|typeof|void))\\s*)(?:\\n|[ \\t]+(?![\\n{(+!~*%&^|?:]|[<>/=-]=|=>|>{2,}|\\.[^.]|-[^-]|/[^>]|(?:in|instanceof|as|extends)\\s+[^:=/,;>])))",
213 "patterns": [
214 {
215 "include": "#javascript-expression"
216 }
217 ],
218 "beginCaptures": {
219 "1": {
220 "patterns": [
221 {
222 "include": "source.ts"
223 }
224 ]
225 }
226 }
227 },
228 "concise-html-block": {
229 "comment": "--- HTML block within concise mode content. ---",
230 "name": "meta.section.marko-html-block",
231 "begin": "\\s*(--+)\\s*$",
232 "end": "\\1",
233 "patterns": [
234 {
235 "include": "#content-html-mode"
236 }
237 ],
238 "beginCaptures": {
239 "1": {
240 "name": "punctuation.section.embedded.scope.begin.marko"
241 }
242 },
243 "endCaptures": {
244 "0": {
245 "name": "punctuation.section.embedded.scope.end.marko"
246 }
247 }
248 },
249 "concise-html-line": {
250 "comment": "-- HTML line within concise mode content. (content-html-mode w/o scriptlet)",
251 "name": "meta.section.marko-html-line",
252 "match": "\\s*(--+)(?=\\s+\\S)(.*)($)",
253 "captures": {
254 "1": {
255 "name": "punctuation.section.embedded.scope.begin.marko"
256 },
257 "2": {
258 "patterns": [
259 {
260 "include": "#cdata"
261 },
262 {
263 "include": "#doctype"
264 },
265 {
266 "include": "#declaration"
267 },
268 {
269 "include": "#javascript-comments-after-whitespace"
270 },
271 {
272 "include": "#html-comment"
273 },
274 {
275 "include": "#tag-html"
276 },
277 {
278 "comment": "Match escape characters in text.",
279 "name": "text.marko",
280 "match": "\\\\."
281 },
282 {
283 "include": "#placeholder"
284 },
285 {
286 "comment": "Match anything else as text.",
287 "name": "text.marko",
288 "match": ".+?"
289 }
290 ]
291 },
292 "3": {
293 "name": "punctuation.section.embedded.scope.end.marko"
294 }
295 }
296 },
297 "concise-semi-eol": {
298 "comment": "Match spaces followed by a semi that represents the end of the line in concise mode.",
299 "begin": "\\s*(;)",
300 "end": "$",
301 "patterns": [
302 {
303 "include": "#javascript-comments"
304 },
305 {
306 "include": "#html-comment"
307 },
308 {
309 "include": "#invalid"
310 }
311 ],
312 "beginCaptures": {
313 "1": {
314 "name": "punctuation.terminator.marko"
315 }
316 }
317 },
318 "concise-attr-group": {
319 "comment": "Matches a group of non newline sensitive attributes in square brackets.",
320 "begin": "\\s*(\\[)",
321 "end": "]",
322 "patterns": [
323 {
324 "include": "#concise-attr-group"
325 },
326 {
327 "begin": "\\s+",
328 "end": "(?=\\S)"
329 },
330 {
331 "include": "#attrs"
332 },
333 {
334 "include": "#invalid"
335 }
336 ],
337 "beginCaptures": {
338 "1": {
339 "name": "punctuation.section.scope.begin.marko"
340 }
341 },
342 "endCaptures": {
343 "0": {
344 "name": "punctuation.section.scope.end.marko"
345 }
346 }
347 },
348 "concise-open-tag-content": {
349 "comment": "Handles everything from the start of the tag name until the body content begins.",
350 "patterns": [
351 {
352 "include": "#tag-before-attrs"
353 },
354 {
355 "include": "#concise-semi-eol"
356 },
357 {
358 "comment": "Matches unenclosed concise mode attributes.",
359 "begin": "(?!^)[ \\t]",
360 "end": "(?=--)|(?=\\n)",
361 "patterns": [
362 {
363 "include": "#concise-semi-eol"
364 },
365 {
366 "include": "#concise-attr-group"
367 },
368 {
369 "begin": "[ \\t]+",
370 "end": "(?=\\S|\\n)"
371 },
372 {
373 "include": "#attrs"
374 },
375 {
376 "include": "#invalid"
377 }
378 ]
379 }
380 ]
381 },
382 "concise-comment-block": {
383 "comment": "--- Embedded concise comment content block. ---",
384 "name": "meta.section.marko-comment-block",
385 "begin": "\\s*(--+)\\s*$",
386 "end": "\\1",
387 "patterns": [
388 {
389 "include": "#content-embedded-comment"
390 }
391 ],
392 "beginCaptures": {
393 "1": {
394 "name": "punctuation.section.embedded.scope.begin.marko"
395 }
396 },
397 "endCaptures": {
398 "0": {
399 "name": "punctuation.section.embedded.scope.end.marko"
400 }
401 }
402 },
403 "concise-comment-line": {
404 "comment": "-- Embedded concise comment content line.",
405 "name": "meta.section.marko-comment-line",
406 "applyEndPatternLast": 1,
407 "begin": "\\s*(--+)",
408 "end": "$",
409 "patterns": [
410 {
411 "include": "#content-embedded-comment"
412 }
413 ],
414 "beginCaptures": {
415 "1": {
416 "name": "punctuation.section.embedded.scope.begin.marko"
417 }
418 },
419 "endCaptures": {
420 "0": {
421 "name": "punctuation.section.embedded.scope.end.marko"
422 }
423 }
424 },
425 "concise-script-block": {
426 "comment": "--- Embedded concise script content block. ---",
427 "name": "meta.section.marko-script-block",
428 "begin": "\\s*(--+)\\s*$",
429 "end": "\\1",
430 "patterns": [
431 {
432 "include": "#content-embedded-script"
433 }
434 ],
435 "beginCaptures": {
436 "1": {
437 "name": "punctuation.section.embedded.scope.begin.marko"
438 }
439 },
440 "endCaptures": {
441 "0": {
442 "name": "punctuation.section.embedded.scope.end.marko"
443 }
444 }
445 },
446 "concise-script-line": {
447 "comment": "-- Embedded concise script content line.",
448 "name": "meta.section.marko-script-line",
449 "applyEndPatternLast": 1,
450 "begin": "\\s*(--+)",
451 "end": "$",
452 "patterns": [
453 {
454 "include": "#content-embedded-script"
455 }
456 ],
457 "beginCaptures": {
458 "1": {
459 "name": "punctuation.section.embedded.scope.begin.marko"
460 }
461 },
462 "endCaptures": {
463 "0": {
464 "name": "punctuation.section.embedded.scope.end.marko"
465 }
466 }
467 },
468 "concise-style-block": {
469 "comment": "--- Embedded concise style content block. ---",
470 "name": "meta.section.marko-style-block",
471 "contentName": "source.css",
472 "begin": "\\s*(--+)\\s*$",
473 "end": "\\1",
474 "patterns": [
475 {
476 "include": "#content-embedded-style"
477 }
478 ],
479 "beginCaptures": {
480 "1": {
481 "name": "punctuation.section.embedded.scope.begin.marko"
482 }
483 },
484 "endCaptures": {
485 "0": {
486 "name": "punctuation.section.embedded.scope.end.marko"
487 }
488 }
489 },
490 "concise-style-block-less": {
491 "comment": "--- Embedded concise style content block. ---",
492 "name": "meta.section.marko-style-block",
493 "contentName": "source.less",
494 "begin": "\\s*(--+)\\s*$",
495 "end": "\\1",
496 "patterns": [
497 {
498 "include": "#content-embedded-style-less"
499 }
500 ],
501 "beginCaptures": {
502 "1": {
503 "name": "punctuation.section.embedded.scope.begin.marko"
504 }
505 },
506 "endCaptures": {
507 "0": {
508 "name": "punctuation.section.embedded.scope.end.marko"
509 }
510 }
511 },
512 "concise-style-block-scss": {
513 "comment": "--- Embedded concise style content block. ---",
514 "name": "meta.section.marko-style-block",
515 "contentName": "source.scss",
516 "begin": "\\s*(--+)\\s*$",
517 "end": "\\1",
518 "patterns": [
519 {
520 "include": "#content-embedded-style-scss"
521 }
522 ],
523 "beginCaptures": {
524 "1": {
525 "name": "punctuation.section.embedded.scope.begin.marko"
526 }
527 },
528 "endCaptures": {
529 "0": {
530 "name": "punctuation.section.embedded.scope.end.marko"
531 }
532 }
533 },
534 "concise-style-line": {
535 "comment": "-- Embedded concise style content line.",
536 "name": "meta.section.marko-style-line",
537 "contentName": "source.css",
538 "applyEndPatternLast": 1,
539 "begin": "\\s*(--+)",
540 "end": "$",
541 "patterns": [
542 {
543 "include": "#content-embedded-style"
544 }
545 ],
546 "beginCaptures": {
547 "1": {
548 "name": "punctuation.section.embedded.scope.begin.marko"
549 }
550 },
551 "endCaptures": {
552 "0": {
553 "name": "punctuation.section.embedded.scope.end.marko"
554 }
555 }
556 },
557 "concise-style-line-less": {
558 "comment": "-- Embedded concise style content line.",
559 "name": "meta.section.marko-style-line",
560 "contentName": "source.less",
561 "applyEndPatternLast": 1,
562 "begin": "\\s*(--+)",
563 "end": "$",
564 "patterns": [
565 {
566 "include": "#content-embedded-style-less"
567 }
568 ],
569 "beginCaptures": {
570 "1": {
571 "name": "punctuation.section.embedded.scope.begin.marko"
572 }
573 },
574 "endCaptures": {
575 "0": {
576 "name": "punctuation.section.embedded.scope.end.marko"
577 }
578 }
579 },
580 "concise-style-line-scss": {
581 "comment": "-- Embedded concise style content line.",
582 "name": "meta.section.marko-style-line",
583 "contentName": "source.scss",
584 "applyEndPatternLast": 1,
585 "begin": "\\s*(--+)",
586 "end": "$",
587 "patterns": [
588 {
589 "include": "#content-embedded-style-scss"
590 }
591 ],
592 "beginCaptures": {
593 "1": {
594 "name": "punctuation.section.embedded.scope.begin.marko"
595 }
596 },
597 "endCaptures": {
598 "0": {
599 "name": "punctuation.section.embedded.scope.end.marko"
600 }
601 }
602 },
603 "content-concise-mode": {
604 "comment": "Concise mode content block.",
605 "name": "meta.marko-concise-content",
606 "patterns": [
607 {
608 "include": "#scriptlet"
609 },
610 {
611 "include": "#javascript-comments"
612 },
613 {
614 "include": "#cdata"
615 },
616 {
617 "include": "#doctype"
618 },
619 {
620 "include": "#declaration"
621 },
622 {
623 "include": "#html-comment"
624 },
625 {
626 "include": "#concise-html-block"
627 },
628 {
629 "include": "#concise-html-line"
630 },
631 {
632 "include": "#invalid-close-tag"
633 },
634 {
635 "include": "#tag-html"
636 },
637 {
638 "comment": "A concise html tag.",
639 "patterns": [
640 {
641 "comment": "Concise Marko html-comment tag",
642 "begin": "^(\\s*)(?=html-comment\\b)",
643 "while": "(?=^(?:[})\\]`]|\\*/|\\1\\s+(\\S|$)))",
644 "patterns": [
645 {
646 "include": "#concise-open-tag-content"
647 },
648 {
649 "include": "#concise-comment-block"
650 },
651 {
652 "include": "#concise-comment-line"
653 }
654 ]
655 },
656 {
657 "comment": "Concise style tag less",
658 "begin": "^(\\s*)(?=style\\b[^\\s]*\\.less\\b)",
659 "while": "(?=^(?:[})\\]`]|\\*/|\\1\\s+(\\S|$)))",
660 "patterns": [
661 {
662 "include": "#concise-open-tag-content"
663 },
664 {
665 "include": "#concise-style-block-less"
666 },
667 {
668 "include": "#concise-style-line-less"
669 }
670 ]
671 },
672 {
673 "comment": "Concise style tag scss",
674 "begin": "^(\\s*)(?=style\\b[^\\s]*\\.scss\\b)",
675 "while": "(?=^(?:[})\\]`]|\\*/|\\1\\s+(\\S|$)))",
676 "patterns": [
677 {
678 "include": "#concise-open-tag-content"
679 },
680 {
681 "include": "#concise-style-block-scss"
682 },
683 {
684 "include": "#concise-style-line-scss"
685 }
686 ]
687 },
688 {
689 "comment": "Concise style tag js/ts",
690 "begin": "^(\\s*)(?=style\\b[^\\s]*\\.[tj]s\\b)",
691 "while": "(?=^(?:[})\\]`]|\\*/|\\1\\s+(\\S|$)))",
692 "patterns": [
693 {
694 "include": "#concise-open-tag-content"
695 },
696 {
697 "include": "#concise-script-block"
698 },
699 {
700 "include": "#concise-script-line"
701 }
702 ]
703 },
704 {
705 "comment": "Concise style tag",
706 "begin": "^(\\s*)(?=style\\b)",
707 "while": "(?=^(?:[})\\]`]|\\*/|\\1\\s+(\\S|$)))",
708 "patterns": [
709 {
710 "include": "#concise-open-tag-content"
711 },
712 {
713 "include": "#concise-style-block"
714 },
715 {
716 "include": "#concise-style-line"
717 }
718 ]
719 },
720 {
721 "comment": "Concise script tag",
722 "begin": "^(\\s*)(?=script\\b)",
723 "while": "(?=^(?:[})\\]`]|\\*/|\\1\\s+(\\S|$)))",
724 "patterns": [
725 {
726 "include": "#concise-open-tag-content"
727 },
728 {
729 "include": "#concise-script-block"
730 },
731 {
732 "include": "#concise-script-line"
733 }
734 ]
735 },
736 {
737 "comment": "Normal concise tag",
738 "begin": "^([ \\t]*)(?=[a-zA-Z0-9_$@.#])",
739 "while": "(?=^(?:[})\\]`]|\\*/|\\1\\s+(\\S|$)))",
740 "patterns": [
741 {
742 "include": "#concise-open-tag-content"
743 },
744 {
745 "include": "#content-concise-mode"
746 }
747 ]
748 }
749 ]
750 }
751 ]
752 },
753 "content-embedded-comment": {
754 "comment": "Match comment content, but allow Marko placeholders.",
755 "patterns": [
756 {
757 "include": "#placeholder"
758 },
759 {
760 "name": "comment.block.marko",
761 "match": "."
762 }
763 ]
764 },
765 "content-embedded-script": {
766 "comment": "Match script content, but allow Marko placeholders.",
767 "name": "meta.embedded.ts",
768 "patterns": [
769 {
770 "include": "#placeholder"
771 },
772 {
773 "include": "source.ts"
774 }
775 ]
776 },
777 "content-embedded-style": {
778 "comment": "Match css content, but allow Marko placeholders.",
779 "name": "meta.embedded.css",
780 "patterns": [
781 {
782 "include": "#placeholder"
783 },
784 {
785 "include": "source.css"
786 }
787 ]
788 },
789 "content-embedded-style-less": {
790 "comment": "Match less content, but allow Marko placeholders.",
791 "name": "meta.embedded.css.less",
792 "patterns": [
793 {
794 "include": "#placeholder"
795 },
796 {
797 "include": "source.css.less"
798 }
799 ]
800 },
801 "content-embedded-style-scss": {
802 "comment": "Match scss content, but allow Marko placeholders.",
803 "name": "meta.embedded.css.scss",
804 "patterns": [
805 {
806 "include": "#placeholder"
807 },
808 {
809 "include": "source.css.scss"
810 }
811 ]
812 },
813 "content-html-mode": {
814 "comment": "HTML mode content block.",
815 "patterns": [
816 {
817 "include": "#scriptlet"
818 },
819 {
820 "include": "#cdata"
821 },
822 {
823 "include": "#doctype"
824 },
825 {
826 "include": "#declaration"
827 },
828 {
829 "include": "#javascript-comments-after-whitespace"
830 },
831 {
832 "include": "#html-comment"
833 },
834 {
835 "include": "#invalid-close-tag"
836 },
837 {
838 "include": "#tag-html"
839 },
840 {
841 "match": "\\\\.",
842 "name": "text.marko"
843 },
844 {
845 "include": "#placeholder"
846 },
847 {
848 "match": ".+?",
849 "name": "text.marko"
850 }
851 ]
852 },
853 "html-args-or-method": {
854 "comment": "Matches parenthesis for arguments or continues into method shorthand if a { is found.",
855 "patterns": [
856 {
857 "comment": "Javascript style arguments",
858 "name": "meta.embedded.ts",
859 "contentName": "source.ts",
860 "begin": "\\s*(?=\\()",
861 "end": "(?<=\\))",
862 "patterns": [
863 {
864 "include": "source.ts"
865 }
866 ]
867 },
868 {
869 "comment": "Attribute method shorthand following parens",
870 "name": "meta.embedded.ts",
871 "contentName": "source.ts",
872 "begin": "(?<=\\))\\s*(?={)",
873 "end": "(?<=})",
874 "patterns": [
875 {
876 "include": "source.ts"
877 }
878 ]
879 }
880 ]
881 },
882 "html-comment": {
883 "comment": "HTML comment",
884 "name": "comment.block.marko",
885 "begin": "\\s*(<!(--)?)",
886 "end": "\\2>",
887 "beginCaptures": {
888 "1": {
889 "name": "punctuation.definition.comment.marko"
890 }
891 },
892 "endCaptures": {
893 "0": {
894 "name": "punctuation.definition.comment.marko"
895 }
896 }
897 },
898 "cdata": {
899 "name": "meta.tag.metadata.cdata.marko",
900 "contentName": "string.other.inline-data.marko",
901 "begin": "\\s*<!\\[CDATA\\[",
902 "end": "]]>",
903 "beginCaptures": {
904 "0": {
905 "name": "punctuation.definition.tag.begin.marko"
906 }
907 },
908 "endCaptures": {
909 "0": {
910 "name": "punctuation.definition.tag.end.marko"
911 }
912 }
913 },
914 "doctype": {
915 "name": "meta.tag.metadata.doctype.marko",
916 "begin": "\\s*<!(?=(?i:DOCTYPE\\s))",
917 "end": ">",
918 "patterns": [
919 {
920 "match": "\\G(?i:DOCTYPE)",
921 "name": "entity.name.tag.marko"
922 },
923 {
924 "begin": "\"",
925 "end": "\"",
926 "name": "string.quoted.double.marko"
927 },
928 {
929 "match": "[^\\s>]+",
930 "name": "entity.other.attribute-name.marko"
931 }
932 ],
933 "beginCaptures": {
934 "0": {
935 "name": "punctuation.definition.tag.begin.marko"
936 }
937 },
938 "endCaptures": {
939 "0": {
940 "name": "punctuation.definition.tag.end.marko"
941 }
942 }
943 },
944 "declaration": {
945 "name": "meta.tag.metadata.processing.xml.marko",
946 "begin": "(<\\?)\\s*([a-zA-Z0-9_$-]*)",
947 "end": "(\\??>)",
948 "patterns": [
949 {
950 "match": "((?:[^\\s=?>]+|\\?(?!>))+)(=)(?:(\"(?:[^\"\\\\]+|\\\\.)*\")|('(?:[^'\\\\]+|\\\\.)*')|((?:[^\\s?>]+|\\?(?!>))+))",
951 "captures": {
952 "1": {
953 "name": "entity.other.attribute-name.marko"
954 },
955 "2": {
956 "name": "punctuation.separator.key-value.html"
957 },
958 "3": {
959 "name": "string.quoted.double.marko"
960 },
961 "4": {
962 "name": "string.quoted.single.marko"
963 },
964 "5": {
965 "name": "string.unquoted.marko"
966 }
967 }
968 }
969 ],
970 "captures": {
971 "1": {
972 "name": "punctuation.definition.tag.marko"
973 },
974 "2": {
975 "name": "entity.name.tag.marko"
976 }
977 }
978 },
979 "invalid": {
980 "comment": "Used to highlight characters in places where all valid characters should have been matched.",
981 "match": "\\S",
982 "name": "invalid.illegal.character-not-allowed-here.marko"
983 },
984 "javascript-comments": {
985 "patterns": [
986 {
987 "comment": "JavaScript /* block comment */",
988 "contentName": "source.ts",
989 "begin": "\\s*(?=/\\*)",
990 "end": "(?<=\\*/)",
991 "patterns": [
992 {
993 "include": "source.ts"
994 }
995 ]
996 },
997 {
998 "comment": "JavaScript // single line comment",
999 "contentName": "source.ts",
1000 "match": "\\s*//.*$",
1001 "captures": {
1002 "0": {
1003 "patterns": [
1004 {
1005 "include": "source.ts"
1006 }
1007 ]
1008 }
1009 }
1010 }
1011 ]
1012 },
1013 "javascript-comments-after-whitespace": {
1014 "patterns": [
1015 {
1016 "comment": "JavaScript /* block comment */",
1017 "contentName": "source.ts",
1018 "begin": "(?:^|\\s+)(?=/\\*)",
1019 "end": "(?<=\\*/)",
1020 "patterns": [
1021 {
1022 "include": "source.ts"
1023 }
1024 ]
1025 },
1026 {
1027 "comment": "JavaScript // single line comment",
1028 "contentName": "source.ts",
1029 "match": "(?:^|\\s+)//.*$",
1030 "captures": {
1031 "0": {
1032 "patterns": [
1033 {
1034 "include": "source.ts"
1035 }
1036 ]
1037 }
1038 }
1039 }
1040 ]
1041 },
1042 "javascript-expression": {
1043 "comment": "Matches JavaScript source code, but always continues for certain types of expressions.",
1044 "patterns": [
1045 {
1046 "include": "#javascript-comments"
1047 },
1048 {
1049 "comment": "We must match the some expressions ourselves since otherwise the js grammar can overstep.",
1050 "match": "(?:\\s*\\b(?:as|await|extends|in|instanceof|keyof|new|typeof|void))+\\s+(?![:=/,;>])[a-zA-Z0-9_$@#]*",
1051 "captures": {
1052 "0": {
1053 "patterns": [
1054 {
1055 "include": "source.ts"
1056 }
1057 ]
1058 }
1059 }
1060 },
1061 {
1062 "comment": "We must match regexps since otherwise it can be cutoff by self closed tags or comments.",
1063 "contentName": "source.ts",
1064 "applyEndPatternLast": 1,
1065 "match": "(?<![a-zA-Z0-9%).<\\]}])\\s*/(?:[^\\\\\\[/]+|\\\\.|\\[(?:[^\\\\\\]]+|\\\\.)*\\])*/[a-zA-Z]*",
1066 "captures": {
1067 "0": {
1068 "name": "string.regexp.ts",
1069 "patterns": [
1070 {
1071 "include": "source.ts#regexp"
1072 },
1073 {
1074 "include": "source.ts"
1075 }
1076 ]
1077 }
1078 }
1079 },
1080 {
1081 "include": "source.ts"
1082 }
1083 ]
1084 },
1085 "open-tag-content": {
1086 "comment": "Matches everything within an open tag from tag name to the last attr.",
1087 "patterns": [
1088 {
1089 "include": "#tag-before-attrs"
1090 },
1091 {
1092 "comment": "Attributes begin after the first space within the tag name",
1093 "begin": "(?!/?>)",
1094 "end": "(?=/?>)",
1095 "patterns": [
1096 {
1097 "include": "#attrs"
1098 }
1099 ]
1100 }
1101 ]
1102 },
1103 "placeholder": {
1104 "comment": "A Marko template literal expression (allows $!{}).",
1105 "contentName": "source.ts",
1106 "begin": "\\$!?{",
1107 "end": "}",
1108 "patterns": [
1109 {
1110 "include": "source.ts"
1111 }
1112 ],
1113 "beginCaptures": {
1114 "0": {
1115 "name": "punctuation.definition.template-expression.begin.ts"
1116 }
1117 },
1118 "endCaptures": {
1119 "0": {
1120 "name": "punctuation.definition.template-expression.end.ts"
1121 }
1122 }
1123 },
1124 "javascript-placeholder": {
1125 "comment": "A JavaScript style template literal expression.",
1126 "contentName": "source.ts",
1127 "begin": "\\${",
1128 "end": "}",
1129 "patterns": [
1130 {
1131 "include": "source.ts"
1132 }
1133 ],
1134 "beginCaptures": {
1135 "0": {
1136 "name": "punctuation.definition.template-expression.begin.ts"
1137 }
1138 },
1139 "endCaptures": {
1140 "0": {
1141 "name": "punctuation.definition.template-expression.end.ts"
1142 }
1143 }
1144 },
1145 "scriptlet": {
1146 "comment": "An inline JavaScript scriptlet.",
1147 "name": "meta.embedded.ts",
1148 "contentName": "source.ts",
1149 "begin": "^\\s*(\\$)\\s+",
1150 "end": "$",
1151 "patterns": [
1152 {
1153 "include": "source.ts"
1154 }
1155 ],
1156 "beginCaptures": {
1157 "1": {
1158 "name": "keyword.control.scriptlet.marko"
1159 }
1160 }
1161 },
1162 "tag-before-attrs": {
1163 "comment": "Everything in a tag before the attributes content",
1164 "patterns": [
1165 {
1166 "include": "#tag-name"
1167 },
1168 {
1169 "include": "#tag-shorthand-class-or-id"
1170 },
1171 {
1172 "comment": "Variable for a tag",
1173 "name": "meta.embedded.ts",
1174 "contentName": "source.ts",
1175 "begin": "/(?![/*])",
1176 "end": "(?=[,;(|/>]|:?=|\\s+[^:]|$)",
1177 "beginCaptures": {
1178 "0": {
1179 "name": "punctuation.separator.tag-variable.marko"
1180 }
1181 },
1182 "patterns": [
1183 {
1184 "comment": "Match identifiers",
1185 "match": "[a-zA-Z$_][0-9a-zA-Z$_]*",
1186 "name": "variable.other.constant.object.ts"
1187 },
1188 {
1189 "comment": "Match object pattern",
1190 "begin": "{",
1191 "end": "}",
1192 "patterns": [
1193 {
1194 "include": "source.ts#object-binding-element"
1195 },
1196 {
1197 "include": "#javascript-expression"
1198 }
1199 ],
1200 "captures": {
1201 "0": {
1202 "name": "punctuation.definition.binding-pattern.object.ts"
1203 }
1204 }
1205 },
1206 {
1207 "comment": "Match array pattern",
1208 "begin": "\\[",
1209 "end": "]",
1210 "patterns": [
1211 {
1212 "include": "source.ts#array-binding-element"
1213 },
1214 {
1215 "include": "#javascript-expression"
1216 }
1217 ],
1218 "captures": {
1219 "0": {
1220 "name": "punctuation.definition.binding-pattern.array.ts"
1221 }
1222 }
1223 },
1224 {
1225 "comment": "Match type",
1226 "begin": "\\s*(:)(?!=)",
1227 "end": "(?=[,;\\](]|/>|(?<=[^=])>|(?<!(?:^|[!~*%&^|?:]|[!~*%&^|?/<>+=-]=|=>|>{2,}|[^.]\\.|[^-]-|^\\s*\\+\\+|[^\\+]\\+{2}*\\+|[a-zA-Z0-9%).<\\]}]\\s*/|\\b(?<![.]\\s*)(?:await|async|class|function|keyof|new|typeof|void))\\s*)(?:\\n|[ \\t]+(?![\\n{+!~*%&^|?:]|[<>/=-]=|=>|>{2,}|\\.[^.]|-[^-]|/[^>]|(?:in|instanceof|as|extends)\\s+[^:=/,;>])))",
1228 "patterns": [
1229 {
1230 "include": "source.ts#type"
1231 },
1232 {
1233 "include": "#javascript-expression"
1234 }
1235 ],
1236 "beginCaptures": {
1237 "1": {
1238 "name": "keyword.operator.type.annotation.ts"
1239 }
1240 }
1241 },
1242 {
1243 "include": "#javascript-expression"
1244 }
1245 ]
1246 },
1247 {
1248 "comment": "Parameters for a tag",
1249 "contentName": "source.ts",
1250 "begin": "\\|",
1251 "end": "\\|",
1252 "beginCaptures": {
1253 "0": {
1254 "name": "punctuation.section.scope.begin.marko"
1255 }
1256 },
1257 "endCaptures": {
1258 "0": {
1259 "name": "punctuation.section.scope.end.marko"
1260 }
1261 },
1262 "patterns": [
1263 {
1264 "include": "source.ts#function-parameters-body"
1265 },
1266 {
1267 "include": "source.ts"
1268 }
1269 ]
1270 },
1271 {
1272 "include": "#html-args-or-method"
1273 },
1274 {
1275 "include": "#attr-value"
1276 }
1277 ]
1278 },
1279 "tag-html": {
1280 "comment": "Matches an HTML tag and its contents",
1281 "patterns": [
1282 {
1283 "comment": "HTML void elements",
1284 "begin": "\\s*(<)(?=(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)\\b)",
1285 "end": "/?>",
1286 "patterns": [
1287 {
1288 "include": "#open-tag-content"
1289 }
1290 ],
1291 "beginCaptures": {
1292 "1": {
1293 "name": "punctuation.definition.tag.begin.marko"
1294 }
1295 },
1296 "endCaptures": {
1297 "0": {
1298 "name": "punctuation.definition.tag.end.marko"
1299 }
1300 }
1301 },
1302 {
1303 "comment": "Marko html-comment tag",
1304 "begin": "\\s*(<)(?=html-comment\\b)",
1305 "end": "/>|(?<=\\>)",
1306 "patterns": [
1307 {
1308 "include": "#open-tag-content"
1309 },
1310 {
1311 "comment": "Style comment content",
1312 "begin": ">",
1313 "end": "\\s*(</)(html-comment)?(>)",
1314 "patterns": [
1315 {
1316 "include": "#content-embedded-comment"
1317 }
1318 ],
1319 "beginCaptures": {
1320 "0": {
1321 "name": "punctuation.definition.tag.end.marko"
1322 }
1323 },
1324 "endCaptures": {
1325 "1": {
1326 "name": "punctuation.definition.tag.begin.marko"
1327 },
1328 "2": {
1329 "patterns": [
1330 {
1331 "include": "#tag-name"
1332 }
1333 ]
1334 },
1335 "3": {
1336 "name": "punctuation.definition.tag.end.marko"
1337 }
1338 }
1339 }
1340 ],
1341 "beginCaptures": {
1342 "1": {
1343 "name": "punctuation.definition.tag.begin.marko"
1344 }
1345 },
1346 "endCaptures": {
1347 "0": {
1348 "name": "punctuation.definition.tag.end.marko"
1349 }
1350 }
1351 },
1352 {
1353 "comment": "HTML style tag with less",
1354 "begin": "\\s*(<)(?=style\\b[^\\s]*\\.less\\b)",
1355 "end": "/>|(?<=\\>)",
1356 "patterns": [
1357 {
1358 "include": "#open-tag-content"
1359 },
1360 {
1361 "comment": "Style body content",
1362 "contentName": "source.less",
1363 "begin": ">",
1364 "end": "\\s*(</)(style)?(>)",
1365 "patterns": [
1366 {
1367 "include": "#content-embedded-style-less"
1368 }
1369 ],
1370 "beginCaptures": {
1371 "0": {
1372 "name": "punctuation.definition.tag.end.marko"
1373 }
1374 },
1375 "endCaptures": {
1376 "1": {
1377 "name": "punctuation.definition.tag.begin.marko"
1378 },
1379 "2": {
1380 "patterns": [
1381 {
1382 "include": "#tag-name"
1383 }
1384 ]
1385 },
1386 "3": {
1387 "name": "punctuation.definition.tag.end.marko"
1388 }
1389 }
1390 }
1391 ],
1392 "beginCaptures": {
1393 "1": {
1394 "name": "punctuation.definition.tag.begin.marko"
1395 }
1396 },
1397 "endCaptures": {
1398 "0": {
1399 "name": "punctuation.definition.tag.end.marko"
1400 }
1401 }
1402 },
1403 {
1404 "comment": "HTML style tag with scss",
1405 "begin": "\\s*(<)(?=style\\b[^\\s]*\\.scss\\b)",
1406 "end": "/>|(?<=\\>)",
1407 "patterns": [
1408 {
1409 "include": "#open-tag-content"
1410 },
1411 {
1412 "comment": "Style body content",
1413 "contentName": "source.less",
1414 "begin": ">",
1415 "end": "\\s*(</)(style)?(>)",
1416 "patterns": [
1417 {
1418 "include": "#content-embedded-style-scss"
1419 }
1420 ],
1421 "beginCaptures": {
1422 "0": {
1423 "name": "punctuation.definition.tag.end.marko"
1424 }
1425 },
1426 "endCaptures": {
1427 "1": {
1428 "name": "punctuation.definition.tag.begin.marko"
1429 },
1430 "2": {
1431 "patterns": [
1432 {
1433 "include": "#tag-name"
1434 }
1435 ]
1436 },
1437 "3": {
1438 "name": "punctuation.definition.tag.end.marko"
1439 }
1440 }
1441 }
1442 ],
1443 "beginCaptures": {
1444 "1": {
1445 "name": "punctuation.definition.tag.begin.marko"
1446 }
1447 },
1448 "endCaptures": {
1449 "0": {
1450 "name": "punctuation.definition.tag.end.marko"
1451 }
1452 }
1453 },
1454 {
1455 "comment": "HTML style tag with js/ts",
1456 "begin": "\\s*(<)(?=style\\b[^\\s]*\\.[tj]s\\b)",
1457 "end": "/>|(?<=\\>)",
1458 "patterns": [
1459 {
1460 "include": "#open-tag-content"
1461 },
1462 {
1463 "comment": "Style body content",
1464 "contentName": "source.ts",
1465 "begin": ">",
1466 "end": "\\s*(</)(style)?(>)",
1467 "patterns": [
1468 {
1469 "include": "#content-embedded-script"
1470 }
1471 ],
1472 "beginCaptures": {
1473 "0": {
1474 "name": "punctuation.definition.tag.end.marko"
1475 }
1476 },
1477 "endCaptures": {
1478 "1": {
1479 "name": "punctuation.definition.tag.begin.marko"
1480 },
1481 "2": {
1482 "patterns": [
1483 {
1484 "include": "#tag-name"
1485 }
1486 ]
1487 },
1488 "3": {
1489 "name": "punctuation.definition.tag.end.marko"
1490 }
1491 }
1492 }
1493 ],
1494 "beginCaptures": {
1495 "1": {
1496 "name": "punctuation.definition.tag.begin.marko"
1497 }
1498 },
1499 "endCaptures": {
1500 "0": {
1501 "name": "punctuation.definition.tag.end.marko"
1502 }
1503 }
1504 },
1505 {
1506 "comment": "HTML style tag",
1507 "begin": "\\s*(<)(?=style\\b)",
1508 "end": "/>|(?<=\\>)",
1509 "beginCaptures": {
1510 "1": {
1511 "name": "punctuation.definition.tag.begin.marko"
1512 }
1513 },
1514 "endCaptures": {
1515 "0": {
1516 "name": "punctuation.definition.tag.end.marko"
1517 }
1518 },
1519 "patterns": [
1520 {
1521 "include": "#open-tag-content"
1522 },
1523 {
1524 "comment": "Style body content",
1525 "contentName": "source.css",
1526 "begin": ">",
1527 "end": "\\s*(</)(style)?(>)",
1528 "patterns": [
1529 {
1530 "include": "#content-embedded-style"
1531 }
1532 ],
1533 "beginCaptures": {
1534 "0": {
1535 "name": "punctuation.definition.tag.end.marko"
1536 }
1537 },
1538 "endCaptures": {
1539 "1": {
1540 "name": "punctuation.definition.tag.begin.marko"
1541 },
1542 "2": {
1543 "patterns": [
1544 {
1545 "include": "#tag-name"
1546 }
1547 ]
1548 },
1549 "3": {
1550 "name": "punctuation.definition.tag.end.marko"
1551 }
1552 }
1553 }
1554 ]
1555 },
1556 {
1557 "comment": "HTML script tag",
1558 "begin": "\\s*(<)(?=script\\b)",
1559 "end": "/>|(?<=\\>)",
1560 "patterns": [
1561 {
1562 "include": "#open-tag-content"
1563 },
1564 {
1565 "comment": "Script body content",
1566 "contentName": "source.ts",
1567 "begin": ">",
1568 "end": "\\s*(</)(script)?(>)",
1569 "patterns": [
1570 {
1571 "include": "#content-embedded-script"
1572 }
1573 ],
1574 "beginCaptures": {
1575 "0": {
1576 "name": "punctuation.definition.tag.end.marko"
1577 }
1578 },
1579 "endCaptures": {
1580 "1": {
1581 "name": "punctuation.definition.tag.begin.marko"
1582 },
1583 "2": {
1584 "patterns": [
1585 {
1586 "include": "#tag-name"
1587 }
1588 ]
1589 },
1590 "3": {
1591 "name": "punctuation.definition.tag.end.marko"
1592 }
1593 }
1594 }
1595 ],
1596 "beginCaptures": {
1597 "1": {
1598 "name": "punctuation.definition.tag.begin.marko"
1599 }
1600 },
1601 "endCaptures": {
1602 "0": {
1603 "name": "punctuation.definition.tag.end.marko"
1604 }
1605 }
1606 },
1607 {
1608 "comment": "HTML normal tag",
1609 "begin": "\\s*(<)(?=[a-zA-Z0-9_$@.#])",
1610 "end": "/>|(?<=\\>)",
1611 "patterns": [
1612 {
1613 "include": "#open-tag-content"
1614 },
1615 {
1616 "comment": "Body content",
1617 "begin": ">",
1618 "end": "\\s*(</)([a-zA-Z0-9_$:@.#-]+)?(.*?)(>)",
1619 "patterns": [
1620 {
1621 "include": "#content-html-mode"
1622 }
1623 ],
1624 "beginCaptures": {
1625 "0": {
1626 "name": "punctuation.definition.tag.end.marko"
1627 }
1628 },
1629 "endCaptures": {
1630 "1": {
1631 "name": "punctuation.definition.tag.begin.marko"
1632 },
1633 "2": {
1634 "patterns": [
1635 {
1636 "include": "#tag-name"
1637 },
1638 {
1639 "include": "#tag-shorthand-class-or-id"
1640 }
1641 ]
1642 },
1643 "3": {
1644 "patterns": [
1645 {
1646 "include": "#invalid"
1647 }
1648 ]
1649 },
1650 "4": {
1651 "name": "punctuation.definition.tag.end.marko"
1652 }
1653 }
1654 }
1655 ],
1656 "beginCaptures": {
1657 "1": {
1658 "name": "punctuation.definition.tag.begin.marko"
1659 }
1660 },
1661 "endCaptures": {
1662 "0": {
1663 "name": "punctuation.definition.tag.end.marko"
1664 }
1665 }
1666 }
1667 ]
1668 },
1669 "tag-shorthand-class-or-id": {
1670 "comment": "Shorthand class or ID attribute",
1671 "begin": "(?=[#.])",
1672 "end": "$|(?=--|[^a-zA-Z0-9_$#.-])",
1673 "patterns": [
1674 {
1675 "include": "#javascript-placeholder"
1676 },
1677 {
1678 "match": "(?:[#.a-zA-Z0-9_-]+|\\$(?!{))+",
1679 "name": "entity.other.attribute-name.marko"
1680 }
1681 ]
1682 },
1683 "tag-name": {
1684 "comment": "Matches the tag name.",
1685 "patterns": [
1686 {
1687 "match": "\\G(style)\\b(\\.[a-zA-Z0-9$_-]+(?:\\.[a-zA-Z0-9$_-]+)*)|([a-zA-Z0-9_@](?:[a-zA-Z0-9_@-]+|:(?!=))*)",
1688 "captures": {
1689 "1": {
1690 "name": "support.type.builtin.marko"
1691 },
1692 "2": {
1693 "name": "storage.type.marko.css"
1694 },
1695 "3": {
1696 "patterns": [
1697 {
1698 "name": "support.type.builtin.marko",
1699 "match": "(attrs|style|effect|lifecycle)(?=\\b)"
1700 },
1701 {
1702 "name": "keyword.control.flow.marko",
1703 "match": "(for|if|while|else-if|else|try|await|return)(?=\\b)"
1704 },
1705 {
1706 "name": "support.function.marko",
1707 "match": "(macro|tag|async|let|const|set|get|id|html-comment)(?=\\b)(?![-:@])"
1708 },
1709 {
1710 "comment": "Attribute tag.",
1711 "name": "entity.other.attribute-name.marko",
1712 "match": "@.+"
1713 },
1714 {
1715 "comment": "Native or userland tag.",
1716 "name": "entity.name.tag.marko",
1717 "match": ".+"
1718 }
1719 ]
1720 }
1721 }
1722 },
1723 {
1724 "begin": "(?=[a-zA-Z0-9$_]|-[^-])",
1725 "end": "(?=[^a-zA-Z0-9$_-]|$)",
1726 "patterns": [
1727 {
1728 "include": "#javascript-placeholder"
1729 },
1730 {
1731 "match": "(?:[a-zA-Z0-9_-]+|\\$(?!{))+",
1732 "name": "entity.name.tag.marko"
1733 }
1734 ]
1735 }
1736 ]
1737 },
1738 "invalid-close-tag": {
1739 "name": "invalid.illegal.character-not-allowed-here.marko",
1740 "begin": "\\s*</.*?",
1741 "end": ">"
1742 }
1743 }
1744 }
1745