Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 93a500a
Showing
4 changed files
with
861 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,241 @@ | ||
{ | ||
"name": "Handlebars", | ||
"uuid": "1d7c0a8c-2361-4f78-b98e-1eaf2a288d3f", | ||
"scopeName": "text.html.handlebars", | ||
"fileTypes": ["handlebars", "hbs"], | ||
|
||
"foldingStartMarker": "(?x)(<(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|form|dl)\\b.*?>|<!--(?!.*-->)|\\{\\s*($|\\?>\\s*$|//|/\\*(.*\\*/\\s*$|(?!.*?\\*/)))|\\{\\{\\#)", | ||
"foldingStopMarker": "(?x)(</(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|form|dl)>|^\\s*-->|(^|\\s)\\}|\\{\\{/)", | ||
|
||
"patterns": [ | ||
{ "include": "#partial_and_var" }, | ||
{ "include": "#block_helper" }, | ||
{ "include": "#end_block" }, | ||
{ "include": "#html_tags" } | ||
], | ||
"repository": { | ||
"partial_and_var": { | ||
"name": "meta.function.inline.other.handlebars", | ||
"begin": "(\\{\\{\\{*>*)\\s*([a-zA-Z_-]+)", | ||
"end": "(\\}\\}\\}*)", | ||
"beginCaptures": { | ||
"1": { "name": "support.constant.handlebars" }, | ||
"2": { "name": "variable.parameter.handlebars" } | ||
}, | ||
"endCaptures": { | ||
"1": { "name": "support.constant.handlebars" } | ||
}, | ||
"patterns": [ | ||
] | ||
}, | ||
"block_helper": { | ||
"name": "meta.function.block.start.handlebars.sproutcore", | ||
"begin": "(\\{\\{\\#)([a-zA-Z_-]+)\\s+([a-zA-Z_-]+)", | ||
"end": "(\\}\\})", | ||
|
||
"beginCaptures": { | ||
"1": { "name": "support.constant.handlebars" }, | ||
"2": { "name": "support.constant.handlebars" }, | ||
"3": { "name": "variable.parameter.handlebars" } | ||
}, | ||
"endCaptures": { | ||
"1": { "name": "support.constant.handlebars" } | ||
}, | ||
"patterns": [ | ||
{ "include": "#string_single_quoted" }, | ||
{ "include": "#string_double_quoted" } | ||
] | ||
}, | ||
"end_block": { | ||
"name": "meta.function.block.end.handlebars.sproutcore", | ||
"begin": "(\\{\\{/)([a-zA-Z_-]+)\\s*", | ||
"end": "(\\}\\})", | ||
"beginCaptures": { | ||
"1": { "name": "support.constant.handlebars" }, | ||
"2": { "name": "support.constant.handlebars" } | ||
}, | ||
"endCaptures": { | ||
"1": { "name": "support.constant.handlebars" } | ||
}, | ||
"patterns": [ | ||
] | ||
}, | ||
|
||
"string_double_quoted": { | ||
"name": "string.quoted.double.html", | ||
"begin": "\"", | ||
"end": "\"", | ||
"beginCaptures": { | ||
"0": { "name": "punctuation.definition.string.begin.html" } | ||
}, | ||
"endCaptures": { | ||
"0": { "name": "punctuation.definition.string.end.html" } | ||
}, | ||
"patterns": [ | ||
{ "include": "#partial_and_var" }, | ||
{ "include": "#block_helper" }, | ||
{ "include": "#end_block" } | ||
] | ||
}, | ||
"string_single_quoted": { | ||
"name": "string.quoted.single.html", | ||
"begin": "'", | ||
"end": "'", | ||
"beginCaptures": { | ||
"0": { "name": "punctuation.definition.string.begin.html" } | ||
}, | ||
"endCaptures": { | ||
"0": { "name": "punctuation.definition.string.end.html" } | ||
}, | ||
"patterns": [ | ||
{ "include": "#partial_and_var" }, | ||
{ "include": "#block_helper" }, | ||
{ "include": "#end_block" } | ||
] | ||
}, | ||
"tag_generic_attribute": { | ||
"name": "entity.other.attribute-name.html", | ||
"match": "\\b([a-zA-Z\\-:]+)", | ||
"patterns": [ | ||
{ "include": "#partial_and_var" } | ||
] | ||
}, | ||
"tag-id-attribute": { | ||
"name": "meta.attribute-with-value.id.html", | ||
"begin": "\\b(id)\\b\\s*(=)", | ||
"end": "(?<=''|\")", | ||
"captures": { | ||
"1": { "name": "entity.other.attribute-name.id.html" }, | ||
"2": { "name": "punctuation.separator.key-value.html" } | ||
}, | ||
"patterns": [ | ||
{ "name": "string.quoted.double.html", | ||
"contentName": "meta.toc-list.id.html", | ||
"begin": "\"", | ||
"end": "\"", | ||
"beginCaptures": { | ||
"0": { "name": "punctuation.definition.string.begin.html" } | ||
}, | ||
"endCaptures": { | ||
"0": { "name": "punctuation.definition.string.end.html" } | ||
}, | ||
"patterns": [ | ||
{ "include": "#partial_and_var" } | ||
] | ||
}, | ||
{ "name": "string.quoted.single.html", | ||
"contentName": "meta.toc-list.id.html", | ||
"begin": "'", | ||
"end": "'", | ||
"beginCaptures": { | ||
"0": { "name": "punctuation.definition.string.begin.html" } | ||
}, | ||
"endCaptures": { | ||
"0": { "name": "punctuation.definition.string.end.html" } | ||
}, | ||
"patterns": [ | ||
] | ||
} | ||
] | ||
}, | ||
|
||
"html_tags": { | ||
"patterns": [ | ||
{ "name": "meta.tag.any.html", | ||
"begin": "(<)([a-zA-Z0-9:]++)(?=[^>]*></\\2>)", | ||
"end": "(>)(<)(/)(\\2)(>)", | ||
"beginCaptures": { | ||
"1": { "name": "punctuation.definition.tag.begin.html" }, | ||
"2": { "name": "entity.name.tag.html" } | ||
}, | ||
"endCaptures": { | ||
"1": { "name": "punctuation.definition.tag.end.html" }, | ||
"2": { "name": "punctuation.definition.tag.begin.html meta.scope.between-tag-pair.html" }, | ||
"3": { "name": "punctuation.definition.tag.begin.html" }, | ||
"4": { "name": "entity.name.tag.html" }, | ||
"5": { "name": "punctuation.definition.tag.end.html" } | ||
}, | ||
"patterns": [ | ||
{ "include": "#tag_stuff" } | ||
] | ||
}, | ||
{ "name": "meta.tag.structure.any.html", | ||
"begin": "(</?)((?i:body|head|html)\\b)", | ||
"end": "(>)", | ||
"captures": { | ||
"1": { "name": "punctuation.definition.tag.begin.html" }, | ||
"2": { "name": "entity.name.tag.structure.any.html" } | ||
}, | ||
"endCaptures": { "1": { "name": "punctuation.definition.tag.end.html" } }, | ||
"patterns": [ { "include": "#tag_stuff" } ] | ||
}, | ||
{ "name": "meta.tag.block.any.html", | ||
"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)", | ||
"end": "(>)", | ||
"beginCaptures": { | ||
"1": { "name": "punctuation.definition.tag.begin.html" }, | ||
"2": { "name": "entity.name.tag.block.any.html" } | ||
}, | ||
"endCaptures": { "1": { "name": "punctuation.definition.tag.end.html" } }, | ||
"patterns": [ { "include": "#tag_stuff" } ] | ||
}, | ||
{ "name": "meta.tag.inline.any.html", | ||
"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)", | ||
"end": "((?: ?/)?>)", | ||
"beginCaptures": { | ||
"1": { "name": "punctuation.definition.tag.begin.html" }, | ||
"2": { "name": "entity.name.tag.inline.any.html" } | ||
}, | ||
"endCaptures": { | ||
"1": { "name": "punctuation.definition.tag.end.html" } | ||
}, | ||
"patterns": [ { "include": "#tag_stuff" } ] | ||
}, | ||
{ "name": "meta.tag.other.html", | ||
"begin": "(</?)([a-zA-Z0-9:]+)", | ||
"end": "(>)", | ||
"beginCaptures": { | ||
"1": { "name": "punctuation.definition.tag.begin.html" }, | ||
"2": { "name": "entity.name.tag.other.html" } | ||
}, | ||
"endCaptures": { "1": { "name": "punctuation.definition.tag.end.html" } }, | ||
"patterns": [ | ||
{ "include": "#tag_stuff" } | ||
] | ||
}, | ||
{ "include": "#entities" }, | ||
{ "name": "invalid.illegal.incomplete.html", | ||
"match": "<>" | ||
}, | ||
{ "name": "invalid.illegal.bad-angle-bracket.html", | ||
"match": "<" | ||
} | ||
] | ||
}, | ||
|
||
"entities": { | ||
"patterns": [ | ||
{ "name": "constant.character.entity.html", | ||
"match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)", | ||
"captures": { | ||
"1": { "name": "punctuation.definition.entity.html" }, | ||
"3": { "name": "punctuation.definition.entity.html" } | ||
} | ||
}, | ||
{ "name": "invalid.illegal.bad-ampersand.html", | ||
"match": "&" | ||
} | ||
] | ||
}, | ||
|
||
"tag_stuff": { | ||
"patterns": [ | ||
{ "include": "#tag_id_attribute" }, | ||
{ "include": "#tag_generic_attribute" }, | ||
{ "include": "#string_double_quoted" }, | ||
{ "include": "#string_single_quoted" } | ||
|
||
] | ||
} | ||
} | ||
} |
Oops, something went wrong.