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

7 lines
26 KiB
JavaScript
Raw Permalink Normal View History

2024-10-14 06:09:33 +00:00
const lang = Object.freeze({ "displayName": "Mermaid", "fileTypes": [], "injectionSelector": "L:text.html.markdown", "name": "mermaid", "patterns": [{ "include": "#mermaid-code-block" }, { "include": "#mermaid-code-block-with-attributes" }, { "include": "#mermaid-ado-code-block" }], "repository": { "mermaid": { "patterns": [{ "begin": "^\\s*(classDiagram)", "beginCaptures": { "1": { "name": "keyword.control.mermaid" } }, "comment": "Class Diagram", "end": "(^|\\G)(?=\\s*[`:~]{3,}\\s*$)", "patterns": [{ "match": "\\%%.*", "name": "comment" }, { "captures": { "1": { "name": "entity.name.type.class.mermaid" }, "2": { "name": "keyword.control.mermaid" }, "3": { "name": "keyword.control.mermaid" }, "4": { "name": "keyword.control.mermaid" }, "5": { "name": "entity.name.type.class.mermaid" }, "6": { "name": "keyword.control.mermaid" }, "7": { "name": "string" } }, "comment": '(class name) ("multiplicity relationship")? (relationship) ("multiplicity relationship")? (class name) :? (labelText)?', "match": '([\\w-]+)\\s("(?:\\d+|\\*|0..\\d+|1..\\d+|1..\\*)")?\\s?(--o|--\\*|\\<--|--\\>|<\\.\\.|\\.\\.\\>|\\<\\|\\.\\.|\\.\\.\\|\\>|\\<\\|--|--\\|>|--\\*|--|\\.\\.|\\*--|o--)\\s("(?:\\d+|\\*|0..\\d+|1..\\d+|1..\\*)")?\\s?([\\w-]+)\\s?(:)?\\s(.*)$' }, { "captures": { "1": { "name": "entity.name.type.class.mermaid" }, "2": { "name": "keyword.control.mermaid" }, "3": { "name": "keyword.control.mermaid" }, "4": { "name": "entity.name.function.mermaid" }, "5": { "name": "punctuation.parenthesis.open.mermaid" }, "6": { "name": "storage.type.mermaid" }, "7": { "name": "punctuation.definition.typeparameters.begin.mermaid" }, "8": { "name": "storage.type.mermaid" }, "9": { "name": "punctuation.definition.typeparameters.end.mermaid" }, "10": { "name": "entity.name.variable.parameter.mermaid" }, "11": { "name": "punctuation.parenthesis.closed.mermaid" }, "12": { "name": "keyword.control.mermaid" }, "13": { "name": "storage.type.mermaid" }, "14": { "name": "punctuation.definition.typeparameters.begin.mermaid" }, "15": { "name": "storage.type.mermaid" }, "16": { "name": "punctuation.definition.typeparameters.end.mermaid" } }, "comment": "(class name) : (visibility)?(function)( (function param/generic param)? )(classifier)? (return/generic return)?$", "match": "([\\w-]+)\\s?(:)\\s([\\+~#-])?([\\w-]+)(\\()([\\w-]+)?(~)?([\\w-]+)?(~)?\\s?([\\w-]+)?(\\))([*\\$]{0,2})\\s?([\\w-]+)?(~)?([\\w-]+)?(~)?$" }, { "captures": { "1": { "name": "entity.name.type.class.mermaid" }, "2": { "name": "keyword.control.mermaid" }, "3": { "name": "keyword.control.mermaid" }, "4": { "name": "storage.type.mermaid" }, "5": { "name": "punctuation.definition.typeparameters.begin.mermaid" }, "6": { "name": "storage.type.mermaid" }, "7": { "name": "punctuation.definition.typeparameters.end.mermaid" }, "8": { "name": "entity.name.variable.field.mermaid" } }, "comment": "(class name) : (visibility)?(datatype/generic data type) (attribute name)$", "match": "([\\w-]+)\\s?(:)\\s([\\+~#-])?([\\w-]+)(~)?([\\w-]+)?(~)?\\s([\\w-]+)?$" }, { "captures": { "1": { "name": "punctuation.definition.typeparameters.begin.mermaid" }, "2": { "name": "storage.type.mermaid" }, "3": { "name": "punctuation.definition.typeparameters.end.mermaid" }, "4": { "name": "entity.name.type.class.mermaid" } }, "comment": "<<(Annotation)>> (class name)", "match": "(<<)([\\w-]+)(>>)\\s?([\\w-]+)?" }, { "begin": "(class)\\s+([\\w-]+)(~)?([\\w-]+)?(~)?\\s?({)", "beginCaptures": { "1": { "name": "keyword.control.mermaid" }, "2": { "name": "entity.name.type.class.mermaid" }, "3": { "name": "punctuation.definition.typeparameters.begin.mermaid" }, "4": { "name": "storage.type.mermaid" }, "5": { "name": "punctuation.definition.typeparameters.end.mermaid" }, "6": { "name": "keyword.control.mermaid" } }, "comment": "class (class name) ~?(generic type)?~? ({)", "end": "(})", "endCaptures": { "1": { "name": "keyword.control.mermaid" } }, "patterns": [{ "match": "\\%%.*", "name": "comment" }, { "begin": "\\s([\\+~#-])?([\\w-]+)(\\()", "beginCaptures": { "1": { "name": "keyword.control.mermaid" }, "2": { "name": "entity.name.f
var mermaid = [
lang
];
export { mermaid as default };