{ "information_for_contributors": [ "This file has been converted from https://github.com/daaain/Handlebars/blob/master/grammars/Handlebars.json", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/daaain/Handlebars/commit/0ffd0a2d95bfc052c3ff29a3eb4dd3749957b466", "name": "Handlebars", "scopeName": "text.html.handlebars", "patterns": [ { "include": "#escaped_backslash" }, { "include": "#escaped_expression" }, { "include": "#yfm" }, { "include": "#extends" }, { "include": "#block_comments" }, { "include": "#comments" }, { "include": "#block_helper" }, { "include": "#end_block" }, { "include": "#else_token" }, { "include": "#partial_and_var" }, { "include": "#inline_script" }, { "include": "#html_tags" }, { "include": "text.html.basic" } ], "repository": { "escaped_backslash": { "comment": "A backslash escapes the following backslash, so each \\\\ pair renders as a single literal backslash. Only pairs that lead up to a mustache are meaningful for escaping (the lookahead), which is what lets an odd number of backslashes fall through to escaped_expression: the pairs are consumed here and the lone leftover backslash escapes the mustache.", "match": "\\\\\\\\(?=\\\\*\\{{2,3})", "name": "constant.character.escape.handlebars" }, "escaped_expression": { "comment": "A backslash escapes a mustache so it renders literally (\\{{foo}}); the escaped braces are consumed so the rest is plain text, not an expression. Any escaped-backslash pairs in front are consumed by escaped_backslash first, so this only ever sees the single leftover backslash of an odd-length run — an even run (e.g. \\\\{{foo}}) leaves no backslash here and the mustache evaluates normally.", "match": "\\\\\\{{2,3}", "name": "constant.character.escape.handlebars" }, "html_tags": { "patterns": [ { "begin": "(<)([a-zA-Z0-9:-]+)(?=[^>]*>)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "entity.name.tag.html" } }, "end": "(>(<)/)(\\2)(>)", "endCaptures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "meta.scope.between-tag-pair.html" }, "3": { "name": "entity.name.tag.html" }, "4": { "name": "punctuation.definition.tag.html" } }, "name": "meta.tag.any.html", "patterns": [ { "include": "#tag-stuff" } ] }, { "begin": "(<\\?)(xml)", "captures": { "1": { "name": "punctuation.definition.tag.html" }, "2": { "name": "entity.name.tag.xml.html" } }, "end": "(\\?>)", "name": "meta.tag.preprocessor.xml.html", "patterns": [ { "include": "#tag_generic_attribute" }, { "include": "#string" } ] }, { "begin": "