site/node_modules/shiki/dist/langs/handlebars.mjs

16 lines
13 KiB
JavaScript
Raw Normal View History

2024-10-14 06:09:33 +00:00
import html from './html.mjs';
import css from './css.mjs';
import javascript from './javascript.mjs';
import yaml from './yaml.mjs';
const lang = Object.freeze({ "displayName": "Handlebars", "name": "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": { "block_comments": { "patterns": [{ "begin": "\\{\\{!--", "end": "--\\}\\}", "name": "comment.block.handlebars", "patterns": [{ "match": "@\\w*", "name": "keyword.annotation.handlebars" }, { "include": "#comments" }] }, { "begin": "<!--", "captures": { "0": { "name": "punctuation.definition.comment.html" } }, "end": "-{2,3}\\s*>", "name": "comment.block.html", "patterns": [{ "match": "--", "name": "invalid.illegal.bad-comments-or-CDATA.html" }] }] }, "block_helper": { "begin": "(\\{\\{)(~?\\#)([-a-zA-Z0-9_\\./>]+)\\s?(@?[-a-zA-Z0-9_\\./]+)*\\s?(@?[-a-zA-Z0-9_\\./]+)*\\s?(@?[-a-zA-Z0-9_\\./]+)*", "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" } }, "end": "(~?\\}\\})", "endCaptures": { "1": { "name": "support.constant.handlebars" } }, "name": "meta.function.block.start.handlebars", "patterns": [{ "include": "#string" }, { "include": "#handlebars_attribute" }] }, "comments": { "patterns": [{ "begin": "\\{\\{!", "end": "\\}\\}", "name": "comment.block.handlebars", "patterns": [{ "match": "@\\w*", "name": "keyword.annotation.handlebars" }, { "include": "#comments" }] }, { "begin": "<!--", "captures": { "0": { "name": "punctuation.definition.comment.html" } }, "end": "-{2,3}\\s*>", "name": "comment.block.html", "patterns": [{ "match": "--", "name": "invalid.illegal.bad-comments-or-CDATA.html" }] }] }, "else_token": { "begin": "(\\{\\{)(~?else)(@?\\s(if)\\s([-a-zA-Z0-9_\\.\\(\\s\\)/]+))?", "beginCaptures": { "1": { "name": "support.constant.handlebars" }, "2": { "name": "support.constant.handlebars keyword.control" }, "3": { "name": "support.constant.handlebars" }, "4": { "name": "variable.parameter.handlebars" } }, "end": "(~?\\}\\}\\}*)", "endCaptures": { "1": { "name": "support.constant.handlebars" } }, "name": "meta.function.inline.else.handlebars" }, "end_block": { "begin": "(\\{\\{)(~?/)([a-zA-Z0-9/_\\.-]+)\\s*", "beginCaptures": { "1": { "name": "support.constant.handlebars" }, "2": { "name": "support.constant.handlebars keyword.control" }, "3": { "name": "support.constant.handlebars keyword.control" } }, "end": "(~?\\}\\})", "endCaptures": { "1": { "name": "support.constant.handlebars" } }, "name": "meta.function.block.end.handlebars", "patterns": [] }, "entities": { "patterns": [{ "captures": { "1": { "name": "punctuation.definition.entity.html" }, "3": { "name": "punctuation.definition.entity.html" } }, "match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)", "name": "constant.character.entity.html" }, { "match": "&", "name": "invalid.illegal.bad-ampersand.html" }] }, "escaped-double-quote": { "match": '\\\\"', "name": "constant.character.escape.js" }, "escaped-single-quote": { "match": "\\\\'", "name": "constant.character.escape.js" }, "extends": { "patterns": [{ "begin": "(\\{\\{!<)\\s([-a-zA-Z0-9_\\./]+)", "beginCaptures": { "1": { "name": "support.function.handlebars" }, "2": { "name": "support.class.handlebars" } }, "end": "(\\}\\})", "endCaptures": { "1": { "name": "support.function.handlebars" } }, "name": "meta.preprocessor.handlebars" }] }, "handlebars_attribute": { "patterns": [{ "include": "#handlebars_attribute_name" }, { "include": "#handlebars_attribute_value" }] }, "handlebars_attribute_name": { "begin": "\\b([-a-zA-Z0-9_\\.]+)\\b=", "captures": { "1": { "name": "variable.parameter.handlebars" } }, "end": `(?='|"|)`, "name": "entity.o
var handlebars = [
...html,
...css,
...javascript,
...yaml,
lang
];
export { handlebars as default };