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

25 lines
20 KiB
JavaScript
Raw Permalink Normal View History

2024-10-14 06:09:33 +00:00
import markdown from './markdown.mjs';
import yaml from './yaml.mjs';
import html_derivative from './html-derivative.mjs';
import './html.mjs';
import './javascript.mjs';
import './css.mjs';
const lang = Object.freeze({ "displayName": "MDC", "injectionSelector": "L:text.html.markdown", "name": "mdc", "patterns": [{ "include": "#component_block" }, { "include": "#inline" }], "repository": { "attribute": { "patterns": [{ "captures": { "2": { "name": "entity.other.attribute-name.html" }, "3": { "patterns": [{ "include": "#attribute-interior" }] } }, "match": `(?x)
(
([^=><\\s]*)
(
=["]([^"]*)(["])|[']([^']*)(['])
| =[^\\s'"}]*
)?
\\s*
)` }] }, "attribute-interior": { "patterns": [{ "begin": "=", "beginCaptures": { "0": { "name": "punctuation.separator.key-value.html" } }, "end": "(?<=[^\\s=])(?!\\s*=)|(?=/?>)", "patterns": [{ "match": "([^\\s\"'=<>`/]|/(?!>))+", "name": "string.unquoted.html" }, { "begin": '"', "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } }, "end": '"', "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } }, "name": "string.quoted.double.html", "patterns": [{ "include": "#entities" }] }, { "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.html" } }, "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.html" } }, "name": "string.quoted.single.html", "patterns": [{ "include": "#entities" }] }, { "match": "=", "name": "invalid.illegal.unexpected-equals-sign.html" }] }] }, "attributes": { "captures": { "1": { "name": "punctuation.definition.tag.start.component" }, "3": { "patterns": [{ "include": "#attribute" }] }, "4": { "name": "punctuation.definition.tag.end.component" } }, "match": "(?x)(\n({)\n([^{]*)\n(})\n)", "name": "attributes.mdc" }, "block": { "patterns": [{ "include": "#component_block" }, { "include": "text.html.markdown#separator" }, { "include": "#heading" }, { "include": "#blockquote" }, { "include": "#lists" }, { "include": "text.html.markdown#fenced_code_block" }, { "include": "text.html.markdown#link-def" }, { "include": "text.html.markdown#html" }, { "include": "#paragraph" }] }, "blockquote": { "begin": "(^|\\G)[ ]*(>) ?", "captures": { "2": { "name": "punctuation.definition.quote.begin.markdown" } }, "name": "markup.quote.markdown", "patterns": [{ "include": "#block" }], "while": "(^|\\G)\\s*(>) ?" }, "component_block": { "begin": "(?x)\n(^|\\G)(\\s*)\n(:{2,})\n(?i:\n(\\w[\\w\\d-]+)\n(\n\\s*\n| \\s*({[^{]*})\n)\n$\n)", "beginCaptures": { "3": { "name": "punctuation.definition.tag.start.mdc" }, "4": { "name": "entity.name.tag.mdc" }, "5": { "patterns": [{ "include": "#attributes" }] } }, "end": "(^|\\G)(\\2)(\\3)\\s*$", "endCaptures": { "3": { "name": "punctuation.definition.tag.end.mdc" } }, "name": "block.component.mdc", "patterns": [{ "captures": { "2": { "name": "punctuation.definition.tag.end.mdc" } }, "match": "(^|\\G)\\s*([:]{2,})$" }, { "include": "#content" }] }, "component_inline": { "captures": { "2": { "name": "punctuation.definition.tag.start.component" }, "3": { "name": "entity.name.tag.component" }, "5": { "patterns": [{ "include": "#attributes" }] }, "6": { "patterns": [{ "include": "#span" }] }, "7": { "patterns": [{ "include": "#span" }] }, "8": { "patterns": [{ "include": "#attributes" }] } }, "match": "(?x)\n(^|\\G|\\s+)\n(:)\n(?i:\n(\\w[\\w\\d-]*)\n)\n(\n({[^}]*})\n(\\[[^\\]]*\\])?\n\n| (\\[[^\\]]*\\])\n({[^}]*})?\n)?\n\\s", "name": "inline.component.mdc" }, "content": { "begin": "(^|\\G)(\\s*)(.*)", "contentName": "meta.embedded.block.mdc", "patterns": [{ "begin": "(^|\\G)(\\s*)(-{3})(\\s*)$", "end": "(^|\\G)(\\s*(-{3})(\\s*)$)", "patterns": [{ "include": "source.yaml" }] }, { "captures": { "2": { "name": "entity.other.attribute-name.html" }, "3": { "name": "comment.block.html" } }, "match": "^(\\s*)(#[\\w\\-\\_]*)\\s*(<!--(.*)-->)?$" }, { "include": "#block" }], "while": "(^|\\G)(?!\\s*([:]{2,})\\s*$)" }, "entities": { "patterns": [{ "captures": { "1": { "name": "punctuation.definition.entity.html" }, "912": { "name": "punctuation.definition.entity.html" } }, "match": "(?x)\n(&) (?=[a-zA-Z])\n(\n(a(s(ymp(eq)?|cr|t)|n(d(slope|d|v|and)?|g(s(t|ph)|zarr|e|le|rt(vb(d)?)?|msd(a(h|c|d|e|f|a|g|b))?)?)|c(y|irc|d|ute|E)?|tilde|o(pf|gon)|uml|p(id|os|prox(eq)?|e|E|acir)?|elig|f(r)?|w(conint|int)|l(pha|e(ph|fsym))|acute|ring|grave|m(p|a(cr|lg))|breve)|A(s(sign|cr)|nd|MP|c(y|irc)|tilde|o(pf|gon)|uml|pplyFunction|fr|Elig|lpha|acute|ring|grave|macr|breve))\n| (B(scr|cy|opf|umpeq|e(cause|ta|rnoullis)|fr|a(ckslash|r(v|wed))|reve)|b(s(cr|im(e)?|ol(hsub|b)?|emi)|n(ot|e(quiv)?)|c(y|ong)|ig(s(tar|qcup)|c(irc|up|ap)|triangle(down|up)|o(times|dot|plus)|uplus|vee|wedge)|o(t(tom)?|pf|wtie|x(h(d|u|D|U)?|ti
var mdc = [
...markdown,
...yaml,
...html_derivative,
lang
];
export { mdc as default };