123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219 |
- /*!-----------------------------------------------------------------------------
- * 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/markdown/markdown",[],()=>{
- 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/markdown/markdown.ts
- var markdown_exports = {};
- __export(markdown_exports, {
- conf: () => conf,
- language: () => language
- });
- var conf = {
- comments: {
- blockComment: ["<!--", "-->"]
- },
- 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: ".md",
- control: /[\\`*_\[\]{}()#+\-\.!]/,
- noncontrol: /[^\\`*_\[\]{}()#+\-\.!]/,
- escapes: /\\(?:@control)/,
- jsescapes: /\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,
- empty: [
- "area",
- "base",
- "basefont",
- "br",
- "col",
- "frame",
- "hr",
- "img",
- "input",
- "isindex",
- "link",
- "meta",
- "param"
- ],
- tokenizer: {
- root: [
- [/^\s*\|/, "@rematch", "@table_header"],
- [/^(\s{0,3})(#+)((?:[^\\#]|@escapes)+)((?:#+)?)/, ["white", "keyword", "keyword", "keyword"]],
- [/^\s*(=+|\-+)\s*$/, "keyword"],
- [/^\s*((\*[ ]?)+)\s*$/, "meta.separator"],
- [/^\s*>+/, "comment"],
- [/^\s*([\*\-+:]|\d+\.)\s/, "keyword"],
- [/^(\t|[ ]{4})[^ ].*$/, "string"],
- [/^\s*~~~\s*((?:\w|[\/\-#])+)?\s*$/, { token: "string", next: "@codeblock" }],
- [
- /^\s*```\s*((?:\w|[\/\-#])+).*$/,
- { token: "string", next: "@codeblockgh", nextEmbedded: "$1" }
- ],
- [/^\s*```\s*$/, { token: "string", next: "@codeblock" }],
- { include: "@linecontent" }
- ],
- table_header: [
- { include: "@table_common" },
- [/[^\|]+/, "keyword.table.header"]
- ],
- table_body: [{ include: "@table_common" }, { include: "@linecontent" }],
- table_common: [
- [/\s*[\-:]+\s*/, { token: "keyword", switchTo: "table_body" }],
- [/^\s*\|/, "keyword.table.left"],
- [/^\s*[^\|]/, "@rematch", "@pop"],
- [/^\s*$/, "@rematch", "@pop"],
- [
- /\|/,
- {
- cases: {
- "@eos": "keyword.table.right",
- "@default": "keyword.table.middle"
- }
- }
- ]
- ],
- codeblock: [
- [/^\s*~~~\s*$/, { token: "string", next: "@pop" }],
- [/^\s*```\s*$/, { token: "string", next: "@pop" }],
- [/.*$/, "variable.source"]
- ],
- codeblockgh: [
- [/```\s*$/, { token: "string", next: "@pop", nextEmbedded: "@pop" }],
- [/[^`]+/, "variable.source"]
- ],
- linecontent: [
- [/&\w+;/, "string.escape"],
- [/@escapes/, "escape"],
- [/\b__([^\\_]|@escapes|_(?!_))+__\b/, "strong"],
- [/\*\*([^\\*]|@escapes|\*(?!\*))+\*\*/, "strong"],
- [/\b_[^_]+_\b/, "emphasis"],
- [/\*([^\\*]|@escapes)+\*/, "emphasis"],
- [/`([^\\`]|@escapes)+`/, "variable"],
- [/\{+[^}]+\}+/, "string.target"],
- [/(!?\[)((?:[^\]\\]|@escapes)*)(\]\([^\)]+\))/, ["string.link", "", "string.link"]],
- [/(!?\[)((?:[^\]\\]|@escapes)*)(\])/, "string.link"],
- { include: "html" }
- ],
- html: [
- [/<(\w+)\/>/, "tag"],
- [
- /<(\w+)/,
- {
- cases: {
- "@empty": { token: "tag", next: "@tag.$1" },
- "@default": { token: "tag", next: "@tag.$1" }
- }
- }
- ],
- [/<\/(\w+)\s*>/, { token: "tag" }],
- [/<!--/, "comment", "@comment"]
- ],
- comment: [
- [/[^<\-]+/, "comment.content"],
- [/-->/, "comment", "@pop"],
- [/<!--/, "comment.content.invalid"],
- [/[<\-]/, "comment.content"]
- ],
- tag: [
- [/[ \t\r\n]+/, "white"],
- [
- /(type)(\s*=\s*)(")([^"]+)(")/,
- [
- "attribute.name.html",
- "delimiter.html",
- "string.html",
- { token: "string.html", switchTo: "@tag.$S2.$4" },
- "string.html"
- ]
- ],
- [
- /(type)(\s*=\s*)(')([^']+)(')/,
- [
- "attribute.name.html",
- "delimiter.html",
- "string.html",
- { token: "string.html", switchTo: "@tag.$S2.$4" },
- "string.html"
- ]
- ],
- [/(\w+)(\s*=\s*)("[^"]*"|'[^']*')/, ["attribute.name.html", "delimiter.html", "string.html"]],
- [/\w+/, "attribute.name.html"],
- [/\/>/, "tag", "@pop"],
- [
- />/,
- {
- cases: {
- "$S2==style": {
- token: "tag",
- switchTo: "embeddedStyle",
- nextEmbedded: "text/css"
- },
- "$S2==script": {
- cases: {
- $S3: {
- token: "tag",
- switchTo: "embeddedScript",
- nextEmbedded: "$S3"
- },
- "@default": {
- token: "tag",
- switchTo: "embeddedScript",
- nextEmbedded: "text/javascript"
- }
- }
- },
- "@default": { token: "tag", next: "@pop" }
- }
- }
- ]
- ],
- embeddedStyle: [
- [/[^<]+/, ""],
- [/<\/style\s*>/, { token: "@rematch", next: "@pop", nextEmbedded: "@pop" }],
- [/</, ""]
- ],
- embeddedScript: [
- [/[^<]+/, ""],
- [/<\/script\s*>/, { token: "@rematch", next: "@pop", nextEmbedded: "@pop" }],
- [/</, ""]
- ]
- }
- };
- return markdown_exports;
- })();
- return moduleExports;
- });
|