@readme/markdown
Version:
ReadMe's React-based Markdown parser
406 lines (381 loc) • 10.8 kB
JavaScript
exports.id = 368;
exports.ids = [368];
exports.modules = {
/***/ 3368:
/***/ ((module) => {
/******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ 42:
/***/ ((__unused_webpack_module, exports) => {
Object.defineProperty(exports, "__esModule", ({
value: true
}));
var modeAliases = {
aspx: 'asp',
bash: 'shell',
'c++': 'cplusplus',
'c#': 'csharp',
clj: 'clojure',
cljc: 'clojure',
cljx: 'clojure',
coffeescript: 'javascript',
cpp: 'cplusplus',
cql: 'sql',
cs: 'csharp',
docker: 'dockerfile',
ecmascript: 'javascript',
erl: 'erlang',
gql: 'graphql',
gradle: 'groovy',
handlebars: 'html',
hbs: 'html',
jl: 'julia',
jruby: 'ruby',
js: 'javascript',
kt: 'kotlin',
less: 'css',
macruby: 'ruby',
md: 'markdown',
ml: 'ocaml',
mssql: 'sql',
mysql: 'sql',
node: 'javascript',
'obj-c': 'objectivec',
'obj-c++': 'objectivecplusplus',
'objc++': 'objectivecplusplus',
objc: 'objectivec',
objcpp: 'objectivecplusplus',
objectivecpp: 'objectivecplusplus',
pgsql: 'sql',
pl: 'perl',
plsql: 'sql',
postgres: 'sql',
postgresql: 'sql',
ps1: 'powershell',
py: 'python',
rake: 'ruby',
rb: 'ruby',
rbx: 'ruby',
rs: 'rust',
sass: 'css',
scss: 'css',
sh: 'shell',
solidity: 'sol',
sqlite: 'sql',
styl: 'css',
stylus: 'css',
xhtml: 'html',
yml: 'yaml',
zsh: 'shell'
};
var canonical = function canonical(language) {
if (language in modeAliases) return modeAliases[language];
return language;
};
exports["default"] = canonical;
/***/ }),
/***/ 476:
/***/ ((__unused_webpack_module, exports) => {
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.modes = void 0;
exports.getMode = getMode;
// This is a mapping of languages that we support, but aren't directly loading the mode extension
// Within `/src/codeMirror/index.jsx` and /src/codeEditor.index.jsx
//
// This list also includes a number of language aliases, as because of the way we're using
// `CodeMirror.runMode` we can't take advantage of its known aliases in the mode extensions that
// we're loading.
//
// There are 2 types of lookup, single and array. e.g. `html` needs to be rendered using
// `htmlmixed`, but `java`, needs to be rendered using the `clike` mode.
//
exports.modes = {
asp: 'clike',
aspx: 'clike',
bash: 'shell',
c: 'clike',
'c#': ['clike', 'text/x-csharp'],
'c++': ['clike', 'text/x-c++src'],
clj: 'clojure',
cljc: 'clojure',
cljx: 'clojure',
coffeescript: 'javascript',
cplusplus: ['clike', 'text/x-c++src'],
cpp: ['clike', 'text/x-c++src'],
cql: ['sql', 'text/x-cassandra'],
cs: ['clike', 'text/x-csharp'],
csharp: ['clike', 'text/x-csharp'],
curl: 'shell',
d: 'd',
diff: 'diff',
ecmascript: 'javascript',
erl: 'erlang',
go: ['go', 'text/x-go'],
gradle: 'groovy',
gql: 'graphql',
handlebars: 'htmlmixed',
hbs: 'htmlmixed',
html: 'htmlmixed',
java: ['clike', 'text/x-java'],
jl: 'julia',
js: 'javascript',
jsx: 'jsx',
json: ['javascript', 'application/ld+json'],
jruby: 'ruby',
kotlin: ['clike', 'text/x-kotlin'],
kt: ['clike', 'text/x-kotlin'],
less: 'css',
liquid: 'htmlmixed',
lua: 'lua',
node: 'javascript',
macruby: 'ruby',
markdown: 'gfm',
ml: ['mllike', 'text/x-ocaml'],
mssql: ['sql', 'text/x-mssql'],
mysql: ['sql', 'text/x-mysql'],
objc: ['clike', 'text/x-objectivec'],
'objc++': ['clike', 'text/x-objectivec++'],
objcpp: ['clike', 'text/x-objectivec++'],
objectivec: ['clike', 'text/x-objectivec'],
objectivecpp: ['clike', 'text/x-objectivec++'],
objectivecplusplus: ['clike', 'text/x-objectivec++'],
ocaml: ['mllike', 'text/x-ocaml'],
php: ['php', 'text/x-php'],
pgsql: ['sql', 'text/x-pgsql'],
pl: 'perl',
plsql: ['sql', 'text/x-plsql'],
postgres: ['sql', 'text/x-pgsql'],
postgresql: ['sql', 'text/x-pgsql'],
ps1: 'powershell',
py: 'python',
r: 'r',
rake: 'ruby',
rb: 'ruby',
rbx: 'ruby',
rs: 'rust',
sass: 'css',
scala: ['clike', 'text/x-scala'],
scss: 'css',
sh: 'shell',
sol: 'solidity',
solidity: 'solidity',
sql: ['sql', 'text/x-sql'],
sqlite: ['sql', 'text/x-sqlite'],
styl: 'css',
stylus: 'css',
text: ['null', 'text/plain'],
ts: ['javascript', 'text/typescript'],
typescript: ['javascript', 'text/typescript'],
xhtml: 'htmlmixed',
yml: 'yaml',
zsh: 'shell'
};
function getMode(lang) {
var mode = lang;
if (mode in exports.modes) {
mode = exports.modes[mode];
if (Array.isArray(mode)) {
var _mode = mode;
var _mode2 = _slicedToArray(_mode, 2);
mode = _mode2[1];
}
}
return mode;
}
/***/ }),
/***/ 638:
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_6109__) {
var __importDefault = this && this.__importDefault || function (mod) {
return mod && mod.__esModule ? mod : {
"default": mod
};
};
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports.getMode = exports.modes = exports.canonical = exports.uppercase = void 0;
var canonical_1 = __importDefault(__nested_webpack_require_6109__(42));
exports.canonical = canonical_1.default;
var modes_1 = __nested_webpack_require_6109__(476);
Object.defineProperty(exports, "modes", ({
enumerable: true,
get: function get() {
return modes_1.modes;
}
}));
Object.defineProperty(exports, "getMode", ({
enumerable: true,
get: function get() {
return modes_1.getMode;
}
}));
var uppercase_1 = __importDefault(__nested_webpack_require_6109__(704));
exports.uppercase = uppercase_1.default;
/***/ }),
/***/ 704:
/***/ ((__unused_webpack_module, exports) => {
Object.defineProperty(exports, "__esModule", ({
value: true
}));
exports["default"] = uppercase;
var codeTypes = {
asp: 'ASP.NET',
aspx: 'ASP.NET',
bash: 'Bash',
c: 'C',
'c#': 'C#',
'c++': 'C++',
coffeescript: 'CoffeeScript',
clj: 'Clojure',
cljc: 'Clojure',
cljx: 'Clojure',
clojure: 'Clojure',
cplusplus: 'C++',
cpp: 'C++',
cql: 'Cassandra',
cs: 'C#',
csharp: 'C#',
css: 'CSS',
curl: 'cURL',
d: 'D',
dart: 'Dart',
diff: 'Diff',
dockerfile: 'Dockerfile',
ecmascript: 'ECMAScript',
erl: 'Erlang',
erlang: 'Erlang',
go: 'Go',
gql: 'GraphQL',
gradle: 'Gradle',
graphql: 'GraphQL',
groovy: 'Groovy',
handlebars: 'Handlebars',
hbs: 'Handlebars',
haml: 'HAML',
haxe: 'Haxe',
html: 'HTML',
http: 'HTTP',
java: 'Java',
javascript: 'JavaScript',
jinja2: 'Jinja2',
jl: 'Julia',
jruby: 'JRuby',
js: 'JavaScript',
json: 'JSON',
jsx: 'JSX',
julia: 'Julia',
kotlin: 'Kotlin',
kt: 'Kotlin',
less: 'LESS',
liquid: 'Liquid',
lua: 'Lua',
macruby: 'MacRuby',
markdown: 'Markdown',
md: 'Markdown',
mermaid: 'Mermaid',
// syntax highlighting not supported yet
ml: 'OCaml',
mssql: 'SQL Server',
mysql: 'MySQL',
node: 'Node',
objc: 'Objective-C',
'objc++': 'Objective-C++',
objcpp: 'Objective-C++',
objectivec: 'Objective-C',
objectivecpp: 'Objective-C++',
objectivecplusplus: 'Objective-C++',
ocaml: 'OCaml',
perl: 'Perl',
php: 'PHP',
pl: 'Perl',
pgsql: 'PL/pgSQL',
plsql: 'PL/SQL',
postgres: 'PostgreSQL',
postgresql: 'PostgreSQL',
powershell: 'PowerShell',
ps1: 'PowerShell',
python: 'Python',
py: 'Python',
r: 'R',
rake: 'Rake',
rb: 'Ruby',
rbx: 'Rubinius',
rs: 'Rust',
ruby: 'Ruby',
rust: 'Rust',
sass: 'Sass',
scala: 'Scala',
scss: 'SCSS',
sh: 'Shell',
shell: 'Shell',
smarty: 'Smarty',
solidity: 'Solidity',
sql: 'SQL',
sqlite: 'SQLite',
stylus: 'Stylus',
styl: 'Stylus',
swift: 'Swift',
text: 'Text',
toml: 'TOML',
twig: 'Twig',
typescript: 'TypeScript',
xhtml: 'XHTML',
xml: 'XML',
yaml: 'YAML',
yml: 'YAML',
zsh: 'Zsh'
};
function uppercase(language) {
if (language in codeTypes) return codeTypes[language];
return language;
}
/***/ })
/******/ });
/************************************************************************/
/******/ // The module cache
/******/ var __webpack_module_cache__ = {};
/******/
/******/ // The require function
/******/ function __nested_webpack_require_9448__(moduleId) {
/******/ // Check if module is in cache
/******/ var cachedModule = __webpack_module_cache__[moduleId];
/******/ if (cachedModule !== undefined) {
/******/ return cachedModule.exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = __webpack_module_cache__[moduleId] = {
/******/ // no module.id needed
/******/ // no module.loaded needed
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __nested_webpack_require_9448__);
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/************************************************************************/
/******/
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module is referenced by other modules so it can't be inlined
/******/ var __nested_webpack_exports__ = __nested_webpack_require_9448__(638);
/******/ module.exports = __nested_webpack_exports__;
/******/
/******/ })()
;
/***/ })
};
;
//# sourceMappingURL=368.node.js.map