{ "name": "HTML", "scopeName": "text.html.basic", "patterns": [ { "name": "meta.tag.preprocessor.xml.html", "begin": "(\u003c\\?)(xml)", "end": "(\\?\u003e)", "patterns": [ { "include": "#tag-generic-attribute" }, { "include": "#string-double-quoted" }, { "include": "#string-single-quoted" } ], "captures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "entity.name.tag.xml.html" } } }, { "name": "comment.block.html", "begin": "\u003c!--", "end": "--\\s*\u003e", "patterns": [ { "name": "invalid.illegal.bad-comments-or-CDATA.html", "match": "--(?!-*\\s*\u003e)" }, { "include": "#embedded-code" } ], "captures": { "0": { "name": "punctuation.definition.comment.html" } } }, { "name": "meta.tag.sgml.html", "begin": "\u003c!", "end": "\u003e", "patterns": [ { "name": "meta.tag.sgml.doctype.html", "begin": "(?i:DOCTYPE)", "end": "(?=\u003e)", "patterns": [ { "name": "string.quoted.double.doctype.identifiers-and-DTDs.html", "match": "\"[^\"\u003e]*\"" } ], "captures": { "1": { "name": "entity.name.tag.doctype.html" } } }, { "name": "constant.other.inline-data.html", "begin": "\\[CDATA\\[", "end": "]](?=\u003e)" }, { "name": "invalid.illegal.bad-comments-or-CDATA.html", "match": "(\\s*)(?!--|\u003e)\\S(\\s*)" } ], "captures": { "0": { "name": "punctuation.definition.tag.html" } } }, { "include": "#embedded-code" }, { "name": "meta.tag.style.html", "begin": "(?i)(?=\u003cstyle(\\s+|\u003e))", "end": "(?i)(\u003c/)(style)(\u003e)", "patterns": [ { "begin": "(?i)\\G(\u003c)(style)", "end": "\u003e", "patterns": [ { "include": "#tag-stuff" } ], "beginCaptures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "entity.name.tag.style.html" } }, "endCaptures": { "0": { "name": "punctuation.definition.tag.html" } } }, { "name": "source.css.embedded.html", "begin": "(?!\\G)", "end": "(?i)(?=\u003c/style\u003e)", "patterns": [ { "include": "#embedded-code" }, { "include": "source.css" } ] } ], "endCaptures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "entity.name.tag.style.html" }, "3": { "name": "punctuation.definition.tag.html" } } }, { "name": "meta.tag.script.html", "begin": "(?i)(?=\u003cscript\\s+.*?\\btype\\s*=\\s*['\"]?text/(?:x-handlebars|(?:x-(?:handlebars-)?|ng-)?template|html|ractive)['\"]?(\\s+|\u003e))", "end": "(\u003c/)((?i)script)(\u003e)", "patterns": [ { "begin": "(?i)\\G(\u003c)(script)", "end": "\u003e", "patterns": [ { "include": "#tag-stuff" } ], "beginCaptures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "entity.name.tag.script.html" } }, "endCaptures": { "0": { "name": "punctuation.definition.tag.html" } } }, { "name": "text.embedded.html", "begin": "(?!\\G)", "end": "(?i)(?=\u003c/script\u003e)", "patterns": [ { "include": "text.html.basic" } ] } ], "endCaptures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "entity.name.tag.script.html" }, "3": { "name": "punctuation.definition.tag.html" } } }, { "name": "meta.tag.script.html", "begin": "(?i)(?=\u003cscript\\s+.*?\\btype\\s*=\\s*['\"]?text/coffeescript['\"]?(\\s+|\u003e))", "end": "(\u003c/)((?i)script)(\u003e)", "patterns": [ { "begin": "(?i)\\G(\u003c)(script)", "end": "\u003e", "patterns": [ { "include": "#tag-stuff" } ], "beginCaptures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "entity.name.tag.script.html" } }, "endCaptures": { "0": { "name": "punctuation.definition.tag.html" } } }, { "name": "source.coffee.embedded.html", "begin": "(?!\\G)", "end": "(?i)(?=\u003c/script\u003e)", "patterns": [ { "name": "comment.block.coffee", "begin": "###", "end": "###|(?=(?i)\u003c/script\u003e)", "beginCaptures": { "0": { "name": "punctuation.definition.comment.coffee" } }, "endCaptures": { "0": { "name": "punctuation.definition.comment.coffee" } } }, { "name": "comment.line.number-sign.coffee", "begin": "#", "end": "(?=(?i)\u003c/script\u003e|$)", "beginCaptures": { "0": { "name": "punctuation.definition.comment.coffee" } } }, { "include": "source.coffee" } ] } ], "endCaptures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "entity.name.tag.script.html" }, "3": { "name": "punctuation.definition.tag.html" } } }, { "name": "meta.tag.script.html", "begin": "(?i)(?=\u003cscript\\s+.*?\\btype\\s*=\\s*['\"]?application/graphql['\"]?(\\s+|\u003e))", "end": "(\u003c/)((?i)script)(\u003e)", "patterns": [ { "begin": "(?i)\\G(\u003c)(script)", "end": "\u003e", "patterns": [ { "include": "#tag-stuff" } ], "beginCaptures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "entity.name.tag.script.html" } }, "endCaptures": { "0": { "name": "punctuation.definition.tag.html" } } }, { "name": "source.graphql.embedded.html", "begin": "(?!\\G)", "end": "(?i)(?=\u003c/script\u003e)", "patterns": [ { "name": "comment.line.number-sign.graphql", "begin": "#", "end": "(?=(?i)\u003c/script\u003e|$)", "beginCaptures": { "0": { "name": "punctuation.definition.comment.graphql" } } }, { "include": "source.coffee" } ] } ], "endCaptures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "entity.name.tag.script.html" }, "3": { "name": "punctuation.definition.tag.html" } } }, { "name": "meta.tag.script.html", "begin": "(?i)(?=\u003cscript(\\s+|\u003e))", "end": "(\u003c/)((?i)script)(\u003e)", "patterns": [ { "begin": "(?i)\\G(\u003c)(script)", "end": "\u003e", "patterns": [ { "include": "#tag-stuff" } ], "beginCaptures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "entity.name.tag.script.html" } }, "endCaptures": { "0": { "name": "punctuation.definition.tag.html" } } }, { "name": "source.js.embedded.html", "begin": "(?!\\G)", "end": "(?i)(?=\u003c/script\u003e)", "patterns": [ { "name": "comment.line.double-slash.js", "begin": "//", "end": "(?=(?i)\u003c/script\u003e|$)", "beginCaptures": { "0": { "name": "punctuation.definition.comment.js" } } }, { "name": "comment.block.js", "begin": "/\\*", "end": "\\*/|(?=(?i)\u003c/script\u003e)", "beginCaptures": { "0": { "name": "punctuation.definition.comment.begin.js" } }, "endCaptures": { "0": { "name": "punctuation.definition.comment.begin.js" } } }, { "include": "source.js" } ] } ], "endCaptures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "entity.name.tag.script.html" }, "3": { "name": "punctuation.definition.tag.html" } } }, { "name": "meta.tag.structure.$2.html", "begin": "(?i)(\u003c/?)(body|head|html)(?=\\s|/?\u003e)", "end": "(\u003e)", "patterns": [ { "include": "#tag-stuff" } ], "captures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "entity.name.tag.structure.$2.html" } } }, { "name": "meta.tag.block.$2.html", "begin": "(?i)(\u003c/?)(address|blockquote|dd|div|section|article|aside|header|footer|nav|menu|dl|dt|fieldset|form|frame|frameset|h1|h2|h3|h4|h5|h6|iframe|noframes|object|ol|p|ul|applet|center|dir|hr|pre)(?=\\s|/?\u003e)", "end": "(\u003e)", "patterns": [ { "include": "#tag-stuff" } ], "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.block.$2.html" } }, "endCaptures": { "1": { "name": "punctuation.definition.tag.end.html" } } }, { "name": "meta.tag.inline.$2.html", "begin": "(?i)(\u003c/?)(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)(?=\\s|/?\u003e)", "end": "((?: ?/)?\u003e)", "patterns": [ { "include": "#tag-stuff" } ], "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.inline.$2.html" } }, "endCaptures": { "1": { "name": "punctuation.definition.tag.end.html" } } }, { "name": "meta.tag.other.html", "begin": "(\u003c/?)([a-zA-Z0-9:-]+)", "end": "(\u003e)", "patterns": [ { "include": "#tag-stuff" } ], "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.html" }, "2": { "name": "entity.name.tag.other.html" } }, "endCaptures": { "1": { "name": "punctuation.definition.tag.end.html" } } }, { "include": "#character-reference" }, { "name": "invalid.illegal.incomplete.html", "match": "\u003c\u003e" } ], "repository": { "character-reference": { "patterns": [ { "name": "constant.character.entity.html", "begin": "(\u0026)(#\\d+|#[xX][0-9a-fA-F]+)", "end": ";", "beginCaptures": { "1": { "name": "punctuation.definition.entity.begin.html" }, "2": { "name": "entity.name.entity.other.html" } }, "endCaptures": { "0": { "name": "punctuation.definition.entity.end.html" } } }, { "name": "constant.character.entity.html", "match": "(\u0026)([a-zA-Z0-9]+)(;)", "captures": { "1": { "name": "punctuation.definition.entity.begin.html" }, "2": { "name": "entity.name.entity.other.html" }, "3": { "name": "punctuation.definition.entity.end.html" } } }, { "name": "invalid.illegal.bad-ampersand.html", "match": "\u0026(?!\\s|\u003c|\u0026|[a-zA-Z0-9])" } ] }, "embedded-code": { "patterns": [ { "include": "#smarty" }, { "include": "#python" } ] }, "python": { "name": "source.python.embedded.html", "begin": "(?:^\\s*)\u003c\\?python(?!.*\\?\u003e)", "end": "\\?\u003e(?:\\s*$\\n)?", "patterns": [ { "include": "source.python" } ] }, "smarty": { "patterns": [ { "begin": "(\\{(literal)\\})", "end": "(\\{/(literal)\\})", "captures": { "1": { "name": "source.smarty.embedded.html" }, "2": { "name": "support.function.built-in.smarty" } } }, { "name": "source.smarty.embedded.html", "begin": "{{|{", "end": "}}|}", "patterns": [ {} ], "disabled": true } ] }, "string-double-quoted": { "name": "string.quoted.double.html", "begin": "\"", "end": "\"", "patterns": [ { "include": "#embedded-code" }, { "include": "#character-reference" } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } } }, "string-single-quoted": { "name": "string.quoted.single.html", "begin": "'", "end": "'", "patterns": [ { "include": "#embedded-code" }, { "include": "#character-reference" } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } } }, "tag-class-attribute": { "name": "meta.attribute-with-value.class.html", "begin": "\\b(class)\\s*(=)\\s*", "end": "(?!\\G)|(?=\\s|/?\u003e)", "patterns": [ { "include": "#string-double-quoted" }, { "include": "#string-single-quoted" }, { "include": "#unquoted-attribute" } ], "captures": { "1": { "name": "entity.other.attribute-name.class.html" }, "2": { "name": "punctuation.separator.key-value.html" } } }, "tag-generic-attribute": { "patterns": [ { "name": "meta.attribute-with-value.html", "begin": "([^\\s/=\u003e\"'\u003c]+)\\s*(=)\\s*", "end": "(?!\\G)|(?=\\s|/?\u003e)", "patterns": [ { "include": "#string-double-quoted" }, { "include": "#string-single-quoted" }, { "include": "#unquoted-attribute" } ], "beginCaptures": { "1": { "name": "entity.other.attribute-name.html" }, "2": { "name": "punctuation.separator.key-value.html" } } }, { "name": "meta.attribute-without-value.html", "match": "[^\\s/=\u003e\"'\u003c]+", "captures": { "0": { "name": "entity.other.attribute-name.html" } } } ] }, "tag-id-attribute": { "name": "meta.attribute-with-value.id.html", "begin": "\\b(id)\\s*(=)\\s*", "end": "(?!\\G)|(?=\\s|/?\u003e)", "patterns": [ { "name": "string.quoted.double.html", "contentName": "meta.toc-list.id.html", "begin": "\"", "end": "\"", "patterns": [ { "include": "#embedded-code" }, { "include": "#character-reference" } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } } }, { "name": "string.quoted.single.html", "contentName": "meta.toc-list.id.html", "begin": "'", "end": "'", "patterns": [ { "include": "#embedded-code" }, { "include": "#character-reference" } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } } }, { "include": "#unquoted-attribute" } ], "captures": { "1": { "name": "entity.other.attribute-name.id.html" }, "2": { "name": "punctuation.separator.key-value.html" } } }, "tag-stuff": { "patterns": [ { "include": "#tag-id-attribute" }, { "include": "#tag-class-attribute" }, { "include": "#tag-style-attribute" }, { "include": "#tag-generic-attribute" }, { "include": "#string-double-quoted" }, { "include": "#string-single-quoted" }, { "include": "#embedded-code" } ] }, "tag-style-attribute": { "name": "meta.attribute-with-value.style.html", "begin": "\\b(style)\\s*(=)\\s*", "end": "(?!\\G)|(?=\\s|/?\u003e)", "patterns": [ { "name": "string.quoted.double.html", "contentName": "source.css.style.html", "begin": "\"", "end": "\"", "patterns": [ { "name": "meta.property-list.css", "match": "[^\"]+", "captures": { "0": { "patterns": [ { "include": "#embedded-code" }, { "include": "#entities" }, { "include": "source.css#rule-list-innards" } ] } } } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } } }, { "name": "string.quoted.single.html", "contentName": "source.css.style.html", "begin": "'", "end": "'", "patterns": [ { "name": "meta.property-list.css", "match": "[^']+", "captures": { "0": { "patterns": [ { "include": "#embedded-code" }, { "include": "#entities" }, { "include": "source.css#rule-list-innards" } ] } } } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } } }, { "name": "string.unquoted.html", "match": "([^\\s\u0026\u003e\"'\u003c=`]|\u0026(?=\u003e))+", "captures": { "0": { "name": "source.css.style.html", "patterns": [ { "name": "meta.property-list.css", "match": ".+", "captures": { "0": { "patterns": [ { "include": "source.css#rule-list-innards" } ] } } } ] } } } ], "beginCaptures": { "1": { "name": "entity.other.attribute-name.style.html" }, "2": { "name": "punctuation.separator.key-value.html" } } }, "unquoted-attribute": { "patterns": [ { "include": "#character-reference" }, { "name": "string.unquoted.html", "match": "([^\\s\u0026\u003e\"'\u003c=`]|\u0026(?=\u003e))+" } ] } } }