123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179 |
- /*!-----------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Version: 0.31.1(337587859b1c171314b40503171188b6cea6a32a)
- * Released under the MIT license
- * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
- *-----------------------------------------------------------------------------*/
- define("vs/basic-languages/restructuredtext/restructuredtext",[],()=>{
- var moduleExports = (() => {
- var __defProp = Object.defineProperty;
- var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
- var __export = (target, all) => {
- __markAsModule(target);
- for (var name in all)
- __defProp(target, name, { get: all[name], enumerable: true });
- };
- // src/basic-languages/restructuredtext/restructuredtext.ts
- var restructuredtext_exports = {};
- __export(restructuredtext_exports, {
- conf: () => conf,
- language: () => language
- });
- var conf = {
- brackets: [
- ["{", "}"],
- ["[", "]"],
- ["(", ")"]
- ],
- autoClosingPairs: [
- { open: "{", close: "}" },
- { open: "[", close: "]" },
- { open: "(", close: ")" },
- { open: "<", close: ">", notIn: ["string"] }
- ],
- surroundingPairs: [
- { open: "(", close: ")" },
- { open: "[", close: "]" },
- { open: "`", close: "`" }
- ],
- folding: {
- markers: {
- start: new RegExp("^\\s*<!--\\s*#?region\\b.*-->"),
- end: new RegExp("^\\s*<!--\\s*#?endregion\\b.*-->")
- }
- }
- };
- var language = {
- defaultToken: "",
- tokenPostfix: ".rst",
- control: /[\\`*_\[\]{}()#+\-\.!]/,
- escapes: /\\(?:@control)/,
- empty: [
- "area",
- "base",
- "basefont",
- "br",
- "col",
- "frame",
- "hr",
- "img",
- "input",
- "isindex",
- "link",
- "meta",
- "param"
- ],
- alphanumerics: /[A-Za-z0-9]/,
- simpleRefNameWithoutBq: /(?:@alphanumerics[-_+:.]*@alphanumerics)+|(?:@alphanumerics+)/,
- simpleRefName: /(?:`@phrase`|@simpleRefNameWithoutBq)/,
- phrase: /@simpleRefNameWithoutBq(?:\s@simpleRefNameWithoutBq)*/,
- citationName: /[A-Za-z][A-Za-z0-9-_.]*/,
- blockLiteralStart: /(?:[!"#$%&'()*+,-./:;<=>?@\[\]^_`{|}~]|[\s])/,
- precedingChars: /(?:[ -:/'"<([{])/,
- followingChars: /(?:[ -.,:;!?/'")\]}>]|$)/,
- punctuation: /(=|-|~|`|#|"|\^|\+|\*|:|\.|'|_|\+)/,
- tokenizer: {
- root: [
- [/^(@punctuation{3,}$){1,1}?/, "keyword"],
- [/^\s*([\*\-+‣•]|[a-zA-Z0-9]+\.|\([a-zA-Z0-9]+\)|[a-zA-Z0-9]+\))\s/, "keyword"],
- [/([ ]::)\s*$/, "keyword", "@blankLineOfLiteralBlocks"],
- [/(::)\s*$/, "keyword", "@blankLineOfLiteralBlocks"],
- { include: "@tables" },
- { include: "@explicitMarkupBlocks" },
- { include: "@inlineMarkup" }
- ],
- explicitMarkupBlocks: [
- { include: "@citations" },
- { include: "@footnotes" },
- [
- /^(\.\.\s)(@simpleRefName)(::\s)(.*)$/,
- [{ token: "", next: "subsequentLines" }, "keyword", "", ""]
- ],
- [
- /^(\.\.)(\s+)(_)(@simpleRefName)(:)(\s+)(.*)/,
- [{ token: "", next: "hyperlinks" }, "", "", "string.link", "", "", "string.link"]
- ],
- [
- /^((?:(?:\.\.)(?:\s+))?)(__)(:)(\s+)(.*)/,
- [{ token: "", next: "subsequentLines" }, "", "", "", "string.link"]
- ],
- [/^(__\s+)(.+)/, ["", "string.link"]],
- [
- /^(\.\.)( \|)([^| ]+[^|]*[^| ]*)(\| )(@simpleRefName)(:: .*)/,
- [{ token: "", next: "subsequentLines" }, "", "string.link", "", "keyword", ""],
- "@rawBlocks"
- ],
- [/(\|)([^| ]+[^|]*[^| ]*)(\|_{0,2})/, ["", "string.link", ""]],
- [/^(\.\.)([ ].*)$/, [{ token: "", next: "@comments" }, "comment"]]
- ],
- inlineMarkup: [
- { include: "@citationsReference" },
- { include: "@footnotesReference" },
- [/(@simpleRefName)(_{1,2})/, ["string.link", ""]],
- [/(`)([^<`]+\s+)(<)(.*)(>)(`)(_)/, ["", "string.link", "", "string.link", "", "", ""]],
- [/\*\*([^\\*]|\*(?!\*))+\*\*/, "strong"],
- [/\*[^*]+\*/, "emphasis"],
- [/(``)((?:[^`]|\`(?!`))+)(``)/, ["", "keyword", ""]],
- [/(__\s+)(.+)/, ["", "keyword"]],
- [/(:)((?:@simpleRefNameWithoutBq)?)(:`)([^`]+)(`)/, ["", "keyword", "", "", ""]],
- [/(`)([^`]+)(`:)((?:@simpleRefNameWithoutBq)?)(:)/, ["", "", "", "keyword", ""]],
- [/(`)([^`]+)(`)/, ""],
- [/(_`)(@phrase)(`)/, ["", "string.link", ""]]
- ],
- citations: [
- [
- /^(\.\.\s+\[)((?:@citationName))(\]\s+)(.*)/,
- [{ token: "", next: "@subsequentLines" }, "string.link", "", ""]
- ]
- ],
- citationsReference: [[/(\[)(@citationName)(\]_)/, ["", "string.link", ""]]],
- footnotes: [
- [
- /^(\.\.\s+\[)((?:[0-9]+))(\]\s+.*)/,
- [{ token: "", next: "@subsequentLines" }, "string.link", ""]
- ],
- [
- /^(\.\.\s+\[)((?:#@simpleRefName?))(\]\s+)(.*)/,
- [{ token: "", next: "@subsequentLines" }, "string.link", "", ""]
- ],
- [
- /^(\.\.\s+\[)((?:\*))(\]\s+)(.*)/,
- [{ token: "", next: "@subsequentLines" }, "string.link", "", ""]
- ]
- ],
- footnotesReference: [
- [/(\[)([0-9]+)(\])(_)/, ["", "string.link", "", ""]],
- [/(\[)(#@simpleRefName?)(\])(_)/, ["", "string.link", "", ""]],
- [/(\[)(\*)(\])(_)/, ["", "string.link", "", ""]]
- ],
- blankLineOfLiteralBlocks: [
- [/^$/, "", "@subsequentLinesOfLiteralBlocks"],
- [/^.*$/, "", "@pop"]
- ],
- subsequentLinesOfLiteralBlocks: [
- [/(@blockLiteralStart+)(.*)/, ["keyword", ""]],
- [/^(?!blockLiteralStart)/, "", "@popall"]
- ],
- subsequentLines: [
- [/^[\s]+.*/, ""],
- [/^(?!\s)/, "", "@pop"]
- ],
- hyperlinks: [
- [/^[\s]+.*/, "string.link"],
- [/^(?!\s)/, "", "@pop"]
- ],
- comments: [
- [/^[\s]+.*/, "comment"],
- [/^(?!\s)/, "", "@pop"]
- ],
- tables: [
- [/\+-[+-]+/, "keyword"],
- [/\+=[+=]+/, "keyword"]
- ]
- }
- };
- return restructuredtext_exports;
- })();
- return moduleExports;
- });
|