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

16 lines
17 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 json from './json.mjs';
import javascript from './javascript.mjs';
const lang = Object.freeze({ "displayName": "Liquid", "fileTypes": ["liquid"], "foldingStartMarker": "(?x)\n{%\n -?\n \\s*\n (capture|case|comment|for|form|if|javascript|paginate|schema|style)\n [^(%})]+\n%}\n", "foldingStopMarker": "(?x)\n{%\n \\s*\n (endcapture|endcase|endcomment|endfor|endform|endif|endjavascript|endpaginate|endschema|endstyle)\n [^(%})]+\n%}\n", "injections": { "L:meta.embedded.block.js, L:meta.embedded.block.css, L:meta.embedded.block.html, L:string.quoted": { "patterns": [{ "include": "#injection" }] } }, "name": "liquid", "patterns": [{ "include": "#core" }], "repository": { "attribute": { "begin": "\\w+:", "beginCaptures": { "0": { "name": "entity.other.attribute-name.liquid" } }, "end": "(?=,|%}|}}|\\|)", "patterns": [{ "include": "#value_expression" }] }, "attribute_liquid": { "begin": "\\w+:", "beginCaptures": { "0": { "name": "entity.other.attribute-name.liquid" } }, "end": "(?=,|\\|)|$", "patterns": [{ "include": "#value_expression" }] }, "comment_block": { "begin": "{%-?\\s*comment\\s*-?%}", "end": "{%-?\\s*endcomment\\s*-?%}", "name": "comment.block.liquid", "patterns": [{ "include": "#comment_block" }, { "match": "(.(?!{%-?\\s*(comment|endcomment)\\s*-?%}))*." }] }, "core": { "patterns": [{ "include": "#raw_tag" }, { "include": "#comment_block" }, { "include": "#style_codefence" }, { "include": "#stylesheet_codefence" }, { "include": "#json_codefence" }, { "include": "#javascript_codefence" }, { "include": "#object" }, { "include": "#tag" }, { "include": "text.html.basic" }] }, "filter": { "captures": { "1": { "name": "support.function.liquid" } }, "match": "\\|\\s*((?![\\.0-9])[a-zA-Z0-9_-]+\\:?)\\s*" }, "injection": { "patterns": [{ "include": "#raw_tag" }, { "include": "#comment_block" }, { "include": "#object" }, { "include": "#tag_injection" }] }, "invalid_range": { "match": "\\((.(?!\\.\\.))+\\)", "name": "invalid.illegal.range.liquid" }, "javascript_codefence": { "begin": "({%-?)\\s*(javascript)\\s*(-?%})", "beginCaptures": { "0": { "name": "meta.tag.metadata.javascript.start.liquid" }, "1": { "name": "punctuation.definition.tag.begin.liquid" }, "2": { "name": "entity.name.tag.javascript.liquid" }, "3": { "name": "punctuation.definition.tag.begin.liquid" } }, "contentName": "meta.embedded.block.js", "end": "({%-?)\\s*(endjavascript)\\s*(-?%})", "endCaptures": { "0": { "name": "meta.tag.metadata.javascript.end.liquid" }, "1": { "name": "punctuation.definition.tag.end.liquid" }, "2": { "name": "entity.name.tag.javascript.liquid" }, "3": { "name": "punctuation.definition.tag.end.liquid" } }, "name": "meta.block.javascript.liquid", "patterns": [{ "include": "source.js" }] }, "json_codefence": { "begin": "({%-?)\\s*(schema)\\s*(-?%})", "beginCaptures": { "0": { "name": "meta.tag.metadata.schema.start.liquid" }, "1": { "name": "punctuation.definition.tag.begin.liquid" }, "2": { "name": "entity.name.tag.schema.liquid" }, "3": { "name": "punctuation.definition.tag.begin.liquid" } }, "contentName": "meta.embedded.block.json", "end": "({%-?)\\s*(endschema)\\s*(-?%})", "endCaptures": { "0": { "name": "meta.tag.metadata.schema.end.liquid" }, "1": { "name": "punctuation.definition.tag.end.liquid" }, "2": { "name": "entity.name.tag.schema.liquid" }, "3": { "name": "punctuation.definition.tag.end.liquid" } }, "name": "meta.block.schema.liquid", "patterns": [{ "include": "source.json" }] }, "language_constant": { "match": "\\b(false|true|nil|blank)\\b|empty(?!\\?)", "name": "constant.language.liquid" }, "number": { "match": "((-|\\+)\\s*)?[0-9]+(\\.[0-9]+)?", "name": "constant.numeric.liquid" }, "object": { "begin": "(?<!comment %})(?<!comment -%})(?<!comment%})(?<!comment-%})(?<!raw %})(?<!raw -%})(?<!raw%})(?<!raw-%}){{-?", "beginCaptures": { "0": { "name": "punctuation.definition.tag.begin.liquid" } }, "end": "-?}}", "endCaptures": { "0": { "name": "punctuation.definition.tag.end.liquid" } }, "name": "meta.object.liquid", "patterns": [{ "include": "#filter" }, { "include": "#attribute" }, { "include": "#value_expression" }] }, "operator": { "captures": { "1": { "name": "keyword.operator
var liquid = [
...html,
...css,
...json,
...javascript,
lang
];
export { liquid as default };