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 / twig.tmLanguage.json

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

1,393 lines 35.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 {
2 "fileTypes": ["twig", "html.twig"],
3 "firstLineMatch": "<!(?i:DOCTYPE)|<(?i:html)|<\\?(?i:php)|\\{\\{|\\{%|\\{#",
4 "foldingStartMarker": "(?x)\n (<(?i:body|div|dl|fieldset|form|head|li|ol|script|select|style|table|tbody|tfoot|thead|tr|ul)\\b.*?>\n |<!--(?!.*--\\s*>)\n |^<!--\\ \\#tminclude\\ (?>.*?-->)$\n |\\{%\\s+(autoescape|block|embed|filter|for|if|macro|raw|sandbox|set|spaceless|trans|verbatim)\n )",
5 "foldingStopMarker": "(?x)\n (</(?i:body|div|dl|fieldset|form|head|li|ol|script|select|style|table|tbody|tfoot|thead|tr|ul)>\n |^(?!.*?<!--).*?--\\s*>\n |^<!--\\ end\\ tminclude\\ -->$\n |\\{%\\s+end(autoescape|block|embed|filter|for|if|macro|raw|sandbox|set|spaceless|trans|verbatim)\n )",
6 "keyEquivalent": "^~T",
7 "name": "twig",
8 "patterns": [
9 {
10 "begin": "(<)([a-zA-Z0-9:]++)(?=[^>]*></\\2>)",
11 "beginCaptures": {
12 "1": {
13 "name": "punctuation.definition.tag.html"
14 },
15 "2": {
16 "name": "entity.name.tag.html"
17 }
18 },
19 "end": "(>(<)/)(\\2)(>)",
20 "endCaptures": {
21 "1": {
22 "name": "punctuation.definition.tag.html"
23 },
24 "2": {
25 "name": "meta.scope.between-tag-pair.html"
26 },
27 "3": {
28 "name": "entity.name.tag.html"
29 },
30 "4": {
31 "name": "punctuation.definition.tag.html"
32 }
33 },
34 "name": "meta.tag.any.html",
35 "patterns": [
36 {
37 "include": "#tag-stuff"
38 }
39 ]
40 },
41 {
42 "begin": "(<\\?)(xml)",
43 "captures": {
44 "1": {
45 "name": "punctuation.definition.tag.html"
46 },
47 "2": {
48 "name": "entity.name.tag.xml.html"
49 }
50 },
51 "end": "(\\?>)",
52 "name": "meta.tag.preprocessor.xml.html",
53 "patterns": [
54 {
55 "include": "#tag-generic-attribute"
56 },
57 {
58 "include": "#string-double-quoted"
59 },
60 {
61 "include": "#string-single-quoted"
62 }
63 ]
64 },
65 {
66 "begin": "<!--",
67 "captures": {
68 "0": {
69 "name": "punctuation.definition.comment.html"
70 }
71 },
72 "end": "--\\s*>",
73 "name": "comment.block.html",
74 "patterns": [
75 {
76 "match": "--",
77 "name": "invalid.illegal.bad-comments-or-CDATA.html"
78 },
79 {
80 "include": "#embedded-code"
81 }
82 ]
83 },
84 {
85 "begin": "<!",
86 "captures": {
87 "0": {
88 "name": "punctuation.definition.tag.html"
89 }
90 },
91 "end": ">",
92 "name": "meta.tag.sgml.html",
93 "patterns": [
94 {
95 "begin": "(?i:DOCTYPE)",
96 "captures": {
97 "1": {
98 "name": "entity.name.tag.doctype.html"
99 }
100 },
101 "end": "(?=>)",
102 "name": "meta.tag.sgml.doctype.html",
103 "patterns": [
104 {
105 "match": "\"[^\">]*\"",
106 "name": "string.quoted.double.doctype.identifiers-and-DTDs.html"
107 }
108 ]
109 },
110 {
111 "begin": "\\[CDATA\\[",
112 "end": "]](?=>)",
113 "name": "constant.other.inline-data.html"
114 },
115 {
116 "match": "(\\s*)(?!--|>)\\S(\\s*)",
117 "name": "invalid.illegal.bad-comments-or-CDATA.html"
118 }
119 ]
120 },
121 {
122 "include": "#embedded-code"
123 },
124 {
125 "begin": "(?:^\\s+)?(<)((?i:style))\\b(?![^>]*/>)",
126 "captures": {
127 "1": {
128 "name": "punctuation.definition.tag.html"
129 },
130 "2": {
131 "name": "entity.name.tag.style.html"
132 },
133 "3": {
134 "name": "punctuation.definition.tag.html"
135 }
136 },
137 "end": "(</)((?i:style))(>)(?:\\s*\\n)?",
138 "name": "source.css.embedded.html",
139 "patterns": [
140 {
141 "include": "#tag-stuff"
142 },
143 {
144 "begin": "(>)",
145 "beginCaptures": {
146 "1": {
147 "name": "punctuation.definition.tag.html"
148 }
149 },
150 "end": "(?=</(?i:style))",
151 "patterns": [
152 {
153 "include": "#embedded-code"
154 },
155 {
156 "include": "source.css"
157 }
158 ]
159 }
160 ]
161 },
162 {
163 "begin": "(?:^\\s+)?(<)((?i:script))\\b(?![^>]*/>)",
164 "beginCaptures": {
165 "1": {
166 "name": "punctuation.definition.tag.html"
167 },
168 "2": {
169 "name": "entity.name.tag.script.html"
170 }
171 },
172 "end": "(?<=</(script|SCRIPT))(>)(?:\\s*\\n)?",
173 "endCaptures": {
174 "2": {
175 "name": "punctuation.definition.tag.html"
176 }
177 },
178 "name": "source.js.embedded.html",
179 "patterns": [
180 {
181 "include": "#tag-stuff"
182 },
183 {
184 "begin": "(?<!</(?:script|SCRIPT))(>)",
185 "captures": {
186 "1": {
187 "name": "punctuation.definition.tag.html"
188 },
189 "2": {
190 "name": "entity.name.tag.script.html"
191 }
192 },
193 "end": "(</)((?i:script))",
194 "patterns": [
195 {
196 "captures": {
197 "1": {
198 "name": "punctuation.definition.comment.js"
199 }
200 },
201 "match": "(//).*?((?=</script)|$\\n?)",
202 "name": "comment.line.double-slash.js"
203 },
204 {
205 "begin": "/\\*",
206 "captures": {
207 "0": {
208 "name": "punctuation.definition.comment.js"
209 }
210 },
211 "end": "\\*/|(?=</script)",
212 "name": "comment.block.js"
213 },
214 {
215 "include": "#php"
216 },
217 {
218 "include": "#twig-print-tag"
219 },
220 {
221 "include": "#twig-statement-tag"
222 },
223 {
224 "include": "#twig-comment-tag"
225 },
226 {
227 "include": "source.js"
228 }
229 ]
230 }
231 ]
232 },
233 {
234 "begin": "(?ix) # Enable free spacing mode, case insensitive\n # Make sure our opening js tag has word boundaries\n (?<=\\{\\%\\sjs\\s\\%\\}|\\{\\%\\sincludejs\\s\\%\\})\n ",
235 "comment": "Add JS support to set tags that use the pattern \"css\" in their name",
236 "end": "(?ix)(?=\\{\\%\\sendjs\\s\\%\\}|\\{\\%\\sendincludejs\\s\\%\\})",
237 "name": "source.js.embedded.twig",
238 "patterns": [
239 {
240 "include": "source.js"
241 }
242 ]
243 },
244 {
245 "begin": "(?ix) # Enable free spacing mode, case insensitive\n (?<=\\{\\%\\scss\\s\\%\\}|\\{\\%\\sincludecss\\s\\%\\}|\\{\\%\\sincludehirescss\\s\\%\\})\n ",
246 "comment": "Add CSS support to set tags that use the pattern \"css\" in their name",
247 "end": "(?ix)(?=\\{\\%\\sendcss\\s\\%\\}|\\{\\%\\sendincludecss\\s\\%\\}|\\{\\%\\sendincludehirescss\\s\\%\\})",
248 "name": "source.css.embedded.twig",
249 "patterns": [
250 {
251 "include": "source.css"
252 }
253 ]
254 },
255 {
256 "begin": "(?ix) # Enable free spacing mode, case insensitive\n (?<=\\{\\%\\sscss\\s\\%\\}|\\{\\%\\sincludescss\\s\\%\\}|\\{\\%\\sincludehiresscss\\s\\%\\})\n ",
257 "comment": "Add SCSS support to set tags that use the pattern \"scss\" in their name",
258 "end": "(?ix)(?=\\{\\%\\sendscss\\s\\%\\}|\\{\\%\\sendincludescss\\s\\%\\}|\\{\\%\\sendincludehiresscss\\s\\%\\})",
259 "name": "source.css.scss.embedded.twig",
260 "patterns": [
261 {
262 "include": "source.css.scss"
263 }
264 ]
265 },
266 {
267 "begin": "(</?)((?i:body|head|html)\\b)",
268 "captures": {
269 "1": {
270 "name": "punctuation.definition.tag.html"
271 },
272 "2": {
273 "name": "entity.name.tag.structure.any.html"
274 }
275 },
276 "end": "(>)",
277 "name": "meta.tag.structure.any.html",
278 "patterns": [
279 {
280 "include": "#tag-stuff"
281 }
282 ]
283 },
284 {
285 "begin": "(</?)((?i:address|blockquote|dd|div|dl|dt|fieldset|form|frame|frameset|h1|h2|h3|h4|h5|h6|iframe|noframes|object|ol|p|ul|applet|center|dir|hr|menu|pre)\\b)",
286 "beginCaptures": {
287 "1": {
288 "name": "punctuation.definition.tag.begin.html"
289 },
290 "2": {
291 "name": "entity.name.tag.block.any.html"
292 }
293 },
294 "end": "(>)",
295 "endCaptures": {
296 "1": {
297 "name": "punctuation.definition.tag.end.html"
298 }
299 },
300 "name": "meta.tag.block.any.html",
301 "patterns": [
302 {
303 "include": "#tag-stuff"
304 }
305 ]
306 },
307 {
308 "begin": "(</?)((?i:a|abbr|acronym|area|b|base|basefont|bdo|big|br|button|caption|cite|code|col|colgroup|del|dfn|em|font|head|html|i|img|input|ins|isindex|kbd|label|legend|li|link|map|meta|noscript|optgroup|option|param|q|s|samp|script|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|title|tr|tt|u|var)\\b)",
309 "beginCaptures": {
310 "1": {
311 "name": "punctuation.definition.tag.begin.html"
312 },
313 "2": {
314 "name": "entity.name.tag.inline.any.html"
315 }
316 },
317 "end": "((?: ?/)?>)",
318 "endCaptures": {
319 "1": {
320 "name": "punctuation.definition.tag.end.html"
321 }
322 },
323 "name": "meta.tag.inline.any.html",
324 "patterns": [
325 {
326 "include": "#tag-stuff"
327 }
328 ]
329 },
330 {
331 "begin": "(</?)([a-zA-Z0-9:]+)",
332 "beginCaptures": {
333 "1": {
334 "name": "punctuation.definition.tag.begin.html"
335 },
336 "2": {
337 "name": "entity.name.tag.other.html"
338 }
339 },
340 "end": "(>)",
341 "endCaptures": {
342 "1": {
343 "name": "punctuation.definition.tag.end.html"
344 }
345 },
346 "name": "meta.tag.other.html",
347 "patterns": [
348 {
349 "include": "#tag-stuff"
350 }
351 ]
352 },
353 {
354 "include": "#entities"
355 },
356 {
357 "match": "<>",
358 "name": "invalid.illegal.incomplete.html"
359 },
360 {
361 "match": "<",
362 "name": "invalid.illegal.bad-angle-bracket.html"
363 },
364 {
365 "include": "#twig-print-tag"
366 },
367 {
368 "include": "#twig-statement-tag"
369 },
370 {
371 "include": "#twig-comment-tag"
372 }
373 ],
374 "repository": {
375 "embedded-code": {
376 "patterns": [
377 {
378 "include": "#ruby"
379 },
380 {
381 "include": "#php"
382 },
383 {
384 "include": "#twig-print-tag"
385 },
386 {
387 "include": "#twig-statement-tag"
388 },
389 {
390 "include": "#twig-comment-tag"
391 },
392 {
393 "include": "#python"
394 }
395 ]
396 },
397 "entities": {
398 "patterns": [
399 {
400 "captures": {
401 "1": {
402 "name": "punctuation.definition.entity.html"
403 },
404 "3": {
405 "name": "punctuation.definition.entity.html"
406 }
407 },
408 "match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)",
409 "name": "constant.character.entity.html"
410 },
411 {
412 "match": "&",
413 "name": "invalid.illegal.bad-ampersand.html"
414 }
415 ]
416 },
417 "twig-print-tag": {
418 "begin": "\\{\\{-?",
419 "beginCaptures": {
420 "0": {
421 "name": "punctuation.section.tag.twig"
422 }
423 },
424 "end": "-?\\}\\}",
425 "endCaptures": {
426 "0": {
427 "name": "punctuation.section.tag.twig"
428 }
429 },
430 "name": "meta.tag.template.value.twig",
431 "patterns": [
432 {
433 "include": "#twig-constants"
434 },
435 {
436 "include": "#twig-operators"
437 },
438 {
439 "include": "#twig-functions-warg"
440 },
441 {
442 "include": "#twig-functions"
443 },
444 {
445 "include": "#twig-macros"
446 },
447 {
448 "include": "#twig-objects"
449 },
450 {
451 "include": "#twig-properties"
452 },
453 {
454 "include": "#twig-filters-warg"
455 },
456 {
457 "include": "#twig-filters"
458 },
459 {
460 "include": "#twig-filters-warg-ud"
461 },
462 {
463 "include": "#twig-filters-ud"
464 },
465 {
466 "include": "#twig-strings"
467 },
468 {
469 "include": "#twig-arrays"
470 },
471 {
472 "include": "#twig-hashes"
473 }
474 ]
475 },
476 "twig-statement-tag": {
477 "begin": "\\{%-?",
478 "beginCaptures": {
479 "0": {
480 "name": "punctuation.section.tag.twig"
481 }
482 },
483 "end": "-?%\\}",
484 "endCaptures": {
485 "0": {
486 "name": "punctuation.section.tag.twig"
487 }
488 },
489 "name": "meta.tag.template.block.twig",
490 "patterns": [
491 {
492 "include": "#twig-constants"
493 },
494 {
495 "include": "#twig-keywords"
496 },
497 {
498 "include": "#twig-operators"
499 },
500 {
501 "include": "#twig-functions-warg"
502 },
503 {
504 "include": "#twig-functions"
505 },
506 {
507 "include": "#twig-macros"
508 },
509 {
510 "include": "#twig-filters-warg"
511 },
512 {
513 "include": "#twig-filters"
514 },
515 {
516 "include": "#twig-filters-warg-ud"
517 },
518 {
519 "include": "#twig-filters-ud"
520 },
521 {
522 "include": "#twig-objects"
523 },
524 {
525 "include": "#twig-properties"
526 },
527 {
528 "include": "#twig-strings"
529 },
530 {
531 "include": "#twig-arrays"
532 },
533 {
534 "include": "#twig-hashes"
535 }
536 ]
537 },
538 "twig-comment-tag": {
539 "begin": "\\{#-?",
540 "beginCaptures": {
541 "0": {
542 "name": "punctuation.definition.comment.begin.twig"
543 }
544 },
545 "end": "-?#\\}",
546 "endCaptures": {
547 "0": {
548 "name": "punctuation.definition.comment.end.twig"
549 }
550 },
551 "name": "comment.block.twig"
552 },
553 "twig-constants": {
554 "patterns": [
555 {
556 "match": "(?i)(?<=[\\s\\[\\(\\{:,])(?:true|false|null|none)(?=[\\s\\)\\]\\}\\,])",
557 "name": "constant.language.twig"
558 },
559 {
560 "match": "(?<=[\\s\\[\\(\\{:,]|\\.\\.|\\*\\*)[0-9]+(?:\\.[0-9]+)?(?=[\\s\\)\\]\\}\\,]|\\.\\.|\\*\\*)",
561 "name": "constant.numeric.twig"
562 }
563 ]
564 },
565 "twig-operators": {
566 "patterns": [
567 {
568 "captures": {
569 "1": {
570 "name": "keyword.operator.arithmetic.twig"
571 }
572 },
573 "match": "(?<=\\s)(\\+|-|//?|%|\\*\\*?)(?=\\s)"
574 },
575 {
576 "captures": {
577 "1": {
578 "name": "keyword.operator.assignment.twig"
579 }
580 },
581 "match": "(?<=\\s)(=|~)(?=\\s)"
582 },
583 {
584 "captures": {
585 "1": {
586 "name": "keyword.operator.bitwise.twig"
587 }
588 },
589 "match": "(?<=\\s)(b-(?:and|or|xor))(?=\\s)"
590 },
591 {
592 "captures": {
593 "1": {
594 "name": "keyword.operator.comparison.twig"
595 }
596 },
597 "match": "(?<=\\s)((?:!|=)=|<=?|>=?|(?:not )?in|is(?: not)?|(?:ends|starts) with|matches)(?=\\s)"
598 },
599 {
600 "captures": {
601 "1": {
602 "name": "keyword.operator.logical.twig"
603 }
604 },
605 "match": "(?<=\\s)(\\?|:|\\?:|\\?\\?|and|not|or)(?=\\s)"
606 },
607 {
608 "captures": {
609 "0": {
610 "name": "keyword.operator.other.twig"
611 }
612 },
613 "match": "(?<=[a-zA-Z0-9_\\x{7f}-\\x{ff}\\]\\)'\"])\\.\\.(?=[a-zA-Z0-9_\\x{7f}-\\x{ff}'\"])"
614 },
615 {
616 "captures": {
617 "0": {
618 "name": "keyword.operator.other.twig"
619 }
620 },
621 "match": "(?<=[a-zA-Z0-9_\\x{7f}-\\x{ff}\\]\\}\\)'\"])\\|(?=[a-zA-Z_\\x{7f}-\\x{ff}])"
622 }
623 ]
624 },
625 "twig-objects": {
626 "captures": {
627 "1": {
628 "name": "variable.other.twig"
629 }
630 },
631 "match": "(?<=[\\s\\{\\[\\(:,])([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)(?=[\\s\\}\\[\\]\\(\\)\\.\\|,:])"
632 },
633 "twig-properties": {
634 "patterns": [
635 {
636 "captures": {
637 "1": {
638 "name": "punctuation.separator.property.twig"
639 },
640 "2": {
641 "name": "variable.other.property.twig"
642 }
643 },
644 "match": "(?x)\n (?<=[a-zA-Z0-9_\\x{7f}-\\x{ff}])\n (\\.)([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)\n (?=[\\.\\s\\|\\[\\)\\]\\}:,])\n "
645 },
646 {
647 "begin": "(?x)\n (?<=[a-zA-Z0-9_\\x{7f}-\\x{ff}])\n (\\.)([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)\n (\\()\n ",
648 "beginCaptures": {
649 "1": {
650 "name": "punctuation.separator.property.twig"
651 },
652 "2": {
653 "name": "variable.other.property.twig"
654 },
655 "3": {
656 "name": "punctuation.definition.parameters.begin.twig"
657 }
658 },
659 "end": "\\)",
660 "endCaptures": {
661 "0": {
662 "name": "punctuation.definition.parameters.end.twig"
663 }
664 },
665 "patterns": [
666 {
667 "include": "#twig-constants"
668 },
669 {
670 "include": "#twig-functions-warg"
671 },
672 {
673 "include": "#twig-functions"
674 },
675 {
676 "include": "#twig-macros"
677 },
678 {
679 "include": "#twig-objects"
680 },
681 {
682 "include": "#twig-properties"
683 },
684 {
685 "include": "#twig-filters-warg"
686 },
687 {
688 "include": "#twig-filters"
689 },
690 {
691 "include": "#twig-filters-warg-ud"
692 },
693 {
694 "include": "#twig-filters-ud"
695 },
696 {
697 "include": "#twig-strings"
698 },
699 {
700 "include": "#twig-arrays"
701 }
702 ],
703 "contentName": "meta.function.arguments.twig"
704 },
705 {
706 "captures": {
707 "1": {
708 "name": "punctuation.section.array.begin.twig"
709 },
710 "2": {
711 "name": "variable.other.property.twig"
712 },
713 "3": {
714 "name": "punctuation.section.array.end.twig"
715 },
716 "4": {
717 "name": "punctuation.section.array.begin.twig"
718 },
719 "5": {
720 "name": "variable.other.property.twig"
721 },
722 "6": {
723 "name": "punctuation.section.array.end.twig"
724 },
725 "7": {
726 "name": "punctuation.section.array.begin.twig"
727 },
728 "8": {
729 "name": "variable.other.property.twig"
730 },
731 "9": {
732 "name": "punctuation.section.array.end.twig"
733 }
734 },
735 "match": "(?x)\n (?<=[a-zA-Z0-9_\\x{7f}-\\x{ff}\\]])\n (?:\n (\\[)('[a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*')(\\])\n |(\\[)(\"[a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*\")(\\])\n |(\\[)([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)(\\])\n )\n "
736 }
737 ]
738 },
739 "twig-strings": {
740 "patterns": [
741 {
742 "begin": "(?:(?<!\\\\)|(?<=\\\\\\\\))'",
743 "beginCaptures": {
744 "0": {
745 "name": "punctuation.definition.string.begin.twig"
746 }
747 },
748 "end": "(?:(?<!\\\\)|(?<=\\\\\\\\))'",
749 "endCaptures": {
750 "0": {
751 "name": "punctuation.definition.string.end.twig"
752 }
753 },
754 "name": "string.quoted.single.twig"
755 },
756 {
757 "begin": "(?:(?<!\\\\)|(?<=\\\\\\\\))\"",
758 "beginCaptures": {
759 "0": {
760 "name": "punctuation.definition.string.begin.twig"
761 }
762 },
763 "end": "(?:(?<!\\\\)|(?<=\\\\\\\\))\"",
764 "endCaptures": {
765 "0": {
766 "name": "punctuation.definition.string.end.twig"
767 }
768 },
769 "name": "string.quoted.double.twig"
770 }
771 ]
772 },
773 "twig-arrays": {
774 "begin": "(?<=[\\s\\(\\{\\[:,])\\[",
775 "beginCaptures": {
776 "0": {
777 "name": "punctuation.section.array.begin.twig"
778 }
779 },
780 "end": "\\]",
781 "endCaptures": {
782 "0": {
783 "name": "punctuation.section.array.end.twig"
784 }
785 },
786 "patterns": [
787 {
788 "include": "#twig-arrays"
789 },
790 {
791 "include": "#twig-hashes"
792 },
793 {
794 "include": "#twig-constants"
795 },
796 {
797 "include": "#twig-operators"
798 },
799 {
800 "include": "#twig-strings"
801 },
802 {
803 "include": "#twig-functions-warg"
804 },
805 {
806 "include": "#twig-functions"
807 },
808 {
809 "include": "#twig-macros"
810 },
811 {
812 "include": "#twig-objects"
813 },
814 {
815 "include": "#twig-properties"
816 },
817 {
818 "include": "#twig-filters-warg"
819 },
820 {
821 "include": "#twig-filters"
822 },
823 {
824 "include": "#twig-filters-warg-ud"
825 },
826 {
827 "include": "#twig-filters-ud"
828 },
829 {
830 "match": ",",
831 "name": "punctuation.separator.object.twig"
832 }
833 ],
834 "name": "meta.array.twig"
835 },
836 "twig-hashes": {
837 "begin": "(?<=[\\s\\(\\{\\[:,])\\{",
838 "beginCaptures": {
839 "0": {
840 "name": "punctuation.section.hash.begin.twig"
841 }
842 },
843 "end": "\\}",
844 "endCaptures": {
845 "0": {
846 "name": "punctuation.section.hash.end.twig"
847 }
848 },
849 "patterns": [
850 {
851 "include": "#twig-hashes"
852 },
853 {
854 "include": "#twig-arrays"
855 },
856 {
857 "include": "#twig-constants"
858 },
859 {
860 "include": "#twig-operators"
861 },
862 {
863 "include": "#twig-strings"
864 },
865 {
866 "include": "#twig-functions-warg"
867 },
868 {
869 "include": "#twig-functions"
870 },
871 {
872 "include": "#twig-macros"
873 },
874 {
875 "include": "#twig-objects"
876 },
877 {
878 "include": "#twig-properties"
879 },
880 {
881 "include": "#twig-filters-warg"
882 },
883 {
884 "include": "#twig-filters"
885 },
886 {
887 "include": "#twig-filters-warg-ud"
888 },
889 {
890 "include": "#twig-filters-ud"
891 },
892 {
893 "match": ":",
894 "name": "punctuation.separator.key-value.twig"
895 },
896 {
897 "match": ",",
898 "name": "punctuation.separator.object.twig"
899 }
900 ],
901 "name": "meta.hash.twig"
902 },
903 "twig-keywords": {
904 "match": "(?<=\\s)((?:end)?(?:autoescape|block|embed|filter|for|if|macro|raw|sandbox|set|spaceless|trans|verbatim)|as|do|else|elseif|extends|flush|from|ignore missing|import|include|only|use|with)(?=\\s)",
905 "name": "keyword.control.twig"
906 },
907 "twig-functions-warg": {
908 "begin": "(?<=[\\s\\(\\[\\{:,])(attribute|block|constant|cycle|date|divisible by|dump|include|max|min|parent|random|range|same as|source|template_from_string)(\\()",
909 "beginCaptures": {
910 "1": {
911 "name": "support.function.twig"
912 },
913 "2": {
914 "name": "punctuation.definition.parameters.begin.twig"
915 }
916 },
917 "end": "\\)",
918 "endCaptures": {
919 "0": {
920 "name": "punctuation.definition.parameters.end.twig"
921 }
922 },
923 "patterns": [
924 {
925 "include": "#twig-constants"
926 },
927 {
928 "include": "#twig-functions-warg"
929 },
930 {
931 "include": "#twig-functions"
932 },
933 {
934 "include": "#twig-macros"
935 },
936 {
937 "include": "#twig-objects"
938 },
939 {
940 "include": "#twig-properties"
941 },
942 {
943 "include": "#twig-filters-warg"
944 },
945 {
946 "include": "#twig-filters"
947 },
948 {
949 "include": "#twig-filters-warg-ud"
950 },
951 {
952 "include": "#twig-filters-ud"
953 },
954 {
955 "include": "#twig-strings"
956 },
957 {
958 "include": "#twig-arrays"
959 }
960 ],
961 "contentName": "meta.function.arguments.twig"
962 },
963 "twig-functions": {
964 "captures": {
965 "1": {
966 "name": "support.function.twig"
967 }
968 },
969 "match": "(?<=is\\s)(defined|empty|even|iterable|odd)"
970 },
971 "twig-macros": {
972 "begin": "(?x)\n (?<=[\\s\\(\\[\\{:,])\n ([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)\n (?:\n (\\.)([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)\n )?\n (\\()\n ",
973 "beginCaptures": {
974 "1": {
975 "name": "meta.function-call.twig"
976 },
977 "2": {
978 "name": "punctuation.separator.property.twig"
979 },
980 "3": {
981 "name": "variable.other.property.twig"
982 },
983 "4": {
984 "name": "punctuation.definition.parameters.begin.twig"
985 }
986 },
987 "end": "\\)",
988 "endCaptures": {
989 "0": {
990 "name": "punctuation.definition.parameters.end.twig"
991 }
992 },
993 "patterns": [
994 {
995 "include": "#twig-constants"
996 },
997 {
998 "include": "#twig-operators"
999 },
1000 {
1001 "include": "#twig-functions-warg"
1002 },
1003 {
1004 "include": "#twig-functions"
1005 },
1006 {
1007 "include": "#twig-macros"
1008 },
1009 {
1010 "include": "#twig-objects"
1011 },
1012 {
1013 "include": "#twig-properties"
1014 },
1015 {
1016 "include": "#twig-filters-warg"
1017 },
1018 {
1019 "include": "#twig-filters"
1020 },
1021 {
1022 "include": "#twig-filters-warg-ud"
1023 },
1024 {
1025 "include": "#twig-filters-ud"
1026 },
1027 {
1028 "include": "#twig-strings"
1029 },
1030 {
1031 "include": "#twig-arrays"
1032 },
1033 {
1034 "include": "#twig-hashes"
1035 }
1036 ],
1037 "contentName": "meta.function.arguments.twig"
1038 },
1039 "twig-filters-warg": {
1040 "begin": "(?<=(?:[a-zA-Z0-9_\\x{7f}-\\x{ff}\\]\\)\\'\\\"]\\|)|\\{%\\sfilter\\s)(batch|convert_encoding|date|date_modify|default|e(?:scape)?|format|join|merge|number_format|replace|round|slice|split|trim)(\\()",
1041 "beginCaptures": {
1042 "1": {
1043 "name": "support.function.twig"
1044 },
1045 "2": {
1046 "name": "punctuation.definition.parameters.begin.twig"
1047 }
1048 },
1049 "end": "\\)",
1050 "endCaptures": {
1051 "0": {
1052 "name": "punctuation.definition.parameters.end.twig"
1053 }
1054 },
1055 "patterns": [
1056 {
1057 "include": "#twig-constants"
1058 },
1059 {
1060 "include": "#twig-operators"
1061 },
1062 {
1063 "include": "#twig-functions-warg"
1064 },
1065 {
1066 "include": "#twig-functions"
1067 },
1068 {
1069 "include": "#twig-macros"
1070 },
1071 {
1072 "include": "#twig-objects"
1073 },
1074 {
1075 "include": "#twig-properties"
1076 },
1077 {
1078 "include": "#twig-filters-warg"
1079 },
1080 {
1081 "include": "#twig-filters"
1082 },
1083 {
1084 "include": "#twig-filters-warg-ud"
1085 },
1086 {
1087 "include": "#twig-filters-ud"
1088 },
1089 {
1090 "include": "#twig-strings"
1091 },
1092 {
1093 "include": "#twig-arrays"
1094 },
1095 {
1096 "include": "#twig-hashes"
1097 }
1098 ],
1099 "contentName": "meta.function.arguments.twig"
1100 },
1101 "twig-filters": {
1102 "captures": {
1103 "1": {
1104 "name": "support.function.twig"
1105 }
1106 },
1107 "match": "(?<=(?:[a-zA-Z0-9_\\x{7f}-\\x{ff}\\]\\)\\'\\\"]\\|)|\\{%\\sfilter\\s)(abs|capitalize|e(?:scape)?|first|join|(?:json|url)_encode|keys|last|length|lower|nl2br|number_format|raw|reverse|round|sort|striptags|title|trim|upper)(?=[\\s\\|\\]\\}\\):,]|\\.\\.|\\*\\*)"
1108 },
1109 "twig-filters-warg-ud": {
1110 "begin": "(?<=(?:[a-zA-Z0-9_\\x{7f}-\\x{ff}\\]\\)\\'\\\"]\\|)|\\{%\\sfilter\\s)([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)(\\()",
1111 "beginCaptures": {
1112 "1": {
1113 "name": "meta.function-call.other.twig"
1114 },
1115 "2": {
1116 "name": "punctuation.definition.parameters.begin.twig"
1117 }
1118 },
1119 "end": "\\)",
1120 "endCaptures": {
1121 "0": {
1122 "name": "punctuation.definition.parameters.end.twig"
1123 }
1124 },
1125 "patterns": [
1126 {
1127 "include": "#twig-constants"
1128 },
1129 {
1130 "include": "#twig-functions-warg"
1131 },
1132 {
1133 "include": "#twig-functions"
1134 },
1135 {
1136 "include": "#twig-macros"
1137 },
1138 {
1139 "include": "#twig-objects"
1140 },
1141 {
1142 "include": "#twig-properties"
1143 },
1144 {
1145 "include": "#twig-filters-warg"
1146 },
1147 {
1148 "include": "#twig-filters"
1149 },
1150 {
1151 "include": "#twig-filters-warg-ud"
1152 },
1153 {
1154 "include": "#twig-filters-ud"
1155 },
1156 {
1157 "include": "#twig-strings"
1158 },
1159 {
1160 "include": "#twig-arrays"
1161 },
1162 {
1163 "include": "#twig-hashes"
1164 }
1165 ],
1166 "contentName": "meta.function.arguments.twig"
1167 },
1168 "twig-filters-ud": {
1169 "captures": {
1170 "1": {
1171 "name": "meta.function-call.other.twig"
1172 }
1173 },
1174 "match": "(?<=(?:[a-zA-Z0-9_\\x{7f}-\\x{ff}\\]\\)\\'\\\"]\\|)|\\{%\\sfilter\\s)([a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)"
1175 },
1176 "php": {
1177 "begin": "(?=(^\\s*)?<\\?)",
1178 "end": "(?!(^\\s*)?<\\?)",
1179 "patterns": [
1180 {
1181 "include": "source.php"
1182 }
1183 ]
1184 },
1185 "python": {
1186 "begin": "(?:^\\s*)<\\?python(?!.*\\?>)",
1187 "end": "\\?>(?:\\s*$\\n)?",
1188 "name": "source.python.embedded.html",
1189 "patterns": [
1190 {
1191 "include": "source.python"
1192 }
1193 ]
1194 },
1195 "ruby": {
1196 "patterns": [
1197 {
1198 "begin": "<%+#",
1199 "captures": {
1200 "0": {
1201 "name": "punctuation.definition.comment.erb"
1202 }
1203 },
1204 "end": "%>",
1205 "name": "comment.block.erb"
1206 },
1207 {
1208 "begin": "<%+(?!>)=?",
1209 "captures": {
1210 "0": {
1211 "name": "punctuation.section.embedded.ruby"
1212 }
1213 },
1214 "end": "-?%>",
1215 "name": "source.ruby.embedded.html",
1216 "patterns": [
1217 {
1218 "captures": {
1219 "1": {
1220 "name": "punctuation.definition.comment.ruby"
1221 }
1222 },
1223 "match": "(#).*?(?=-?%>)",
1224 "name": "comment.line.number-sign.ruby"
1225 },
1226 {
1227 "include": "source.ruby"
1228 }
1229 ]
1230 },
1231 {
1232 "begin": "<\\?r(?!>)=?",
1233 "captures": {
1234 "0": {
1235 "name": "punctuation.section.embedded.ruby.nitro"
1236 }
1237 },
1238 "end": "-?\\?>",
1239 "name": "source.ruby.nitro.embedded.html",
1240 "patterns": [
1241 {
1242 "captures": {
1243 "1": {
1244 "name": "punctuation.definition.comment.ruby.nitro"
1245 }
1246 },
1247 "match": "(#).*?(?=-?\\?>)",
1248 "name": "comment.line.number-sign.ruby.nitro"
1249 },
1250 {
1251 "include": "source.ruby"
1252 }
1253 ]
1254 }
1255 ]
1256 },
1257 "string-double-quoted": {
1258 "begin": "\"",
1259 "beginCaptures": {
1260 "0": {
1261 "name": "punctuation.definition.string.begin.html"
1262 }
1263 },
1264 "end": "\"",
1265 "endCaptures": {
1266 "0": {
1267 "name": "punctuation.definition.string.end.html"
1268 }
1269 },
1270 "name": "string.quoted.double.html",
1271 "patterns": [
1272 {
1273 "include": "#embedded-code"
1274 },
1275 {
1276 "include": "#entities"
1277 }
1278 ]
1279 },
1280 "string-single-quoted": {
1281 "begin": "'",
1282 "beginCaptures": {
1283 "0": {
1284 "name": "punctuation.definition.string.begin.html"
1285 }
1286 },
1287 "end": "'",
1288 "endCaptures": {
1289 "0": {
1290 "name": "punctuation.definition.string.end.html"
1291 }
1292 },
1293 "name": "string.quoted.single.html",
1294 "patterns": [
1295 {
1296 "include": "#embedded-code"
1297 },
1298 {
1299 "include": "#entities"
1300 }
1301 ]
1302 },
1303 "tag-generic-attribute": {
1304 "match": "\\b([a-zA-Z\\-:]+)",
1305 "name": "entity.other.attribute-name.html"
1306 },
1307 "tag-id-attribute": {
1308 "begin": "\\b(id)\\b\\s*(=)",
1309 "captures": {
1310 "1": {
1311 "name": "entity.other.attribute-name.id.html"
1312 },
1313 "2": {
1314 "name": "punctuation.separator.key-value.html"
1315 }
1316 },
1317 "end": "(?<='|\")",
1318 "name": "meta.attribute-with-value.id.html",
1319 "patterns": [
1320 {
1321 "begin": "\"",
1322 "beginCaptures": {
1323 "0": {
1324 "name": "punctuation.definition.string.begin.html"
1325 }
1326 },
1327 "contentName": "meta.toc-list.id.html",
1328 "end": "\"",
1329 "endCaptures": {
1330 "0": {
1331 "name": "punctuation.definition.string.end.html"
1332 }
1333 },
1334 "name": "string.quoted.double.html",
1335 "patterns": [
1336 {
1337 "include": "#embedded-code"
1338 },
1339 {
1340 "include": "#entities"
1341 }
1342 ]
1343 },
1344 {
1345 "begin": "'",
1346 "beginCaptures": {
1347 "0": {
1348 "name": "punctuation.definition.string.begin.html"
1349 }
1350 },
1351 "contentName": "meta.toc-list.id.html",
1352 "end": "'",
1353 "endCaptures": {
1354 "0": {
1355 "name": "punctuation.definition.string.end.html"
1356 }
1357 },
1358 "name": "string.quoted.single.html",
1359 "patterns": [
1360 {
1361 "include": "#embedded-code"
1362 },
1363 {
1364 "include": "#entities"
1365 }
1366 ]
1367 }
1368 ]
1369 },
1370 "tag-stuff": {
1371 "patterns": [
1372 {
1373 "include": "#tag-id-attribute"
1374 },
1375 {
1376 "include": "#tag-generic-attribute"
1377 },
1378 {
1379 "include": "#string-double-quoted"
1380 },
1381 {
1382 "include": "#string-single-quoted"
1383 },
1384 {
1385 "include": "#embedded-code"
1386 }
1387 ]
1388 }
1389 },
1390 "scopeName": "text.html.twig",
1391 "uuid": "C220B028-86FF-44CB-8A59-27937FC83730"
1392 }
1393