PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.9.1
Code Block Pro – Beautiful Syntax Highlighting v1.9.1
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.9.1, at build/shiki/languages/marko.tmLanguage.json

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