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

33 lines
11 KiB
JavaScript
Raw Normal View History

2024-10-14 06:09:33 +00:00
import html_derivative from './html-derivative.mjs';
import cpp from './cpp.mjs';
import python from './python.mjs';
import javascript from './javascript.mjs';
import shellscript from './shellscript.mjs';
import yaml from './yaml.mjs';
import cmake from './cmake.mjs';
import ruby from './ruby.mjs';
import './html.mjs';
import './css.mjs';
import './cpp-macro.mjs';
import './glsl.mjs';
import './c.mjs';
import './sql.mjs';
import './xml.mjs';
import './java.mjs';
import './lua.mjs';
const lang = Object.freeze({ "displayName": "reStructuredText", "name": "rst", "patterns": [{ "include": "#body" }], "repository": { "anchor": { "match": "^\\.{2}\\s+(_[^:]+:)\\s*", "name": "entity.name.tag.anchor" }, "block": { "begin": "^(\\s*)(\\.{2}\\s+\\S+::)(.*)", "beginCaptures": { "2": { "name": "keyword.control" }, "3": { "name": "variable" } }, "end": "^(?!\\1\\s|\\s*$)", "patterns": [{ "include": "#block-param" }, { "include": "#body" }] }, "block-comment": { "begin": "^(\\s*)\\.{2}(\\s+|$)", "end": "^(?=\\S)|^\\s*$", "name": "comment.block", "patterns": [{ "begin": "^\\s{3,}(?=\\S)", "name": "comment.block", "while": "^\\s{3}.*|^\\s*$" }] }, "block-param": { "patterns": [{ "captures": { "1": { "name": "keyword.control" }, "2": { "name": "variable.parameter" } }, "match": "(:param\\s+(.+?):)(?:\\s|$)" }, { "captures": { "1": { "name": "keyword.control" }, "2": { "patterns": [{ "match": "\\b(0x[a-fA-F\\d]+|\\d+)\\b", "name": "constant.numeric" }, { "include": "#inline-markup" }] } }, "match": "(:.+?:)(?:$|\\s+(.*))" }] }, "blocks": { "patterns": [{ "include": "#domains" }, { "include": "#doctest" }, { "include": "#code-block-cpp" }, { "include": "#code-block-py" }, { "include": "#code-block-console" }, { "include": "#code-block-javascript" }, { "include": "#code-block-yaml" }, { "include": "#code-block-cmake" }, { "include": "#code-block-kconfig" }, { "include": "#code-block-ruby" }, { "include": "#code-block-dts" }, { "include": "#code-block" }, { "include": "#doctest-block" }, { "include": "#raw-html" }, { "include": "#block" }, { "include": "#literal-block" }, { "include": "#block-comment" }] }, "body": { "patterns": [{ "include": "#title" }, { "include": "#inline-markup" }, { "include": "#anchor" }, { "include": "#line-block" }, { "include": "#replace-include" }, { "include": "#footnote" }, { "include": "#substitution" }, { "include": "#blocks" }, { "include": "#table" }, { "include": "#simple-table" }, { "include": "#options-list" }] }, "bold": { "begin": `(?<=[\\s"'(\\[{<]|^)\\*{2}[^\\s*]`, "end": "\\*{2}|^\\s*$", "name": "markup.bold" }, "citation": { "applyEndPatternLast": 0, "begin": "(?<=[\\s\"'(\\[{<]|^)`[^\\s`]", "end": "`_{,2}|^\\s*$", "name": "entity.name.tag" }, "code-block": { "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)", "beginCaptures": { "2": { "name": "keyword.control" } }, "patterns": [{ "include": "#block-param" }], "while": "^\\1(?=\\s)|^\\s*$" }, "code-block-cmake": { "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)\\s*(cmake)\\s*$", "beginCaptures": { "2": { "name": "keyword.control" }, "4": { "name": "variable.parameter.codeblock.cmake" } }, "patterns": [{ "include": "#block-param" }, { "include": "source.cmake" }], "while": "^\\1(?=\\s)|^\\s*$" }, "code-block-console": { "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)\\s*(console|shell|bash)\\s*$", "beginCaptures": { "2": { "name": "keyword.control" }, "4": { "name": "variable.parameter.codeblock.console" } }, "patterns": [{ "include": "#block-param" }, { "include": "source.shell" }], "while": "^\\1(?=\\s)|^\\s*$" }, "code-block-cpp": { "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)\\s*(c|c\\+\\+|cpp|C|C\\+\\+|CPP|Cpp)\\s*$", "beginCaptures": { "2": { "name": "keyword.control" }, "4": { "name": "variable.parameter.codeblock.cpp" } }, "patterns": [{ "include": "#block-param" }, { "include": "source.cpp" }], "while": "^\\1(?=\\s)|^\\s*$" }, "code-block-dts": { "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)\\s*(dts|DTS|devicetree)\\s*$", "beginCaptures": { "2": { "name": "keyword.control" }, "4": { "name": "variable.parameter.codeblock.dts" } }, "patterns": [{ "include": "#block-param" }, { "include": "source.dts" }], "while": "^\\1(?=\\s)|^\\s*$" }, "code-block-javascript": { "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)::)\\s*(javascript)\\s*$", "beginCaptures": { "2": { "name": "keyword.control" }, "4": { "name": "variable.parameter.codeblock.js" } }, "patterns": [{ "include": "#block-param" }, { "include": "source.js" }], "while": "^\\1(?=\\s)|^\\s*$" }, "code-block-kconfig": { "begin": "^(\\s*)(\\.{2}\\s+(code|code-block)
var rst = [
...html_derivative,
...cpp,
...python,
...javascript,
...shellscript,
...yaml,
...cmake,
...ruby,
lang
];
export { rst as default };