yanzi-monaco-editorbb
Version:
这是一个基于微软的monaco和vue封装的一个代码编辑器,浏览器可运行。主要功能有:html、javascript、css代码编辑,高亮显示,语法错误提示等,可以帮您的项目很快的拥有一个web端的代码编辑器
142 lines (131 loc) • 7.15 kB
JavaScript
((typeof self !== 'undefined' ? self : this)["webpackJsonpyanziMonacoEditor"] = (typeof self !== 'undefined' ? self : this)["webpackJsonpyanziMonacoEditor"] || []).push([[59],{
/***/ "2dd4":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "conf", function() { return conf; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "language", function() { return language; });
/* harmony import */ var core_js_modules_es_regexp_constructor_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("4d63");
/* harmony import */ var core_js_modules_es_regexp_constructor_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_constructor_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var core_js_modules_es_regexp_dot_all_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("c607");
/* harmony import */ var core_js_modules_es_regexp_dot_all_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_dot_all_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("ac1f");
/* harmony import */ var core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_exec_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var core_js_modules_es_regexp_sticky_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("2c3e");
/* harmony import */ var core_js_modules_es_regexp_sticky_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_sticky_js__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("25f0");
/* harmony import */ var core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_regexp_to_string_js__WEBPACK_IMPORTED_MODULE_4__);
/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.32.1(29a273516805a852aa8edc5e05059f119b13eff0)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
*-----------------------------------------------------------------------------*/
// src/basic-languages/restructuredtext/restructuredtext.ts
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"]]
}
};
/***/ })
}]);