| 1 | { |
| 2 | "name": "Handlebars", |
| 3 | "repository": { |
| 4 | "html_tags": { |
| 5 | "patterns": [ |
| 6 | { |
| 7 | "begin": "(<)([a-zA-Z0-9:-]+)(?=[^>]*></\\2>)", |
| 8 | "beginCaptures": { |
| 9 | "1": { |
| 10 | "name": "punctuation.definition.tag.html" |
| 11 | }, |
| 12 | "2": { |
| 13 | "name": "entity.name.tag.html" |
| 14 | } |
| 15 | }, |
| 16 | "end": "(>(<)/)(\\2)(>)", |
| 17 | "endCaptures": { |
| 18 | "1": { |
| 19 | "name": "punctuation.definition.tag.html" |
| 20 | }, |
| 21 | "2": { |
| 22 | "name": "meta.scope.between-tag-pair.html" |
| 23 | }, |
| 24 | "3": { |
| 25 | "name": "entity.name.tag.html" |
| 26 | }, |
| 27 | "4": { |
| 28 | "name": "punctuation.definition.tag.html" |
| 29 | } |
| 30 | }, |
| 31 | "name": "meta.tag.any.html", |
| 32 | "patterns": [ |
| 33 | { |
| 34 | "include": "#tag-stuff" |
| 35 | } |
| 36 | ] |
| 37 | }, |
| 38 | { |
| 39 | "begin": "(<\\?)(xml)", |
| 40 | "captures": { |
| 41 | "1": { |
| 42 | "name": "punctuation.definition.tag.html" |
| 43 | }, |
| 44 | "2": { |
| 45 | "name": "entity.name.tag.xml.html" |
| 46 | } |
| 47 | }, |
| 48 | "end": "(\\?>)", |
| 49 | "name": "meta.tag.preprocessor.xml.html", |
| 50 | "patterns": [ |
| 51 | { |
| 52 | "include": "#tag_generic_attribute" |
| 53 | }, |
| 54 | { |
| 55 | "include": "#string" |
| 56 | } |
| 57 | ] |
| 58 | }, |
| 59 | { |
| 60 | "begin": "<!--", |
| 61 | "captures": { |
| 62 | "0": { |
| 63 | "name": "punctuation.definition.comment.html" |
| 64 | } |
| 65 | }, |
| 66 | "end": "--\\s*>", |
| 67 | "name": "comment.block.html", |
| 68 | "patterns": [ |
| 69 | { |
| 70 | "match": "--", |
| 71 | "name": "invalid.illegal.bad-comments-or-CDATA.html" |
| 72 | } |
| 73 | ] |
| 74 | }, |
| 75 | { |
| 76 | "begin": "<!", |
| 77 | "captures": { |
| 78 | "0": { |
| 79 | "name": "punctuation.definition.tag.html" |
| 80 | } |
| 81 | }, |
| 82 | "end": ">", |
| 83 | "name": "meta.tag.sgml.html", |
| 84 | "patterns": [ |
| 85 | { |
| 86 | "begin": "(DOCTYPE|doctype)", |
| 87 | "captures": { |
| 88 | "1": { |
| 89 | "name": "entity.name.tag.doctype.html" |
| 90 | } |
| 91 | }, |
| 92 | "end": "(?=>)", |
| 93 | "name": "meta.tag.sgml.doctype.html", |
| 94 | "patterns": [ |
| 95 | { |
| 96 | "match": "\"[^\">]*\"", |
| 97 | "name": "string.quoted.double.doctype.identifiers-and-DTDs.html" |
| 98 | } |
| 99 | ] |
| 100 | }, |
| 101 | { |
| 102 | "begin": "\\[CDATA\\[", |
| 103 | "end": "]](?=>)", |
| 104 | "name": "constant.other.inline-data.html" |
| 105 | }, |
| 106 | { |
| 107 | "match": "(\\s*)(?!--|>)\\S(\\s*)", |
| 108 | "name": "invalid.illegal.bad-comments-or-CDATA.html" |
| 109 | } |
| 110 | ] |
| 111 | }, |
| 112 | { |
| 113 | "begin": "(?:^\\s+)?(<)((?i:style))\\b(?![^>]*/>)", |
| 114 | "captures": { |
| 115 | "1": { |
| 116 | "name": "punctuation.definition.tag.html" |
| 117 | }, |
| 118 | "2": { |
| 119 | "name": "entity.name.tag.style.html" |
| 120 | }, |
| 121 | "3": { |
| 122 | "name": "punctuation.definition.tag.html" |
| 123 | } |
| 124 | }, |
| 125 | "end": "(</)((?i:style))(>)(?:\\s*\\n)?", |
| 126 | "name": "source.css.embedded.html", |
| 127 | "patterns": [ |
| 128 | { |
| 129 | "include": "#tag-stuff" |
| 130 | }, |
| 131 | { |
| 132 | "begin": "(>)", |
| 133 | "beginCaptures": { |
| 134 | "1": { |
| 135 | "name": "punctuation.definition.tag.html" |
| 136 | } |
| 137 | }, |
| 138 | "end": "(?=</(?i:style))", |
| 139 | "patterns": [ |
| 140 | { |
| 141 | "include": "source.css" |
| 142 | } |
| 143 | ] |
| 144 | } |
| 145 | ] |
| 146 | }, |
| 147 | { |
| 148 | "begin": "(?:^\\s+)?(<)((?i:script))\\b(?![^>]*/>)", |
| 149 | "beginCaptures": { |
| 150 | "1": { |
| 151 | "name": "punctuation.definition.tag.html" |
| 152 | }, |
| 153 | "2": { |
| 154 | "name": "entity.name.tag.script.html" |
| 155 | } |
| 156 | }, |
| 157 | "end": "(?<=</(script|SCRIPT))(>)(?:\\s*\\n)?", |
| 158 | "endCaptures": { |
| 159 | "2": { |
| 160 | "name": "punctuation.definition.tag.html" |
| 161 | } |
| 162 | }, |
| 163 | "name": "source.js.embedded.html", |
| 164 | "patterns": [ |
| 165 | { |
| 166 | "include": "#tag-stuff" |
| 167 | }, |
| 168 | { |
| 169 | "begin": "(?<!</(?:script|SCRIPT))(>)", |
| 170 | "captures": { |
| 171 | "1": { |
| 172 | "name": "punctuation.definition.tag.html" |
| 173 | }, |
| 174 | "2": { |
| 175 | "name": "entity.name.tag.script.html" |
| 176 | } |
| 177 | }, |
| 178 | "end": "(</)((?i:script))", |
| 179 | "patterns": [ |
| 180 | { |
| 181 | "captures": { |
| 182 | "1": { |
| 183 | "name": "punctuation.definition.comment.js" |
| 184 | } |
| 185 | }, |
| 186 | "match": "(//).*?((?=</script)|$\\n?)", |
| 187 | "name": "comment.line.double-slash.js" |
| 188 | }, |
| 189 | { |
| 190 | "begin": "/\\*", |
| 191 | "captures": { |
| 192 | "0": { |
| 193 | "name": "punctuation.definition.comment.js" |
| 194 | } |
| 195 | }, |
| 196 | "end": "\\*/|(?=</script)", |
| 197 | "name": "comment.block.js" |
| 198 | }, |
| 199 | { |
| 200 | "include": "source.js" |
| 201 | } |
| 202 | ] |
| 203 | } |
| 204 | ] |
| 205 | }, |
| 206 | { |
| 207 | "begin": "(</?)((?i:body|head|html)\\b)", |
| 208 | "captures": { |
| 209 | "1": { |
| 210 | "name": "punctuation.definition.tag.html" |
| 211 | }, |
| 212 | "2": { |
| 213 | "name": "entity.name.tag.structure.any.html" |
| 214 | } |
| 215 | }, |
| 216 | "end": "(>)", |
| 217 | "name": "meta.tag.structure.any.html", |
| 218 | "patterns": [ |
| 219 | { |
| 220 | "include": "#tag-stuff" |
| 221 | } |
| 222 | ] |
| 223 | }, |
| 224 | { |
| 225 | "begin": "(</?)((?i:address|blockquote|dd|div|header|section|footer|aside|nav|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)", |
| 226 | "captures": { |
| 227 | "1": { |
| 228 | "name": "punctuation.definition.tag.html" |
| 229 | }, |
| 230 | "2": { |
| 231 | "name": "entity.name.tag.block.any.html" |
| 232 | } |
| 233 | }, |
| 234 | "end": "(>)", |
| 235 | "name": "meta.tag.block.any.html", |
| 236 | "patterns": [ |
| 237 | { |
| 238 | "include": "#tag-stuff" |
| 239 | } |
| 240 | ] |
| 241 | }, |
| 242 | { |
| 243 | "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)", |
| 244 | "captures": { |
| 245 | "1": { |
| 246 | "name": "punctuation.definition.tag.html" |
| 247 | }, |
| 248 | "2": { |
| 249 | "name": "entity.name.tag.inline.any.html" |
| 250 | } |
| 251 | }, |
| 252 | "end": "((?: ?/)?>)", |
| 253 | "name": "meta.tag.inline.any.html", |
| 254 | "patterns": [ |
| 255 | { |
| 256 | "include": "#tag-stuff" |
| 257 | } |
| 258 | ] |
| 259 | }, |
| 260 | { |
| 261 | "begin": "(</?)([a-zA-Z0-9:-]+)", |
| 262 | "captures": { |
| 263 | "1": { |
| 264 | "name": "punctuation.definition.tag.html" |
| 265 | }, |
| 266 | "2": { |
| 267 | "name": "entity.name.tag.other.html" |
| 268 | } |
| 269 | }, |
| 270 | "end": "(>)", |
| 271 | "name": "meta.tag.other.html", |
| 272 | "patterns": [ |
| 273 | { |
| 274 | "include": "#tag-stuff" |
| 275 | } |
| 276 | ] |
| 277 | }, |
| 278 | { |
| 279 | "begin": "(</?)([a-zA-Z0-9{}:-]+)", |
| 280 | "captures": { |
| 281 | "1": { |
| 282 | "name": "punctuation.definition.tag.html" |
| 283 | }, |
| 284 | "2": { |
| 285 | "name": "entity.name.tag.tokenised.html" |
| 286 | } |
| 287 | }, |
| 288 | "end": "(>)", |
| 289 | "name": "meta.tag.tokenised.html", |
| 290 | "patterns": [ |
| 291 | { |
| 292 | "include": "#tag-stuff" |
| 293 | } |
| 294 | ] |
| 295 | }, |
| 296 | { |
| 297 | "include": "#entities" |
| 298 | }, |
| 299 | { |
| 300 | "match": "<>", |
| 301 | "name": "invalid.illegal.incomplete.html" |
| 302 | }, |
| 303 | { |
| 304 | "match": "<", |
| 305 | "name": "invalid.illegal.bad-angle-bracket.html" |
| 306 | } |
| 307 | ] |
| 308 | }, |
| 309 | "entities": { |
| 310 | "patterns": [ |
| 311 | { |
| 312 | "captures": { |
| 313 | "1": { |
| 314 | "name": "punctuation.definition.entity.html" |
| 315 | }, |
| 316 | "3": { |
| 317 | "name": "punctuation.definition.entity.html" |
| 318 | } |
| 319 | }, |
| 320 | "name": "constant.character.entity.html", |
| 321 | "match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)" |
| 322 | }, |
| 323 | { |
| 324 | "name": "invalid.illegal.bad-ampersand.html", |
| 325 | "match": "&" |
| 326 | } |
| 327 | ] |
| 328 | }, |
| 329 | "end_block": { |
| 330 | "begin": "(\\{\\{~?/)([a-zA-Z0-9_\\.-]+)\\s*", |
| 331 | "end": "(~?\\}\\})", |
| 332 | "name": "meta.function.block.end.handlebars", |
| 333 | "endCaptures": { |
| 334 | "1": { |
| 335 | "name": "support.constant.handlebars" |
| 336 | } |
| 337 | }, |
| 338 | "beginCaptures": { |
| 339 | "1": { |
| 340 | "name": "support.constant.handlebars" |
| 341 | }, |
| 342 | "2": { |
| 343 | "name": "support.constant.handlebars" |
| 344 | } |
| 345 | }, |
| 346 | "patterns": [] |
| 347 | }, |
| 348 | "yfm": { |
| 349 | "patterns": [ |
| 350 | { |
| 351 | "patterns": [ |
| 352 | { |
| 353 | "include": "source.yaml" |
| 354 | } |
| 355 | ], |
| 356 | "begin": "(?<!\\s)---\\n$", |
| 357 | "end": "^---\\s", |
| 358 | "name": "markup.raw.yaml.front-matter" |
| 359 | } |
| 360 | ] |
| 361 | }, |
| 362 | "comments": { |
| 363 | "patterns": [ |
| 364 | { |
| 365 | "patterns": [ |
| 366 | { |
| 367 | "name": "keyword.annotation.handlebars", |
| 368 | "match": "@\\w*" |
| 369 | }, |
| 370 | { |
| 371 | "include": "#comments" |
| 372 | } |
| 373 | ], |
| 374 | "begin": "\\{\\{!", |
| 375 | "end": "\\}\\}", |
| 376 | "name": "comment.block.handlebars" |
| 377 | }, |
| 378 | { |
| 379 | "captures": { |
| 380 | "0": { |
| 381 | "name": "punctuation.definition.comment.html" |
| 382 | } |
| 383 | }, |
| 384 | "begin": "<!--", |
| 385 | "end": "-{2,3}\\s*>", |
| 386 | "name": "comment.block.html", |
| 387 | "patterns": [ |
| 388 | { |
| 389 | "name": "invalid.illegal.bad-comments-or-CDATA.html", |
| 390 | "match": "--" |
| 391 | } |
| 392 | ] |
| 393 | } |
| 394 | ] |
| 395 | }, |
| 396 | "block_comments": { |
| 397 | "patterns": [ |
| 398 | { |
| 399 | "patterns": [ |
| 400 | { |
| 401 | "name": "keyword.annotation.handlebars", |
| 402 | "match": "@\\w*" |
| 403 | }, |
| 404 | { |
| 405 | "include": "#comments" |
| 406 | } |
| 407 | ], |
| 408 | "begin": "\\{\\{!--", |
| 409 | "end": "--\\}\\}", |
| 410 | "name": "comment.block.handlebars" |
| 411 | }, |
| 412 | { |
| 413 | "captures": { |
| 414 | "0": { |
| 415 | "name": "punctuation.definition.comment.html" |
| 416 | } |
| 417 | }, |
| 418 | "begin": "<!--", |
| 419 | "end": "-{2,3}\\s*>", |
| 420 | "name": "comment.block.html", |
| 421 | "patterns": [ |
| 422 | { |
| 423 | "name": "invalid.illegal.bad-comments-or-CDATA.html", |
| 424 | "match": "--" |
| 425 | } |
| 426 | ] |
| 427 | } |
| 428 | ] |
| 429 | }, |
| 430 | "block_helper": { |
| 431 | "begin": "(\\{\\{~?\\#)([-a-zA-Z0-9_\\./]+)\\s?(@?[-a-zA-Z0-9_\\./]+)*\\s?(@?[-a-zA-Z0-9_\\./]+)*\\s?(@?[-a-zA-Z0-9_\\./]+)*", |
| 432 | "end": "(~?\\}\\})", |
| 433 | "name": "meta.function.block.start.handlebars", |
| 434 | "endCaptures": { |
| 435 | "1": { |
| 436 | "name": "support.constant.handlebars" |
| 437 | } |
| 438 | }, |
| 439 | "beginCaptures": { |
| 440 | "1": { |
| 441 | "name": "support.constant.handlebars" |
| 442 | }, |
| 443 | "2": { |
| 444 | "name": "support.constant.handlebars" |
| 445 | }, |
| 446 | "3": { |
| 447 | "name": "variable.parameter.handlebars" |
| 448 | }, |
| 449 | "4": { |
| 450 | "name": "support.constant.handlebars" |
| 451 | }, |
| 452 | "5": { |
| 453 | "name": "variable.parameter.handlebars" |
| 454 | }, |
| 455 | "6": { |
| 456 | "name": "support.constant.handlebars" |
| 457 | } |
| 458 | }, |
| 459 | "patterns": [ |
| 460 | { |
| 461 | "include": "#string" |
| 462 | }, |
| 463 | { |
| 464 | "include": "#handlebars_attribute" |
| 465 | } |
| 466 | ] |
| 467 | }, |
| 468 | "string-single-quoted": { |
| 469 | "begin": "'", |
| 470 | "end": "'", |
| 471 | "name": "string.quoted.single.handlebars", |
| 472 | "endCaptures": { |
| 473 | "0": { |
| 474 | "name": "punctuation.definition.string.end.html" |
| 475 | } |
| 476 | }, |
| 477 | "beginCaptures": { |
| 478 | "0": { |
| 479 | "name": "punctuation.definition.string.begin.html" |
| 480 | } |
| 481 | }, |
| 482 | "patterns": [ |
| 483 | { |
| 484 | "include": "#escaped-single-quote" |
| 485 | }, |
| 486 | { |
| 487 | "include": "#block_comments" |
| 488 | }, |
| 489 | { |
| 490 | "include": "#comments" |
| 491 | }, |
| 492 | { |
| 493 | "include": "#block_helper" |
| 494 | }, |
| 495 | { |
| 496 | "include": "#else_token" |
| 497 | }, |
| 498 | { |
| 499 | "include": "#end_block" |
| 500 | }, |
| 501 | { |
| 502 | "include": "#partial_and_var" |
| 503 | } |
| 504 | ] |
| 505 | }, |
| 506 | "string": { |
| 507 | "patterns": [ |
| 508 | { |
| 509 | "include": "#string-single-quoted" |
| 510 | }, |
| 511 | { |
| 512 | "include": "#string-double-quoted" |
| 513 | } |
| 514 | ] |
| 515 | }, |
| 516 | "escaped-single-quote": { |
| 517 | "name": "constant.character.escape.js", |
| 518 | "match": "\\\\'" |
| 519 | }, |
| 520 | "escaped-double-quote": { |
| 521 | "name": "constant.character.escape.js", |
| 522 | "match": "\\\\\"" |
| 523 | }, |
| 524 | "partial_and_var": { |
| 525 | "begin": "(\\{\\{~?\\{*(>|!<)*)\\s*(@?[-a-zA-Z0-9_\\./]+)*", |
| 526 | "end": "(~?\\}\\}\\}*)", |
| 527 | "name": "meta.function.inline.other.handlebars", |
| 528 | "beginCaptures": { |
| 529 | "1": { |
| 530 | "name": "support.constant.handlebars" |
| 531 | }, |
| 532 | "3": { |
| 533 | "name": "variable.parameter.handlebars" |
| 534 | } |
| 535 | }, |
| 536 | "endCaptures": { |
| 537 | "1": { |
| 538 | "name": "support.constant.handlebars" |
| 539 | } |
| 540 | }, |
| 541 | "patterns": [ |
| 542 | { |
| 543 | "include": "#string" |
| 544 | }, |
| 545 | { |
| 546 | "include": "#handlebars_attribute" |
| 547 | } |
| 548 | ] |
| 549 | }, |
| 550 | "handlebars_attribute_name": { |
| 551 | "begin": "\\b([-a-zA-Z0-9_\\.]+)\\b=", |
| 552 | "captures": { |
| 553 | "1": { |
| 554 | "name": "variable.parameter.handlebars" |
| 555 | } |
| 556 | }, |
| 557 | "end": "(?='|\"|)", |
| 558 | "name": "entity.other.attribute-name.handlebars" |
| 559 | }, |
| 560 | "handlebars_attribute_value": { |
| 561 | "begin": "([-a-zA-Z0-9_\\./]+)\\b\\s*", |
| 562 | "captures": { |
| 563 | "1": { |
| 564 | "name": "variable.parameter.handlebars" |
| 565 | } |
| 566 | }, |
| 567 | "end": "('|\"|)", |
| 568 | "name": "entity.other.attribute-value.handlebars", |
| 569 | "patterns": [ |
| 570 | { |
| 571 | "include": "#string" |
| 572 | } |
| 573 | ] |
| 574 | }, |
| 575 | "handlebars_attribute": { |
| 576 | "patterns": [ |
| 577 | { |
| 578 | "include": "#handlebars_attribute_name" |
| 579 | }, |
| 580 | { |
| 581 | "include": "#handlebars_attribute_value" |
| 582 | } |
| 583 | ] |
| 584 | }, |
| 585 | "extends": { |
| 586 | "patterns": [ |
| 587 | { |
| 588 | "end": "(\\}\\})", |
| 589 | "begin": "(\\{\\{!<)\\s([-a-zA-Z0-9_\\./]+)", |
| 590 | "beginCaptures": { |
| 591 | "1": { |
| 592 | "name": "support.function.handlebars" |
| 593 | }, |
| 594 | "2": { |
| 595 | "name": "support.class.handlebars" |
| 596 | } |
| 597 | }, |
| 598 | "endCaptures": { |
| 599 | "1": { |
| 600 | "name": "support.function.handlebars" |
| 601 | } |
| 602 | }, |
| 603 | "name": "meta.preprocessor.handlebars" |
| 604 | } |
| 605 | ] |
| 606 | }, |
| 607 | "else_token": { |
| 608 | "begin": "(\\{\\{~?else)(@?\\s(if)\\s([-a-zA-Z0-9_\\./]+))?", |
| 609 | "end": "(~?\\}\\}\\}*)", |
| 610 | "name": "meta.function.inline.else.handlebars", |
| 611 | "beginCaptures": { |
| 612 | "1": { |
| 613 | "name": "support.constant.handlebars" |
| 614 | }, |
| 615 | "3": { |
| 616 | "name": "support.constant.handlebars" |
| 617 | }, |
| 618 | "4": { |
| 619 | "name": "variable.parameter.handlebars" |
| 620 | } |
| 621 | }, |
| 622 | "endCaptures": { |
| 623 | "1": { |
| 624 | "name": "support.constant.handlebars" |
| 625 | } |
| 626 | } |
| 627 | }, |
| 628 | "string-double-quoted": { |
| 629 | "begin": "\"", |
| 630 | "end": "\"", |
| 631 | "name": "string.quoted.double.handlebars", |
| 632 | "beginCaptures": { |
| 633 | "0": { |
| 634 | "name": "punctuation.definition.string.begin.html" |
| 635 | } |
| 636 | }, |
| 637 | "endCaptures": { |
| 638 | "0": { |
| 639 | "name": "punctuation.definition.string.end.html" |
| 640 | } |
| 641 | }, |
| 642 | "patterns": [ |
| 643 | { |
| 644 | "include": "#escaped-double-quote" |
| 645 | }, |
| 646 | { |
| 647 | "include": "#block_comments" |
| 648 | }, |
| 649 | { |
| 650 | "include": "#comments" |
| 651 | }, |
| 652 | { |
| 653 | "include": "#block_helper" |
| 654 | }, |
| 655 | { |
| 656 | "include": "#else_token" |
| 657 | }, |
| 658 | { |
| 659 | "include": "#end_block" |
| 660 | }, |
| 661 | { |
| 662 | "include": "#partial_and_var" |
| 663 | } |
| 664 | ] |
| 665 | }, |
| 666 | "inline_script": { |
| 667 | "begin": "(?:^\\s+)?(<)((?i:script))\\b(?:.*(type)=([\"'](?:text/x-handlebars-template|text/x-handlebars|text/template|x-tmpl-handlebars)[\"']))(?![^>]*/>)", |
| 668 | "beginCaptures": { |
| 669 | "1": { |
| 670 | "name": "punctuation.definition.tag.html" |
| 671 | }, |
| 672 | "2": { |
| 673 | "name": "entity.name.tag.script.html" |
| 674 | }, |
| 675 | "3": { |
| 676 | "name": "entity.other.attribute-name.html" |
| 677 | }, |
| 678 | "4": { |
| 679 | "name": "string.quoted.double.html" |
| 680 | } |
| 681 | }, |
| 682 | "end": "(?<=</(script|SCRIPT))(>)(?:\\s*\\n)?", |
| 683 | "endCaptures": { |
| 684 | "2": { |
| 685 | "name": "punctuation.definition.tag.html" |
| 686 | } |
| 687 | }, |
| 688 | "name": "source.handlebars.embedded.html", |
| 689 | "patterns": [ |
| 690 | { |
| 691 | "include": "#tag-stuff" |
| 692 | }, |
| 693 | { |
| 694 | "begin": "(?<!</(?:script|SCRIPT))(>)", |
| 695 | "captures": { |
| 696 | "1": { |
| 697 | "name": "punctuation.definition.tag.html" |
| 698 | }, |
| 699 | "2": { |
| 700 | "name": "entity.name.tag.script.html" |
| 701 | } |
| 702 | }, |
| 703 | "end": "(</)((?i:script))", |
| 704 | "patterns": [ |
| 705 | { |
| 706 | "include": "#block_comments" |
| 707 | }, |
| 708 | { |
| 709 | "include": "#comments" |
| 710 | }, |
| 711 | { |
| 712 | "include": "#block_helper" |
| 713 | }, |
| 714 | { |
| 715 | "include": "#end_block" |
| 716 | }, |
| 717 | { |
| 718 | "include": "#else_token" |
| 719 | }, |
| 720 | { |
| 721 | "include": "#partial_and_var" |
| 722 | }, |
| 723 | { |
| 724 | "include": "#html_tags" |
| 725 | }, |
| 726 | { |
| 727 | "include": "text.html.basic" |
| 728 | } |
| 729 | ] |
| 730 | } |
| 731 | ] |
| 732 | }, |
| 733 | "tag_generic_attribute": { |
| 734 | "begin": "\\b([a-zA-Z0-9_-]+)\\b\\s*(=)", |
| 735 | "captures": { |
| 736 | "1": { |
| 737 | "name": "entity.other.attribute-name.generic.html" |
| 738 | }, |
| 739 | "2": { |
| 740 | "name": "punctuation.separator.key-value.html" |
| 741 | } |
| 742 | }, |
| 743 | "patterns": [ |
| 744 | { |
| 745 | "include": "#string" |
| 746 | } |
| 747 | ], |
| 748 | "name": "entity.other.attribute-name.html", |
| 749 | "end": "(?<='|\"|)" |
| 750 | }, |
| 751 | "tag_id_attribute": { |
| 752 | "begin": "\\b(id)\\b\\s*(=)", |
| 753 | "captures": { |
| 754 | "1": { |
| 755 | "name": "entity.other.attribute-name.id.html" |
| 756 | }, |
| 757 | "2": { |
| 758 | "name": "punctuation.separator.key-value.html" |
| 759 | } |
| 760 | }, |
| 761 | "end": "(?<='|\"|)", |
| 762 | "name": "meta.attribute-with-value.id.html", |
| 763 | "patterns": [ |
| 764 | { |
| 765 | "include": "#string" |
| 766 | } |
| 767 | ] |
| 768 | }, |
| 769 | "tag-stuff": { |
| 770 | "patterns": [ |
| 771 | { |
| 772 | "include": "#tag_id_attribute" |
| 773 | }, |
| 774 | { |
| 775 | "include": "#tag_generic_attribute" |
| 776 | }, |
| 777 | { |
| 778 | "include": "#string" |
| 779 | }, |
| 780 | { |
| 781 | "include": "#block_comments" |
| 782 | }, |
| 783 | { |
| 784 | "include": "#comments" |
| 785 | }, |
| 786 | { |
| 787 | "include": "#block_helper" |
| 788 | }, |
| 789 | { |
| 790 | "include": "#end_block" |
| 791 | }, |
| 792 | { |
| 793 | "include": "#else_token" |
| 794 | }, |
| 795 | { |
| 796 | "include": "#partial_and_var" |
| 797 | } |
| 798 | ] |
| 799 | } |
| 800 | }, |
| 801 | "scopeName": "text.html.handlebars", |
| 802 | "patterns": [ |
| 803 | { |
| 804 | "include": "#yfm" |
| 805 | }, |
| 806 | { |
| 807 | "include": "#extends" |
| 808 | }, |
| 809 | { |
| 810 | "include": "#block_comments" |
| 811 | }, |
| 812 | { |
| 813 | "include": "#comments" |
| 814 | }, |
| 815 | { |
| 816 | "include": "#block_helper" |
| 817 | }, |
| 818 | { |
| 819 | "include": "#end_block" |
| 820 | }, |
| 821 | { |
| 822 | "include": "#else_token" |
| 823 | }, |
| 824 | { |
| 825 | "include": "#partial_and_var" |
| 826 | }, |
| 827 | { |
| 828 | "include": "#inline_script" |
| 829 | }, |
| 830 | { |
| 831 | "include": "#html_tags" |
| 832 | }, |
| 833 | { |
| 834 | "include": "text.html.basic" |
| 835 | } |
| 836 | ], |
| 837 | "fileTypes": [ |
| 838 | "handlebars", |
| 839 | "handlebars.html", |
| 840 | "hbr", |
| 841 | "hbrs", |
| 842 | "hbs", |
| 843 | "hdbs", |
| 844 | "hjs", |
| 845 | "mu", |
| 846 | "mustache", |
| 847 | "rac", |
| 848 | "stache", |
| 849 | "template", |
| 850 | "tmpl" |
| 851 | ], |
| 852 | "uuid": "70E91676-DE0A-4266-A2B9-3AD2E535E484", |
| 853 | "version": "https://github.com/daaain/Handlebars/commit/bdaec7aaf5eaac45d1878096110d1db7975fb100" |
| 854 | } |