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

1,343 lines 34.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 {
2 "fileTypes": ["marko"],
3 "name": "marko",
4 "patterns": [
5 {
6 "begin": "^\\s*(style)\\s+(\\{)",
7 "beginCaptures": {
8 "1": {
9 "name": "storage.type.marko.css"
10 },
11 "2": {
12 "name": "punctuation.section.scope.begin.marko.css"
13 }
14 },
15 "comment": "CSS style block, eg: style { color: green }",
16 "contentName": "source.css",
17 "end": "\\}",
18 "endCaptures": {
19 "0": {
20 "name": "punctuation.section.scope.end.marko.css"
21 }
22 },
23 "name": "meta.embedded.css",
24 "patterns": [
25 {
26 "include": "source.css"
27 }
28 ]
29 },
30 {
31 "begin": "^\\s*(style)\\.(less)\\s+(\\{)",
32 "beginCaptures": {
33 "1": {
34 "name": "storage.type.marko.css"
35 },
36 "2": {
37 "name": "storage.modifier.marko.css"
38 },
39 "3": {
40 "name": "punctuation.section.scope.begin.marko.css"
41 }
42 },
43 "comment": "Less style block, eg: style.less { color: green }",
44 "contentName": "source.less",
45 "end": "\\}",
46 "endCaptures": {
47 "0": {
48 "name": "punctuation.section.scope.end.marko.css"
49 }
50 },
51 "name": "meta.embedded.less",
52 "patterns": [
53 {
54 "include": "source.css.less"
55 }
56 ]
57 },
58 {
59 "begin": "^\\s*(style)\\.(scss)\\s+(\\{)",
60 "beginCaptures": {
61 "1": {
62 "name": "storage.type.marko.css"
63 },
64 "2": {
65 "name": "storage.modifier.marko.css"
66 },
67 "3": {
68 "name": "punctuation.section.scope.begin.marko.css"
69 }
70 },
71 "comment": "SCSS style block, eg: style.scss { color: green }",
72 "contentName": "source.scss",
73 "end": "\\}",
74 "endCaptures": {
75 "0": {
76 "name": "punctuation.section.scope.end.marko.css"
77 }
78 },
79 "name": "meta.embedded.scss",
80 "patterns": [
81 {
82 "include": "source.css.scss"
83 }
84 ]
85 },
86 {
87 "begin": "^\\s*(?:(static )|(?=(?:class|import|export) ))",
88 "beginCaptures": {
89 "1": {
90 "name": "keyword.control.static.marko"
91 }
92 },
93 "comment": "Top level blocks parsed as JavaScript",
94 "contentName": "source.js",
95 "end": "(?=\\n|$)",
96 "name": "meta.embedded.js",
97 "patterns": [
98 {
99 "include": "#javascript-statement"
100 }
101 ]
102 },
103 {
104 "include": "#content-concise-mode"
105 }
106 ],
107 "repository": {
108 "attrs": {
109 "patterns": [
110 {
111 "applyEndPatternLast": 1,
112 "begin": "(?:\\s+|,)(?:(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_$-]*)?",
113 "beginCaptures": {
114 "1": {
115 "name": "support.type.attribute-name.marko"
116 },
117 "2": {
118 "name": "entity.other.attribute-name.marko"
119 },
120 "3": {
121 "name": "support.function.attribute-name.marko"
122 }
123 },
124 "comment": "Attribute with optional value",
125 "end": "(?=.|$)",
126 "name": "meta.marko-attribute",
127 "patterns": [
128 {
129 "include": "#html-args-or-method"
130 },
131 {
132 "applyEndPatternLast": 1,
133 "begin": "\\s*(:?=)\\s*",
134 "beginCaptures": {
135 "1": {
136 "patterns": [
137 {
138 "include": "source.js"
139 }
140 ]
141 }
142 },
143 "comment": "Attribute value",
144 "contentName": "source.js",
145 "end": "(?=.|$)",
146 "name": "meta.embedded.js",
147 "patterns": [
148 {
149 "include": "#javascript-expression"
150 }
151 ]
152 }
153 ]
154 },
155 {
156 "applyEndPatternLast": 1,
157 "begin": "(?:\\s+|,)\\.\\.\\.",
158 "beginCaptures": {
159 "1": {
160 "name": "keyword.operator.spread.marko"
161 }
162 },
163 "comment": "A ...spread attribute",
164 "contentName": "source.js",
165 "end": "(?=.|$)",
166 "name": "meta.marko-spread-attribute",
167 "patterns": [
168 {
169 "include": "#javascript-expression"
170 }
171 ]
172 },
173 {
174 "begin": "\\s*(,(?!,))",
175 "captures": {
176 "1": {
177 "patterns": [
178 {
179 "include": "source.js"
180 }
181 ]
182 }
183 },
184 "comment": "Consume any whitespace after a comma",
185 "end": "(?!\\S)"
186 },
187 {
188 "include": "#javascript-comment-multiline"
189 },
190 {
191 "include": "#invalid"
192 }
193 ]
194 },
195 "concise-html-block": {
196 "begin": "\\s*(--+)\\s*$",
197 "beginCaptures": {
198 "2": {
199 "name": "punctuation.section.scope.begin.marko"
200 }
201 },
202 "comment": "--- HTML block within concise mode content. ---",
203 "end": "\\1",
204 "endCaptures": {
205 "1": {
206 "name": "punctuation.section.scope.end.marko"
207 }
208 },
209 "name": "meta.section.marko-html-block",
210 "patterns": [
211 {
212 "include": "#content-html-mode"
213 }
214 ]
215 },
216 "concise-html-line": {
217 "captures": {
218 "1": {
219 "name": "punctuation.section.scope.begin.marko"
220 },
221 "2": {
222 "patterns": [
223 {
224 "include": "#html-comments"
225 },
226 {
227 "include": "#tag-html"
228 },
229 {
230 "match": "\\\\.",
231 "name": "string"
232 },
233 {
234 "include": "#placeholder"
235 },
236 {
237 "match": ".+?",
238 "name": "string"
239 }
240 ]
241 }
242 },
243 "comment": "-- HTML line within concise mode content. (content-html-mode w/o scriptlet)",
244 "match": "\\s*(--+)(?=\\s+\\S)(.*$)",
245 "name": "meta.section.marko-html-line"
246 },
247 "concise-open-tag-content": {
248 "patterns": [
249 {
250 "include": "#tag-before-attrs"
251 },
252 {
253 "begin": "\\s*\\[",
254 "beginCaptures": {
255 "0": {
256 "name": "punctuation.section.scope.begin.marko"
257 }
258 },
259 "end": "]",
260 "endCaptures": {
261 "0": {
262 "name": "punctuation.section.scope.end.marko"
263 }
264 },
265 "patterns": [
266 {
267 "include": "#attrs"
268 },
269 {
270 "include": "#invalid"
271 }
272 ]
273 },
274 {
275 "begin": "(?!^)(?= )",
276 "end": "(?=--)|(?<!,)(?=\\n)",
277 "patterns": [
278 {
279 "include": "#attrs"
280 },
281 {
282 "include": "#invalid"
283 }
284 ]
285 }
286 ]
287 },
288 "concise-script-block": {
289 "begin": "(\\s+)(--+)\\s*$",
290 "beginCaptures": {
291 "2": {
292 "name": "punctuation.section.scope.begin.marko"
293 }
294 },
295 "comment": "--- Embedded concise script content block. ---",
296 "end": "(\\2)|(?=^(?!\\1)\\s*\\S)",
297 "endCaptures": {
298 "1": {
299 "name": "punctuation.section.scope.end.marko"
300 }
301 },
302 "name": "meta.section.marko-script-block",
303 "patterns": [
304 {
305 "include": "#content-embedded-script"
306 }
307 ]
308 },
309 "concise-script-line": {
310 "applyEndPatternLast": 1,
311 "begin": "\\s*(--+)",
312 "beginCaptures": {
313 "1": {
314 "name": "punctuation.section.scope.begin.marko"
315 }
316 },
317 "comment": "-- Embedded concise script content line.",
318 "end": "$",
319 "name": "meta.section.marko-script-line",
320 "patterns": [
321 {
322 "include": "#content-embedded-script"
323 }
324 ]
325 },
326 "concise-style-block": {
327 "begin": "(\\s+)(--+)\\s*$",
328 "beginCaptures": {
329 "2": {
330 "name": "punctuation.section.scope.begin.marko"
331 }
332 },
333 "comment": "--- Embedded concise style content block. ---",
334 "contentName": "source.css",
335 "end": "(\\2)|(?=^(?!\\1)\\s*\\S)",
336 "endCaptures": {
337 "1": {
338 "name": "punctuation.section.scope.end.marko"
339 }
340 },
341 "name": "meta.section.marko-style-block",
342 "patterns": [
343 {
344 "include": "#content-embedded-style"
345 }
346 ]
347 },
348 "concise-style-block-less": {
349 "begin": "(\\s+)(--+)\\s*$",
350 "beginCaptures": {
351 "2": {
352 "name": "punctuation.section.scope.begin.marko"
353 }
354 },
355 "comment": "--- Embedded concise style content block. ---",
356 "contentName": "source.less",
357 "end": "(\\2)|(?=^(?!\\1)\\s*\\S)",
358 "endCaptures": {
359 "1": {
360 "name": "punctuation.section.scope.end.marko"
361 }
362 },
363 "name": "meta.section.marko-style-block",
364 "patterns": [
365 {
366 "include": "#content-embedded-style-less"
367 }
368 ]
369 },
370 "concise-style-block-scss": {
371 "begin": "(\\s+)(--+)\\s*$",
372 "beginCaptures": {
373 "2": {
374 "name": "punctuation.section.scope.begin.marko"
375 }
376 },
377 "comment": "--- Embedded concise style content block. ---",
378 "contentName": "source.scss",
379 "end": "(\\2)|(?=^(?!\\1)\\s*\\S)",
380 "endCaptures": {
381 "1": {
382 "name": "punctuation.section.scope.end.marko"
383 }
384 },
385 "name": "meta.section.marko-style-block",
386 "patterns": [
387 {
388 "include": "#content-embedded-style-scss"
389 }
390 ]
391 },
392 "concise-style-line": {
393 "applyEndPatternLast": 1,
394 "begin": "\\s*(--+)",
395 "beginCaptures": {
396 "1": {
397 "name": "punctuation.section.scope.begin.marko"
398 }
399 },
400 "comment": "-- Embedded concise style content line.",
401 "contentName": "source.css",
402 "end": "$",
403 "name": "meta.section.marko-style-line",
404 "patterns": [
405 {
406 "include": "#content-embedded-style"
407 }
408 ]
409 },
410 "concise-style-line-less": {
411 "applyEndPatternLast": 1,
412 "begin": "\\s*(--+)",
413 "beginCaptures": {
414 "1": {
415 "name": "punctuation.section.scope.begin.marko"
416 }
417 },
418 "comment": "-- Embedded concise style content line.",
419 "contentName": "source.less",
420 "end": "$",
421 "name": "meta.section.marko-style-line",
422 "patterns": [
423 {
424 "include": "#content-embedded-style-less"
425 }
426 ]
427 },
428 "concise-style-line-scss": {
429 "applyEndPatternLast": 1,
430 "begin": "\\s*(--+)",
431 "beginCaptures": {
432 "1": {
433 "name": "punctuation.section.scope.begin.marko"
434 }
435 },
436 "comment": "-- Embedded concise style content line.",
437 "contentName": "source.scss",
438 "end": "$",
439 "name": "meta.section.marko-style-line",
440 "patterns": [
441 {
442 "include": "#content-embedded-style-scss"
443 }
444 ]
445 },
446 "content-concise-mode": {
447 "comment": "Concise mode content block.",
448 "name": "meta.marko-concise-content",
449 "patterns": [
450 {
451 "include": "#scriptlet"
452 },
453 {
454 "include": "#javascript-comments"
455 },
456 {
457 "include": "#html-comments"
458 },
459 {
460 "include": "#concise-html-block"
461 },
462 {
463 "include": "#concise-html-line"
464 },
465 {
466 "include": "#tag-html"
467 },
468 {
469 "comment": "A concise html tag.",
470 "patterns": [
471 {
472 "begin": "^(\\s*)(?=style\\.less\\b)",
473 "comment": "Concise style tag less",
474 "patterns": [
475 {
476 "include": "#concise-open-tag-content"
477 },
478 {
479 "include": "#concise-style-block-less"
480 },
481 {
482 "include": "#concise-style-line-less"
483 }
484 ],
485 "while": "(?=^\\1\\s+(\\S|$))"
486 },
487 {
488 "begin": "^(\\s*)(?=style\\.scss\\b)",
489 "comment": "Concise style tag scss",
490 "patterns": [
491 {
492 "include": "#concise-open-tag-content"
493 },
494 {
495 "include": "#concise-style-block-scss"
496 },
497 {
498 "include": "#concise-style-line-scss"
499 }
500 ],
501 "while": "(?=^\\1\\s+(\\S|$))"
502 },
503 {
504 "begin": "^(\\s*)(?=style\\b)",
505 "comment": "Concise style tag",
506 "patterns": [
507 {
508 "include": "#concise-open-tag-content"
509 },
510 {
511 "include": "#concise-style-block"
512 },
513 {
514 "include": "#concise-style-line"
515 }
516 ],
517 "while": "(?=^\\1\\s+(\\S|$))"
518 },
519 {
520 "begin": "^(\\s*)(?=script\\b)",
521 "comment": "Concise script tag",
522 "patterns": [
523 {
524 "include": "#concise-open-tag-content"
525 },
526 {
527 "include": "#concise-script-block"
528 },
529 {
530 "include": "#concise-script-line"
531 }
532 ],
533 "while": "(?=^\\1\\s+(\\S|$))"
534 },
535 {
536 "begin": "^(\\s*)(?=[a-zA-Z0-9_$@])",
537 "comment": "Normal concise tag",
538 "patterns": [
539 {
540 "include": "#concise-open-tag-content"
541 },
542 {
543 "include": "#content-concise-mode"
544 }
545 ],
546 "while": "(?=^\\1\\s+(\\S|$))"
547 }
548 ]
549 },
550 {
551 "include": "#invalid"
552 }
553 ]
554 },
555 "content-embedded-script": {
556 "name": "meta.embedded.js",
557 "patterns": [
558 {
559 "include": "#placeholder"
560 },
561 {
562 "include": "source.js"
563 }
564 ]
565 },
566 "content-embedded-style": {
567 "name": "meta.embedded.css",
568 "patterns": [
569 {
570 "include": "#placeholder"
571 },
572 {
573 "include": "source.css"
574 }
575 ]
576 },
577 "content-embedded-style-less": {
578 "name": "meta.embedded.css.less",
579 "patterns": [
580 {
581 "include": "#placeholder"
582 },
583 {
584 "include": "source.css.less"
585 }
586 ]
587 },
588 "content-embedded-style-scss": {
589 "name": "meta.embedded.css.scss",
590 "patterns": [
591 {
592 "include": "#placeholder"
593 },
594 {
595 "include": "source.css.scss"
596 }
597 ]
598 },
599 "content-html-mode": {
600 "comment": "HTML mode content block.",
601 "patterns": [
602 {
603 "include": "#scriptlet"
604 },
605 {
606 "include": "#html-comments"
607 },
608 {
609 "include": "#tag-html"
610 },
611 {
612 "match": "\\\\.",
613 "name": "string"
614 },
615 {
616 "include": "#placeholder"
617 },
618 {
619 "match": ".+?",
620 "name": "string"
621 }
622 ]
623 },
624 "html-args-or-method": {
625 "patterns": [
626 {
627 "include": "#javascript-args"
628 },
629 {
630 "begin": "(?<=\\))\\s*(?=\\{)",
631 "comment": "Attribute method shorthand following parens",
632 "contentName": "source.js",
633 "end": "(?<=\\})",
634 "name": "meta.embedded.js",
635 "patterns": [
636 {
637 "include": "source.js"
638 }
639 ]
640 }
641 ]
642 },
643 "html-comments": {
644 "patterns": [
645 {
646 "begin": "\\s*(<!(--)?)",
647 "beginCaptures": {
648 "1": {
649 "name": "punctuation.definition.comment.marko"
650 }
651 },
652 "comment": "HTML comments, doctypes & cdata",
653 "end": "\\2>",
654 "endCaptures": {
655 "0": {
656 "name": "punctuation.definition.comment.marko"
657 }
658 },
659 "name": "comment.block.marko"
660 },
661 {
662 "begin": "\\s*(<html-comment>)",
663 "beginCaptures": {
664 "1": {
665 "name": "punctuation.definition.comment.marko"
666 }
667 },
668 "comment": "Preserved HTML comment tag",
669 "end": "</html-comment>",
670 "endCaptures": {
671 "0": {
672 "name": "punctuation.definition.comment.marko"
673 }
674 },
675 "name": "comment.block.marko"
676 }
677 ]
678 },
679 "invalid": {
680 "match": "[^\\s]",
681 "name": "invalid.illegal.character-not-allowed-here.marko"
682 },
683 "javascript-args": {
684 "begin": "(?=\\()",
685 "comment": "Javascript style arguments",
686 "contentName": "source.js",
687 "end": "(?<=\\))",
688 "name": "meta.embedded.js",
689 "patterns": [
690 {
691 "include": "source.js"
692 }
693 ]
694 },
695 "javascript-comment-line": {
696 "captures": {
697 "0": {
698 "patterns": [
699 {
700 "include": "source.js"
701 }
702 ]
703 }
704 },
705 "comment": "JavaScript // single line comment",
706 "contentName": "source.js",
707 "match": "\\s*//.*$"
708 },
709 "javascript-comment-multiline": {
710 "begin": "\\s*(?=/\\*)",
711 "comment": "JavaScript /* block comment */",
712 "contentName": "source.js",
713 "end": "(?<=\\*/)",
714 "patterns": [
715 {
716 "include": "source.js"
717 }
718 ]
719 },
720 "javascript-comments": {
721 "patterns": [
722 {
723 "include": "#javascript-comment-multiline"
724 },
725 {
726 "include": "#javascript-comment-line"
727 }
728 ]
729 },
730 "javascript-enclosed": {
731 "comment": "Matches JavaScript content and ensures enclosed blocks are matched.",
732 "patterns": [
733 {
734 "include": "#javascript-comments"
735 },
736 {
737 "include": "#javascript-args"
738 },
739 {
740 "begin": "(?={)",
741 "end": "(?<=})",
742 "patterns": [
743 {
744 "include": "source.js"
745 }
746 ]
747 },
748 {
749 "begin": "(?=\\[)",
750 "end": "(?<=])",
751 "patterns": [
752 {
753 "include": "source.js"
754 }
755 ]
756 },
757 {
758 "begin": "(?=\")",
759 "end": "(?<=\")",
760 "patterns": [
761 {
762 "include": "source.js"
763 }
764 ]
765 },
766 {
767 "begin": "(?=')",
768 "end": "(?<=')",
769 "patterns": [
770 {
771 "include": "source.js"
772 }
773 ]
774 },
775 {
776 "begin": "(?=`)",
777 "end": "(?<=`)",
778 "patterns": [
779 {
780 "include": "source.js"
781 }
782 ]
783 },
784 {
785 "begin": "/(?!<[\\]})A-Z0-9.<%]\\s*/)(?!/?>|$)",
786 "captures": {
787 "0": {
788 "name": "string.regexp.js"
789 }
790 },
791 "contentName": "source.js",
792 "end": "/[gimsuy]*",
793 "patterns": [
794 {
795 "include": "source.js#regexp"
796 },
797 {
798 "include": "source.js"
799 }
800 ]
801 },
802 {
803 "begin": "(?x)\\s*(?:\n\t\t\t\t\t\t\t\t(?:\\b(?:new|typeof|instanceof|in)\\b)| # Keyword operators\n\t\t\t\t\t\t\t\t\\&\\&|\\|\\|| # Logical operators\n\t\t\t\t\t\t\t\t[\\^|&]| # Bitwise operators\n\t\t\t\t\t\t\t\t[!=]=|[!=]==|<|<[=<]|=>| # Comparison operators (Note you cannot use * or ? here)\n\t\t\t\t\t\t\t\t[?:]| # Ternary operators\n\t\t\t\t\t\t\t\t[-+*%](?!-) # Arithmetic operators\n\t\t\t\t\t\t\t)",
804 "captures": {
805 "0": {
806 "patterns": [
807 {
808 "include": "source.js"
809 }
810 ]
811 }
812 },
813 "end": "(?=\\S)"
814 }
815 ]
816 },
817 "javascript-expression": {
818 "patterns": [
819 {
820 "include": "#javascript-enclosed"
821 },
822 {
823 "captures": {
824 "0": {
825 "patterns": [
826 {
827 "include": "source.js"
828 }
829 ]
830 }
831 },
832 "comment": "Match identifiers and member expressions",
833 "match": "[0-9a-zA-Z$_.]+"
834 }
835 ]
836 },
837 "javascript-statement": {
838 "patterns": [
839 {
840 "include": "#javascript-enclosed"
841 },
842 {
843 "include": "source.js"
844 }
845 ]
846 },
847 "open-tag-content": {
848 "patterns": [
849 {
850 "include": "#tag-before-attrs"
851 },
852 {
853 "begin": "(?= )",
854 "comment": "Attributes begin after the first space within the tag name",
855 "end": "(?=/?>)",
856 "patterns": [
857 {
858 "include": "#attrs"
859 }
860 ]
861 }
862 ]
863 },
864 "placeholder": {
865 "begin": "\\$!?{",
866 "beginCaptures": {
867 "0": {
868 "name": "punctuation.definition.template-expression.begin.js"
869 }
870 },
871 "comment": "${ } placeholder",
872 "contentName": "source.js",
873 "end": "}",
874 "endCaptures": {
875 "0": {
876 "name": "punctuation.definition.template-expression.end.js"
877 }
878 },
879 "patterns": [
880 {
881 "include": "source.js"
882 }
883 ]
884 },
885 "scriptlet": {
886 "begin": "^\\s*(\\$)\\s+",
887 "beginCaptures": {
888 "1": {
889 "name": "keyword.control.scriptlet.marko"
890 }
891 },
892 "comment": "An inline JavaScript scriptlet.",
893 "contentName": "source.js",
894 "end": "$",
895 "name": "meta.embedded.js",
896 "patterns": [
897 {
898 "include": "#javascript-statement"
899 }
900 ]
901 },
902 "tag-before-attrs": {
903 "comment": "Everything in a tag before the attributes content",
904 "patterns": [
905 {
906 "include": "#tag-name"
907 },
908 {
909 "comment": "Shorthand class or ID attribute",
910 "match": "[#.][a-zA-Z0-9_$][a-zA-Z0-9_$-]*",
911 "name": "entity.other.attribute-name.marko"
912 },
913 {
914 "begin": "/(?!/)",
915 "beginCaptures": {
916 "0": {
917 "name": "punctuation.separator.key-value.marko"
918 }
919 },
920 "comment": "Variable for a tag",
921 "contentName": "source.js",
922 "end": "(?=:?\\=|\\s|>|$|\\||\\(|/)",
923 "name": "meta.embedded.js",
924 "patterns": [
925 {
926 "comment": "Match identifiers",
927 "match": "[a-zA-Z$_][0-9a-zA-Z$_]*",
928 "name": "variable.other.constant.object.js"
929 },
930 {
931 "include": "source.js#object-binding-pattern"
932 },
933 {
934 "include": "source.js#array-binding-pattern"
935 },
936 {
937 "include": "source.js#var-single-variable"
938 },
939 {
940 "include": "#javascript-expression"
941 }
942 ]
943 },
944 {
945 "applyEndPatternLast": 1,
946 "begin": "\\s*(:?=)\\s*",
947 "beginCaptures": {
948 "1": {
949 "patterns": [
950 {
951 "include": "source.js"
952 }
953 ]
954 }
955 },
956 "comment": "Default attribute value",
957 "contentName": "source.js",
958 "end": "(?=.|$)",
959 "name": "meta.embedded.js",
960 "patterns": [
961 {
962 "include": "#javascript-expression"
963 }
964 ]
965 },
966 {
967 "begin": "\\|",
968 "beginCaptures": {
969 "0": {
970 "name": "punctuation.section.scope.begin.marko"
971 }
972 },
973 "comment": "Parameters for a tag",
974 "end": "\\|",
975 "endCaptures": {
976 "0": {
977 "name": "punctuation.section.scope.end.marko"
978 }
979 },
980 "patterns": [
981 {
982 "include": "source.js#function-parameters-body"
983 },
984 {
985 "include": "source.js"
986 }
987 ]
988 },
989 {
990 "include": "#html-args-or-method"
991 }
992 ]
993 },
994 "tag-html": {
995 "comment": "Matches an HTML tag and its contents",
996 "patterns": [
997 {
998 "begin": "\\s*(<)(?=(area|base|br|col|embed|hr|img|input|link|meta|param|source|track|wbr)\\b)",
999 "beginCaptures": {
1000 "1": {
1001 "name": "punctuation.definition.tag.end.marko"
1002 }
1003 },
1004 "comment": "HTML void elements",
1005 "end": "/?>",
1006 "endCaptures": {
1007 "0": {
1008 "name": "punctuation.definition.tag.end.marko"
1009 }
1010 },
1011 "patterns": [
1012 {
1013 "include": "#open-tag-content"
1014 }
1015 ]
1016 },
1017 {
1018 "begin": "\\s*(<)(?=style\\.less\\b)",
1019 "beginCaptures": {
1020 "1": {
1021 "name": "punctuation.definition.tag.begin.marko"
1022 }
1023 },
1024 "comment": "HTML style tag with less",
1025 "end": "/>|(?<=\\>)",
1026 "endCaptures": {
1027 "0": {
1028 "name": "punctuation.definition.tag.end.marko"
1029 }
1030 },
1031 "patterns": [
1032 {
1033 "include": "#open-tag-content"
1034 },
1035 {
1036 "begin": ">",
1037 "beginCaptures": {
1038 "0": {
1039 "name": "punctuation.definition.tag.end.marko"
1040 }
1041 },
1042 "comment": "Style body content",
1043 "contentName": "source.less",
1044 "end": "\\s*(</)(style)?(>)",
1045 "endCaptures": {
1046 "1": {
1047 "name": "punctuation.definition.tag.end.marko"
1048 },
1049 "2": {
1050 "patterns": [
1051 {
1052 "include": "#tag-name"
1053 }
1054 ]
1055 },
1056 "3": {
1057 "name": "punctuation.definition.tag.end.marko"
1058 }
1059 },
1060 "patterns": [
1061 {
1062 "include": "#content-embedded-style-less"
1063 }
1064 ]
1065 }
1066 ]
1067 },
1068 {
1069 "begin": "\\s*(<)(?=style\\.scss\\b)",
1070 "beginCaptures": {
1071 "1": {
1072 "name": "punctuation.definition.tag.begin.marko"
1073 }
1074 },
1075 "comment": "HTML style tag with scss",
1076 "end": "/>|(?<=\\>)",
1077 "endCaptures": {
1078 "0": {
1079 "name": "punctuation.definition.tag.end.marko"
1080 }
1081 },
1082 "patterns": [
1083 {
1084 "include": "#open-tag-content"
1085 },
1086 {
1087 "begin": ">",
1088 "beginCaptures": {
1089 "0": {
1090 "name": "punctuation.definition.tag.end.marko"
1091 }
1092 },
1093 "comment": "Style body content",
1094 "contentName": "source.less",
1095 "end": "\\s*(</)(style)?(>)",
1096 "endCaptures": {
1097 "1": {
1098 "name": "punctuation.definition.tag.end.marko"
1099 },
1100 "2": {
1101 "patterns": [
1102 {
1103 "include": "#tag-name"
1104 }
1105 ]
1106 },
1107 "3": {
1108 "name": "punctuation.definition.tag.end.marko"
1109 }
1110 },
1111 "patterns": [
1112 {
1113 "include": "#content-embedded-style-scss"
1114 }
1115 ]
1116 }
1117 ]
1118 },
1119 {
1120 "begin": "\\s*(<)(?=style\\b)",
1121 "beginCaptures": {
1122 "1": {
1123 "name": "punctuation.definition.tag.begin.marko"
1124 }
1125 },
1126 "comment": "HTML style tag",
1127 "end": "/>|(?<=\\>)",
1128 "endCaptures": {
1129 "0": {
1130 "name": "punctuation.definition.tag.end.marko"
1131 }
1132 },
1133 "patterns": [
1134 {
1135 "include": "#open-tag-content"
1136 },
1137 {
1138 "begin": ">",
1139 "beginCaptures": {
1140 "0": {
1141 "name": "punctuation.definition.tag.end.marko"
1142 }
1143 },
1144 "comment": "Style body content",
1145 "contentName": "source.css",
1146 "end": "\\s*(</)(style)?(>)",
1147 "endCaptures": {
1148 "1": {
1149 "name": "punctuation.definition.tag.end.marko"
1150 },
1151 "2": {
1152 "patterns": [
1153 {
1154 "include": "#tag-name"
1155 }
1156 ]
1157 },
1158 "3": {
1159 "name": "punctuation.definition.tag.end.marko"
1160 }
1161 },
1162 "patterns": [
1163 {
1164 "include": "#content-embedded-style"
1165 }
1166 ]
1167 }
1168 ]
1169 },
1170 {
1171 "begin": "\\s*(<)(?=script\\b)",
1172 "beginCaptures": {
1173 "1": {
1174 "name": "punctuation.definition.tag.begin.marko"
1175 }
1176 },
1177 "comment": "HTML script tag",
1178 "end": "/>|(?<=\\>)",
1179 "endCaptures": {
1180 "0": {
1181 "name": "punctuation.definition.tag.end.marko"
1182 }
1183 },
1184 "patterns": [
1185 {
1186 "include": "#open-tag-content"
1187 },
1188 {
1189 "begin": ">",
1190 "beginCaptures": {
1191 "0": {
1192 "name": "punctuation.definition.tag.end.marko"
1193 }
1194 },
1195 "comment": "Script body content",
1196 "contentName": "source.js",
1197 "end": "\\s*(</)(script)?(>)",
1198 "endCaptures": {
1199 "1": {
1200 "name": "punctuation.definition.tag.end.marko"
1201 },
1202 "2": {
1203 "patterns": [
1204 {
1205 "include": "#tag-name"
1206 }
1207 ]
1208 },
1209 "3": {
1210 "name": "punctuation.definition.tag.end.marko"
1211 }
1212 },
1213 "patterns": [
1214 {
1215 "include": "#content-embedded-script"
1216 }
1217 ]
1218 }
1219 ]
1220 },
1221 {
1222 "begin": "\\s*(<)(?=[a-zA-Z0-9_$@])",
1223 "beginCaptures": {
1224 "1": {
1225 "name": "punctuation.definition.tag.begin.marko"
1226 }
1227 },
1228 "comment": "HTML normal tag",
1229 "end": "/>|(?<=\\>)",
1230 "endCaptures": {
1231 "0": {
1232 "name": "punctuation.definition.tag.end.marko"
1233 }
1234 },
1235 "patterns": [
1236 {
1237 "include": "#open-tag-content"
1238 },
1239 {
1240 "begin": ">",
1241 "beginCaptures": {
1242 "0": {
1243 "name": "punctuation.definition.tag.end.marko"
1244 }
1245 },
1246 "comment": "Body content",
1247 "end": "\\s*(</)([a-zA-Z0-9_$:@-]+)?(.*?)(>)",
1248 "endCaptures": {
1249 "1": {
1250 "name": "punctuation.definition.tag.end.marko"
1251 },
1252 "2": {
1253 "patterns": [
1254 {
1255 "include": "#tag-name"
1256 }
1257 ]
1258 },
1259 "3": {
1260 "patterns": [
1261 {
1262 "include": "#invalid"
1263 }
1264 ]
1265 },
1266 "4": {
1267 "name": "punctuation.definition.tag.end.marko"
1268 }
1269 },
1270 "patterns": [
1271 {
1272 "include": "#content-html-mode"
1273 }
1274 ]
1275 }
1276 ]
1277 }
1278 ]
1279 },
1280 "tag-name": {
1281 "patterns": [
1282 {
1283 "begin": "\\${",
1284 "beginCaptures": {
1285 "0": {
1286 "name": "punctuation.definition.template-expression.begin.js"
1287 }
1288 },
1289 "comment": "Dynamic tag.",
1290 "end": "}",
1291 "endCaptures": {
1292 "0": {
1293 "name": "punctuation.definition.template-expression.end.js"
1294 }
1295 },
1296 "patterns": [
1297 {
1298 "include": "source.js"
1299 }
1300 ]
1301 },
1302 {
1303 "captures": {
1304 "1": {
1305 "name": "entity.name.tag.marko"
1306 },
1307 "2": {
1308 "name": "storage.type.marko.css"
1309 },
1310 "3": {
1311 "patterns": [
1312 {
1313 "comment": "Core tag.",
1314 "match": "(attrs|return|import)(?=\\b)",
1315 "name": "support.type.builtin.marko"
1316 },
1317 {
1318 "comment": "Core tag.",
1319 "match": "(for|if|while|else-if|else|macro|tag|await|let|const|effect|set|get|id|lifecycle)(?=\\b)",
1320 "name": "support.function.marko"
1321 },
1322 {
1323 "comment": "Attribute tag.",
1324 "match": "@.+",
1325 "name": "entity.other.attribute-name.marko"
1326 },
1327 {
1328 "comment": "Native or userland tag.",
1329 "match": ".+",
1330 "name": "entity.name.tag.marko"
1331 }
1332 ]
1333 }
1334 },
1335 "match": "(style)\\.([a-zA-Z0-9$_-]+(?:\\.[a-zA-Z0-9$_-]+)*)|([a-zA-Z0-9_$@][a-zA-Z0-9_$@:-]*)"
1336 }
1337 ]
1338 }
1339 },
1340 "scopeName": "text.marko",
1341 "uuid": "46c8c3f8-cabe-466a-a633-5deafdc51253"
1342 }
1343