Merge commit 'be3e8236086165e5e45a5a10783823874b3f3ebd' as 'lib/vscode'
This commit is contained in:
2
lib/vscode/extensions/handlebars/.vscodeignore
Normal file
2
lib/vscode/extensions/handlebars/.vscodeignore
Normal file
@ -0,0 +1,2 @@
|
||||
test/**
|
||||
cgmanifest.json
|
36
lib/vscode/extensions/handlebars/cgmanifest.json
Normal file
36
lib/vscode/extensions/handlebars/cgmanifest.json
Normal file
@ -0,0 +1,36 @@
|
||||
{
|
||||
"registrations": [
|
||||
{
|
||||
"component": {
|
||||
"type": "git",
|
||||
"git": {
|
||||
"name": "daaain/Handlebars",
|
||||
"repositoryUrl": "https://github.com/daaain/Handlebars",
|
||||
"commitHash": "85a153a6f759df4e8da7533e1b3651f007867c51"
|
||||
}
|
||||
},
|
||||
"licenseDetail": [
|
||||
"-- Credits",
|
||||
"",
|
||||
"Adapted from the great sublime-text-handlebars package by Nicholas Westlake.",
|
||||
"",
|
||||
"Thanks a lot to all the generous contributors (in alphabetical order): @bittersweetryan, @bradcliffe, @calumbrodie, @duncanbeevers, @hlvnst, @jonschlinkert, @Krutius, @samselikoff, @utkarshkukreti, @zeppelin",
|
||||
"",
|
||||
"-- License",
|
||||
"",
|
||||
"(The MIT License)",
|
||||
"",
|
||||
"Copyright (c) daaain/Handlebars project authors",
|
||||
"",
|
||||
"Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:",
|
||||
"",
|
||||
"The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.",
|
||||
"",
|
||||
"THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
|
||||
],
|
||||
"license": "MIT",
|
||||
"version": "1.8.0"
|
||||
}
|
||||
],
|
||||
"version": 1
|
||||
}
|
26
lib/vscode/extensions/handlebars/language-configuration.json
Normal file
26
lib/vscode/extensions/handlebars/language-configuration.json
Normal file
@ -0,0 +1,26 @@
|
||||
{
|
||||
"comments": {
|
||||
"blockComment": [ "{{!--", "--}}" ]
|
||||
},
|
||||
"brackets": [
|
||||
["<!--", "-->"],
|
||||
["<", ">"],
|
||||
["{{", "}}"],
|
||||
["{{{", "}}}"],
|
||||
["{", "}"],
|
||||
["(", ")"]
|
||||
],
|
||||
"autoClosingPairs": [
|
||||
{ "open": "{", "close": "}"},
|
||||
{ "open": "[", "close": "]"},
|
||||
{ "open": "(", "close": ")" },
|
||||
{ "open": "'", "close": "'" },
|
||||
{ "open": "\"", "close": "\"" }
|
||||
],
|
||||
"surroundingPairs": [
|
||||
{ "open": "'", "close": "'" },
|
||||
{ "open": "\"", "close": "\"" },
|
||||
{ "open": "<", "close": ">" },
|
||||
{ "open": "{", "close": "}" }
|
||||
]
|
||||
}
|
28
lib/vscode/extensions/handlebars/package.json
Normal file
28
lib/vscode/extensions/handlebars/package.json
Normal file
@ -0,0 +1,28 @@
|
||||
{
|
||||
"name": "handlebars",
|
||||
"displayName": "%displayName%",
|
||||
"description": "%description%",
|
||||
"version": "1.0.0",
|
||||
"publisher": "vscode",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"vscode": "0.10.x"
|
||||
},
|
||||
"scripts": {
|
||||
"update-grammar": "node ../../build/npm/update-grammar.js daaain/Handlebars grammars/Handlebars.json ./syntaxes/Handlebars.tmLanguage.json"
|
||||
},
|
||||
"contributes": {
|
||||
"languages": [{
|
||||
"id": "handlebars",
|
||||
"extensions": [ ".handlebars", ".hbs", ".hjs" ],
|
||||
"aliases": [ "Handlebars", "handlebars" ],
|
||||
"mimetypes": ["text/x-handlebars-template"],
|
||||
"configuration": "./language-configuration.json"
|
||||
}],
|
||||
"grammars": [{
|
||||
"language": "handlebars",
|
||||
"scopeName": "text.html.handlebars",
|
||||
"path": "./syntaxes/Handlebars.tmLanguage.json"
|
||||
}]
|
||||
}
|
||||
}
|
4
lib/vscode/extensions/handlebars/package.nls.json
Normal file
4
lib/vscode/extensions/handlebars/package.nls.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"displayName": "Handlebars Language Basics",
|
||||
"description": "Provides syntax highlighting and bracket matching in Handlebars files."
|
||||
}
|
@ -0,0 +1,852 @@
|
||||
{
|
||||
"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/85a153a6f759df4e8da7533e1b3651f007867c51",
|
||||
"name": "Handlebars",
|
||||
"scopeName": "text.html.handlebars",
|
||||
"patterns": [
|
||||
{
|
||||
"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": {
|
||||
"html_tags": {
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "(<)([a-zA-Z0-9:-]+)(?=[^>]*></\\2>)",
|
||||
"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": "<!--",
|
||||
"captures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.comment.html"
|
||||
}
|
||||
},
|
||||
"end": "--\\s*>",
|
||||
"name": "comment.block.html",
|
||||
"patterns": [
|
||||
{
|
||||
"match": "--",
|
||||
"name": "invalid.illegal.bad-comments-or-CDATA.html"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "<!",
|
||||
"captures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.tag.html"
|
||||
}
|
||||
},
|
||||
"end": ">",
|
||||
"name": "meta.tag.sgml.html",
|
||||
"patterns": [
|
||||
{
|
||||
"begin": "(DOCTYPE|doctype)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "entity.name.tag.doctype.html"
|
||||
}
|
||||
},
|
||||
"end": "(?=>)",
|
||||
"name": "meta.tag.sgml.doctype.html",
|
||||
"patterns": [
|
||||
{
|
||||
"match": "\"[^\">]*\"",
|
||||
"name": "string.quoted.double.doctype.identifiers-and-DTDs.html"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "\\[CDATA\\[",
|
||||
"end": "]](?=>)",
|
||||
"name": "constant.other.inline-data.html"
|
||||
},
|
||||
{
|
||||
"match": "(\\s*)(?!--|>)\\S(\\s*)",
|
||||
"name": "invalid.illegal.bad-comments-or-CDATA.html"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(?:^\\s+)?(<)((?i:style))\\b(?![^>]*/>)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.html"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.tag.style.html"
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.definition.tag.html"
|
||||
}
|
||||
},
|
||||
"end": "(</)((?i:style))(>)(?:\\s*\\n)?",
|
||||
"name": "source.css.embedded.html",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#tag-stuff"
|
||||
},
|
||||
{
|
||||
"begin": "(>)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.html"
|
||||
}
|
||||
},
|
||||
"end": "(?=</(?i:style))",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "source.css"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(?:^\\s+)?(<)((?i:script))\\b(?![^>]*/>)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.html"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.tag.script.html"
|
||||
}
|
||||
},
|
||||
"end": "(?<=</(script|SCRIPT))(>)(?:\\s*\\n)?",
|
||||
"endCaptures": {
|
||||
"2": {
|
||||
"name": "punctuation.definition.tag.html"
|
||||
}
|
||||
},
|
||||
"name": "source.js.embedded.html",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#tag-stuff"
|
||||
},
|
||||
{
|
||||
"begin": "(?<!</(?:script|SCRIPT))(>)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.html"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.tag.script.html"
|
||||
}
|
||||
},
|
||||
"end": "(</)((?i:script))",
|
||||
"patterns": [
|
||||
{
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.comment.js"
|
||||
}
|
||||
},
|
||||
"match": "(//).*?((?=</script)|$\\n?)",
|
||||
"name": "comment.line.double-slash.js"
|
||||
},
|
||||
{
|
||||
"begin": "/\\*",
|
||||
"captures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.comment.js"
|
||||
}
|
||||
},
|
||||
"end": "\\*/|(?=</script)",
|
||||
"name": "comment.block.js"
|
||||
},
|
||||
{
|
||||
"include": "source.js"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(</?)((?i:body|head|html)\\b)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.html"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.tag.structure.any.html"
|
||||
}
|
||||
},
|
||||
"end": "(>)",
|
||||
"name": "meta.tag.structure.any.html",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#tag-stuff"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"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)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.html"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.tag.block.any.html"
|
||||
}
|
||||
},
|
||||
"end": "(>)",
|
||||
"name": "meta.tag.block.any.html",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#tag-stuff"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"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)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.html"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.tag.inline.any.html"
|
||||
}
|
||||
},
|
||||
"end": "((?: ?/)?>)",
|
||||
"name": "meta.tag.inline.any.html",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#tag-stuff"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(</?)([a-zA-Z0-9:-]+)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.html"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.tag.other.html"
|
||||
}
|
||||
},
|
||||
"end": "(>)",
|
||||
"name": "meta.tag.other.html",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#tag-stuff"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"begin": "(</?)([a-zA-Z0-9{}:-]+)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.html"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.tag.tokenised.html"
|
||||
}
|
||||
},
|
||||
"end": "(>)",
|
||||
"name": "meta.tag.tokenised.html",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#tag-stuff"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"include": "#entities"
|
||||
},
|
||||
{
|
||||
"match": "<>",
|
||||
"name": "invalid.illegal.incomplete.html"
|
||||
},
|
||||
{
|
||||
"match": "<",
|
||||
"name": "invalid.illegal.bad-angle-bracket.html"
|
||||
}
|
||||
]
|
||||
},
|
||||
"entities": {
|
||||
"patterns": [
|
||||
{
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.entity.html"
|
||||
},
|
||||
"3": {
|
||||
"name": "punctuation.definition.entity.html"
|
||||
}
|
||||
},
|
||||
"name": "constant.character.entity.html",
|
||||
"match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)"
|
||||
},
|
||||
{
|
||||
"name": "invalid.illegal.bad-ampersand.html",
|
||||
"match": "&"
|
||||
}
|
||||
]
|
||||
},
|
||||
"end_block": {
|
||||
"begin": "(\\{\\{)(~?/)([a-zA-Z0-9/_\\.-]+)\\s*",
|
||||
"end": "(~?\\}\\})",
|
||||
"name": "meta.function.block.end.handlebars",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "support.constant.handlebars"
|
||||
}
|
||||
},
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "support.constant.handlebars"
|
||||
},
|
||||
"2": {
|
||||
"name": "support.constant.handlebars keyword.control"
|
||||
},
|
||||
"3": {
|
||||
"name": "support.constant.handlebars keyword.control"
|
||||
}
|
||||
},
|
||||
"patterns": []
|
||||
},
|
||||
"yfm": {
|
||||
"patterns": [
|
||||
{
|
||||
"patterns": [
|
||||
{
|
||||
"include": "source.yaml"
|
||||
}
|
||||
],
|
||||
"begin": "(?<!\\s)---\\n$",
|
||||
"end": "^---\\s",
|
||||
"name": "markup.raw.yaml.front-matter"
|
||||
}
|
||||
]
|
||||
},
|
||||
"comments": {
|
||||
"patterns": [
|
||||
{
|
||||
"patterns": [
|
||||
{
|
||||
"name": "keyword.annotation.handlebars",
|
||||
"match": "@\\w*"
|
||||
},
|
||||
{
|
||||
"include": "#comments"
|
||||
}
|
||||
],
|
||||
"begin": "\\{\\{!",
|
||||
"end": "\\}\\}",
|
||||
"name": "comment.block.handlebars"
|
||||
},
|
||||
{
|
||||
"captures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.comment.html"
|
||||
}
|
||||
},
|
||||
"begin": "<!--",
|
||||
"end": "-{2,3}\\s*>",
|
||||
"name": "comment.block.html",
|
||||
"patterns": [
|
||||
{
|
||||
"name": "invalid.illegal.bad-comments-or-CDATA.html",
|
||||
"match": "--"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"block_comments": {
|
||||
"patterns": [
|
||||
{
|
||||
"patterns": [
|
||||
{
|
||||
"name": "keyword.annotation.handlebars",
|
||||
"match": "@\\w*"
|
||||
},
|
||||
{
|
||||
"include": "#comments"
|
||||
}
|
||||
],
|
||||
"begin": "\\{\\{!--",
|
||||
"end": "--\\}\\}",
|
||||
"name": "comment.block.handlebars"
|
||||
},
|
||||
{
|
||||
"captures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.comment.html"
|
||||
}
|
||||
},
|
||||
"begin": "<!--",
|
||||
"end": "-{2,3}\\s*>",
|
||||
"name": "comment.block.html",
|
||||
"patterns": [
|
||||
{
|
||||
"name": "invalid.illegal.bad-comments-or-CDATA.html",
|
||||
"match": "--"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"block_helper": {
|
||||
"begin": "(\\{\\{)(~?\\#)([-a-zA-Z0-9_\\./>]+)\\s?(@?[-a-zA-Z0-9_\\./]+)*\\s?(@?[-a-zA-Z0-9_\\./]+)*\\s?(@?[-a-zA-Z0-9_\\./]+)*",
|
||||
"end": "(~?\\}\\})",
|
||||
"name": "meta.function.block.start.handlebars",
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "support.constant.handlebars"
|
||||
}
|
||||
},
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "support.constant.handlebars"
|
||||
},
|
||||
"2": {
|
||||
"name": "support.constant.handlebars keyword.control"
|
||||
},
|
||||
"3": {
|
||||
"name": "support.constant.handlebars keyword.control"
|
||||
},
|
||||
"4": {
|
||||
"name": "variable.parameter.handlebars"
|
||||
},
|
||||
"5": {
|
||||
"name": "support.constant.handlebars"
|
||||
},
|
||||
"6": {
|
||||
"name": "variable.parameter.handlebars"
|
||||
},
|
||||
"7": {
|
||||
"name": "support.constant.handlebars"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#string"
|
||||
},
|
||||
{
|
||||
"include": "#handlebars_attribute"
|
||||
}
|
||||
]
|
||||
},
|
||||
"string-single-quoted": {
|
||||
"begin": "'",
|
||||
"end": "'",
|
||||
"name": "string.quoted.single.handlebars",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.string.end.html"
|
||||
}
|
||||
},
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.string.begin.html"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#escaped-single-quote"
|
||||
},
|
||||
{
|
||||
"include": "#block_comments"
|
||||
},
|
||||
{
|
||||
"include": "#comments"
|
||||
},
|
||||
{
|
||||
"include": "#block_helper"
|
||||
},
|
||||
{
|
||||
"include": "#else_token"
|
||||
},
|
||||
{
|
||||
"include": "#end_block"
|
||||
},
|
||||
{
|
||||
"include": "#partial_and_var"
|
||||
}
|
||||
]
|
||||
},
|
||||
"string": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#string-single-quoted"
|
||||
},
|
||||
{
|
||||
"include": "#string-double-quoted"
|
||||
}
|
||||
]
|
||||
},
|
||||
"escaped-single-quote": {
|
||||
"name": "constant.character.escape.js",
|
||||
"match": "\\\\'"
|
||||
},
|
||||
"escaped-double-quote": {
|
||||
"name": "constant.character.escape.js",
|
||||
"match": "\\\\\""
|
||||
},
|
||||
"partial_and_var": {
|
||||
"begin": "(\\{\\{~?\\{*(>|!<)*)\\s*(@?[-a-zA-Z0-9$_\\./]+)*",
|
||||
"end": "(~?\\}\\}\\}*)",
|
||||
"name": "meta.function.inline.other.handlebars",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "support.constant.handlebars"
|
||||
},
|
||||
"3": {
|
||||
"name": "variable.parameter.handlebars"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "support.constant.handlebars"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#string"
|
||||
},
|
||||
{
|
||||
"include": "#handlebars_attribute"
|
||||
}
|
||||
]
|
||||
},
|
||||
"handlebars_attribute_name": {
|
||||
"begin": "\\b([-a-zA-Z0-9_\\.]+)\\b=",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "variable.parameter.handlebars"
|
||||
}
|
||||
},
|
||||
"end": "(?='|\"|)",
|
||||
"name": "entity.other.attribute-name.handlebars"
|
||||
},
|
||||
"handlebars_attribute_value": {
|
||||
"begin": "([-a-zA-Z0-9_\\./]+)\\b",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "variable.parameter.handlebars"
|
||||
}
|
||||
},
|
||||
"end": "('|\"|)",
|
||||
"name": "entity.other.attribute-value.handlebars",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"handlebars_attribute": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#handlebars_attribute_name"
|
||||
},
|
||||
{
|
||||
"include": "#handlebars_attribute_value"
|
||||
}
|
||||
]
|
||||
},
|
||||
"extends": {
|
||||
"patterns": [
|
||||
{
|
||||
"end": "(\\}\\})",
|
||||
"begin": "(\\{\\{!<)\\s([-a-zA-Z0-9_\\./]+)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "support.function.handlebars"
|
||||
},
|
||||
"2": {
|
||||
"name": "support.class.handlebars"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "support.function.handlebars"
|
||||
}
|
||||
},
|
||||
"name": "meta.preprocessor.handlebars"
|
||||
}
|
||||
]
|
||||
},
|
||||
"else_token": {
|
||||
"begin": "(\\{\\{)(~?else)(@?\\s(if)\\s([-a-zA-Z0-9_\\.\\(\\s\\)/]+))?",
|
||||
"end": "(~?\\}\\}\\}*)",
|
||||
"name": "meta.function.inline.else.handlebars",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "support.constant.handlebars"
|
||||
},
|
||||
"2": {
|
||||
"name": "support.constant.handlebars keyword.control"
|
||||
},
|
||||
"3": {
|
||||
"name": "support.constant.handlebars"
|
||||
},
|
||||
"4": {
|
||||
"name": "variable.parameter.handlebars"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"1": {
|
||||
"name": "support.constant.handlebars"
|
||||
}
|
||||
}
|
||||
},
|
||||
"string-double-quoted": {
|
||||
"begin": "\"",
|
||||
"end": "\"",
|
||||
"name": "string.quoted.double.handlebars",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.string.begin.html"
|
||||
}
|
||||
},
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.string.end.html"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#escaped-double-quote"
|
||||
},
|
||||
{
|
||||
"include": "#block_comments"
|
||||
},
|
||||
{
|
||||
"include": "#comments"
|
||||
},
|
||||
{
|
||||
"include": "#block_helper"
|
||||
},
|
||||
{
|
||||
"include": "#else_token"
|
||||
},
|
||||
{
|
||||
"include": "#end_block"
|
||||
},
|
||||
{
|
||||
"include": "#partial_and_var"
|
||||
}
|
||||
]
|
||||
},
|
||||
"inline_script": {
|
||||
"begin": "(?:^\\s+)?(<)((?i:script))\\b(?:.*(type)=([\"'](?:text/x-handlebars-template|text/x-handlebars|text/template|x-tmpl-handlebars)[\"']))(?![^>]*/>)",
|
||||
"beginCaptures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.html"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.tag.script.html"
|
||||
},
|
||||
"3": {
|
||||
"name": "entity.other.attribute-name.html"
|
||||
},
|
||||
"4": {
|
||||
"name": "string.quoted.double.html"
|
||||
}
|
||||
},
|
||||
"end": "(?<=</(script|SCRIPT))(>)(?:\\s*\\n)?",
|
||||
"endCaptures": {
|
||||
"2": {
|
||||
"name": "punctuation.definition.tag.html"
|
||||
}
|
||||
},
|
||||
"name": "source.handlebars.embedded.html",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#tag-stuff"
|
||||
},
|
||||
{
|
||||
"begin": "(?<!</(?:script|SCRIPT))(>)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.tag.html"
|
||||
},
|
||||
"2": {
|
||||
"name": "entity.name.tag.script.html"
|
||||
}
|
||||
},
|
||||
"end": "(</)((?i:script))",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#block_comments"
|
||||
},
|
||||
{
|
||||
"include": "#comments"
|
||||
},
|
||||
{
|
||||
"include": "#block_helper"
|
||||
},
|
||||
{
|
||||
"include": "#end_block"
|
||||
},
|
||||
{
|
||||
"include": "#else_token"
|
||||
},
|
||||
{
|
||||
"include": "#partial_and_var"
|
||||
},
|
||||
{
|
||||
"include": "#html_tags"
|
||||
},
|
||||
{
|
||||
"include": "text.html.basic"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"tag_generic_attribute": {
|
||||
"begin": "\\b([a-zA-Z0-9_-]+)\\b\\s*(=)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "entity.other.attribute-name.generic.html"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.separator.key-value.html"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#string"
|
||||
}
|
||||
],
|
||||
"name": "entity.other.attribute-name.html",
|
||||
"end": "(?<='|\"|)"
|
||||
},
|
||||
"tag_id_attribute": {
|
||||
"begin": "\\b(id)\\b\\s*(=)",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "entity.other.attribute-name.id.html"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.separator.key-value.html"
|
||||
}
|
||||
},
|
||||
"end": "(?<='|\"|)",
|
||||
"name": "meta.attribute-with-value.id.html",
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"tag-stuff": {
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#tag_id_attribute"
|
||||
},
|
||||
{
|
||||
"include": "#tag_generic_attribute"
|
||||
},
|
||||
{
|
||||
"include": "#string"
|
||||
},
|
||||
{
|
||||
"include": "#block_comments"
|
||||
},
|
||||
{
|
||||
"include": "#comments"
|
||||
},
|
||||
{
|
||||
"include": "#block_helper"
|
||||
},
|
||||
{
|
||||
"include": "#end_block"
|
||||
},
|
||||
{
|
||||
"include": "#else_token"
|
||||
},
|
||||
{
|
||||
"include": "#partial_and_var"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
<div class="entry">
|
||||
<h1>{{title}}</h1>
|
||||
{{#if author}}
|
||||
<h2>{{author.firstName}} {{author.lastName}}</h2>
|
||||
{{else}}
|
||||
<h2>Unknown Author</h2>
|
||||
{{/if}}
|
||||
{{contentBody}}
|
||||
</div>
|
||||
|
||||
{{#unless license}}
|
||||
<h3 class="warning">WARNING: This entry does not have a license!</h3>
|
||||
{{/unless}}
|
||||
|
||||
<div class="footnotes">
|
||||
<ul>
|
||||
{{#each footnotes}}
|
||||
<li>{{this}}</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<h1>Comments</h1>
|
||||
|
||||
<div id="comments">
|
||||
{{#each comments}}
|
||||
<h2><a href="/posts/{{../permalink}}#{{id}}">{{title}}</a></h2>
|
||||
<div>{{body}}</div>
|
||||
{{/each}}
|
||||
</div>
|
@ -0,0 +1,24 @@
|
||||
<h1>Comments</h1>
|
||||
|
||||
<div id="comments">
|
||||
{{#each comments}}
|
||||
<h2><a href="/posts/{{../permalink}}#{{id}}">{{title}}</a></h2>
|
||||
<div>{{body}}</div>
|
||||
{{/each}}
|
||||
<p>{{./name}} or {{this/name}} or {{this.name}}</p>
|
||||
</div>
|
||||
<div class="entry">
|
||||
{{!-- only output author name if an author exists --}}
|
||||
{{#if author}}
|
||||
<h1>{{firstName}} {{lastName}}</h1>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="post">
|
||||
{{> userMessage tagName="h1" }}
|
||||
|
||||
<h1>Comments</h1>
|
||||
|
||||
{{#each comments}}
|
||||
{{> userMessage tagName="h2" }}
|
||||
{{/each}}
|
||||
</div>
|
File diff suppressed because it is too large
Load Diff
1960
lib/vscode/extensions/handlebars/test/colorize-results/test_hbs.json
Normal file
1960
lib/vscode/extensions/handlebars/test/colorize-results/test_hbs.json
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user