@readme/markdown 11.7.0 → 11.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/Code/index.tsx +1 -0
- package/components/CodeTabs/index.tsx +3 -1
- package/dist/368.node.js +406 -0
- package/dist/368.node.js.map +1 -0
- package/dist/lib/utils/extractMagicBlocks.d.ts +17 -0
- package/dist/main.js +374 -6
- package/dist/main.node.js +370 -9
- package/dist/main.node.js.map +1 -1
- package/package.json +2 -2
|
@@ -13,6 +13,7 @@ let syntaxHighlighter;
|
|
|
13
13
|
let canonicalLanguage = lang => '';
|
|
14
14
|
|
|
15
15
|
if (typeof window !== 'undefined') {
|
|
16
|
+
// @ts-expect-error this library does not have any types defined
|
|
16
17
|
import('@readme/syntax-highlighter').then(module => {
|
|
17
18
|
syntaxHighlighter = module.default;
|
|
18
19
|
canonicalLanguage = module.canonical;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import type { Mermaid } from 'mermaid';
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import syntaxHighlighterUtils from '@readme/syntax-highlighter/utils';
|
|
4
4
|
import React, { useContext, useEffect } from 'react';
|
|
5
5
|
|
|
6
6
|
import ThemeContext from '../../contexts/Theme';
|
|
7
7
|
|
|
8
8
|
let mermaid: Mermaid;
|
|
9
9
|
|
|
10
|
+
const { uppercase } = syntaxHighlighterUtils;
|
|
11
|
+
|
|
10
12
|
interface Props {
|
|
11
13
|
children: JSX.Element | JSX.Element[];
|
|
12
14
|
}
|
package/dist/368.node.js
ADDED
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
exports.id = 368;
|
|
2
|
+
exports.ids = [368];
|
|
3
|
+
exports.modules = {
|
|
4
|
+
|
|
5
|
+
/***/ 3368:
|
|
6
|
+
/***/ ((module) => {
|
|
7
|
+
|
|
8
|
+
/******/ (() => { // webpackBootstrap
|
|
9
|
+
/******/ "use strict";
|
|
10
|
+
/******/ var __webpack_modules__ = ({
|
|
11
|
+
|
|
12
|
+
/***/ 42:
|
|
13
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
18
|
+
value: true
|
|
19
|
+
}));
|
|
20
|
+
var modeAliases = {
|
|
21
|
+
aspx: 'asp',
|
|
22
|
+
bash: 'shell',
|
|
23
|
+
'c++': 'cplusplus',
|
|
24
|
+
'c#': 'csharp',
|
|
25
|
+
clj: 'clojure',
|
|
26
|
+
cljc: 'clojure',
|
|
27
|
+
cljx: 'clojure',
|
|
28
|
+
coffeescript: 'javascript',
|
|
29
|
+
cpp: 'cplusplus',
|
|
30
|
+
cql: 'sql',
|
|
31
|
+
cs: 'csharp',
|
|
32
|
+
docker: 'dockerfile',
|
|
33
|
+
ecmascript: 'javascript',
|
|
34
|
+
erl: 'erlang',
|
|
35
|
+
gql: 'graphql',
|
|
36
|
+
gradle: 'groovy',
|
|
37
|
+
handlebars: 'html',
|
|
38
|
+
hbs: 'html',
|
|
39
|
+
jl: 'julia',
|
|
40
|
+
jruby: 'ruby',
|
|
41
|
+
js: 'javascript',
|
|
42
|
+
kt: 'kotlin',
|
|
43
|
+
less: 'css',
|
|
44
|
+
macruby: 'ruby',
|
|
45
|
+
md: 'markdown',
|
|
46
|
+
ml: 'ocaml',
|
|
47
|
+
mssql: 'sql',
|
|
48
|
+
mysql: 'sql',
|
|
49
|
+
node: 'javascript',
|
|
50
|
+
'obj-c': 'objectivec',
|
|
51
|
+
'obj-c++': 'objectivecplusplus',
|
|
52
|
+
'objc++': 'objectivecplusplus',
|
|
53
|
+
objc: 'objectivec',
|
|
54
|
+
objcpp: 'objectivecplusplus',
|
|
55
|
+
objectivecpp: 'objectivecplusplus',
|
|
56
|
+
pgsql: 'sql',
|
|
57
|
+
pl: 'perl',
|
|
58
|
+
plsql: 'sql',
|
|
59
|
+
postgres: 'sql',
|
|
60
|
+
postgresql: 'sql',
|
|
61
|
+
ps1: 'powershell',
|
|
62
|
+
py: 'python',
|
|
63
|
+
rake: 'ruby',
|
|
64
|
+
rb: 'ruby',
|
|
65
|
+
rbx: 'ruby',
|
|
66
|
+
rs: 'rust',
|
|
67
|
+
sass: 'css',
|
|
68
|
+
scss: 'css',
|
|
69
|
+
sh: 'shell',
|
|
70
|
+
solidity: 'sol',
|
|
71
|
+
sqlite: 'sql',
|
|
72
|
+
styl: 'css',
|
|
73
|
+
stylus: 'css',
|
|
74
|
+
xhtml: 'html',
|
|
75
|
+
yml: 'yaml',
|
|
76
|
+
zsh: 'shell'
|
|
77
|
+
};
|
|
78
|
+
var canonical = function canonical(language) {
|
|
79
|
+
if (language in modeAliases) return modeAliases[language];
|
|
80
|
+
return language;
|
|
81
|
+
};
|
|
82
|
+
exports["default"] = canonical;
|
|
83
|
+
|
|
84
|
+
/***/ }),
|
|
85
|
+
|
|
86
|
+
/***/ 476:
|
|
87
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
92
|
+
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."); }
|
|
93
|
+
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; } }
|
|
94
|
+
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; }
|
|
95
|
+
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; } }
|
|
96
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
97
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
98
|
+
value: true
|
|
99
|
+
}));
|
|
100
|
+
exports.modes = void 0;
|
|
101
|
+
exports.getMode = getMode;
|
|
102
|
+
// This is a mapping of languages that we support, but aren't directly loading the mode extension
|
|
103
|
+
// Within `/src/codeMirror/index.jsx` and /src/codeEditor.index.jsx
|
|
104
|
+
//
|
|
105
|
+
// This list also includes a number of language aliases, as because of the way we're using
|
|
106
|
+
// `CodeMirror.runMode` we can't take advantage of its known aliases in the mode extensions that
|
|
107
|
+
// we're loading.
|
|
108
|
+
//
|
|
109
|
+
// There are 2 types of lookup, single and array. e.g. `html` needs to be rendered using
|
|
110
|
+
// `htmlmixed`, but `java`, needs to be rendered using the `clike` mode.
|
|
111
|
+
//
|
|
112
|
+
exports.modes = {
|
|
113
|
+
asp: 'clike',
|
|
114
|
+
aspx: 'clike',
|
|
115
|
+
bash: 'shell',
|
|
116
|
+
c: 'clike',
|
|
117
|
+
'c#': ['clike', 'text/x-csharp'],
|
|
118
|
+
'c++': ['clike', 'text/x-c++src'],
|
|
119
|
+
clj: 'clojure',
|
|
120
|
+
cljc: 'clojure',
|
|
121
|
+
cljx: 'clojure',
|
|
122
|
+
coffeescript: 'javascript',
|
|
123
|
+
cplusplus: ['clike', 'text/x-c++src'],
|
|
124
|
+
cpp: ['clike', 'text/x-c++src'],
|
|
125
|
+
cql: ['sql', 'text/x-cassandra'],
|
|
126
|
+
cs: ['clike', 'text/x-csharp'],
|
|
127
|
+
csharp: ['clike', 'text/x-csharp'],
|
|
128
|
+
curl: 'shell',
|
|
129
|
+
d: 'd',
|
|
130
|
+
diff: 'diff',
|
|
131
|
+
ecmascript: 'javascript',
|
|
132
|
+
erl: 'erlang',
|
|
133
|
+
go: ['go', 'text/x-go'],
|
|
134
|
+
gradle: 'groovy',
|
|
135
|
+
gql: 'graphql',
|
|
136
|
+
handlebars: 'htmlmixed',
|
|
137
|
+
hbs: 'htmlmixed',
|
|
138
|
+
html: 'htmlmixed',
|
|
139
|
+
java: ['clike', 'text/x-java'],
|
|
140
|
+
jl: 'julia',
|
|
141
|
+
js: 'javascript',
|
|
142
|
+
jsx: 'jsx',
|
|
143
|
+
json: ['javascript', 'application/ld+json'],
|
|
144
|
+
jruby: 'ruby',
|
|
145
|
+
kotlin: ['clike', 'text/x-kotlin'],
|
|
146
|
+
kt: ['clike', 'text/x-kotlin'],
|
|
147
|
+
less: 'css',
|
|
148
|
+
liquid: 'htmlmixed',
|
|
149
|
+
lua: 'lua',
|
|
150
|
+
node: 'javascript',
|
|
151
|
+
macruby: 'ruby',
|
|
152
|
+
markdown: 'gfm',
|
|
153
|
+
ml: ['mllike', 'text/x-ocaml'],
|
|
154
|
+
mssql: ['sql', 'text/x-mssql'],
|
|
155
|
+
mysql: ['sql', 'text/x-mysql'],
|
|
156
|
+
objc: ['clike', 'text/x-objectivec'],
|
|
157
|
+
'objc++': ['clike', 'text/x-objectivec++'],
|
|
158
|
+
objcpp: ['clike', 'text/x-objectivec++'],
|
|
159
|
+
objectivec: ['clike', 'text/x-objectivec'],
|
|
160
|
+
objectivecpp: ['clike', 'text/x-objectivec++'],
|
|
161
|
+
objectivecplusplus: ['clike', 'text/x-objectivec++'],
|
|
162
|
+
ocaml: ['mllike', 'text/x-ocaml'],
|
|
163
|
+
php: ['php', 'text/x-php'],
|
|
164
|
+
pgsql: ['sql', 'text/x-pgsql'],
|
|
165
|
+
pl: 'perl',
|
|
166
|
+
plsql: ['sql', 'text/x-plsql'],
|
|
167
|
+
postgres: ['sql', 'text/x-pgsql'],
|
|
168
|
+
postgresql: ['sql', 'text/x-pgsql'],
|
|
169
|
+
ps1: 'powershell',
|
|
170
|
+
py: 'python',
|
|
171
|
+
r: 'r',
|
|
172
|
+
rake: 'ruby',
|
|
173
|
+
rb: 'ruby',
|
|
174
|
+
rbx: 'ruby',
|
|
175
|
+
rs: 'rust',
|
|
176
|
+
sass: 'css',
|
|
177
|
+
scala: ['clike', 'text/x-scala'],
|
|
178
|
+
scss: 'css',
|
|
179
|
+
sh: 'shell',
|
|
180
|
+
sol: 'solidity',
|
|
181
|
+
solidity: 'solidity',
|
|
182
|
+
sql: ['sql', 'text/x-sql'],
|
|
183
|
+
sqlite: ['sql', 'text/x-sqlite'],
|
|
184
|
+
styl: 'css',
|
|
185
|
+
stylus: 'css',
|
|
186
|
+
text: ['null', 'text/plain'],
|
|
187
|
+
ts: ['javascript', 'text/typescript'],
|
|
188
|
+
typescript: ['javascript', 'text/typescript'],
|
|
189
|
+
xhtml: 'htmlmixed',
|
|
190
|
+
yml: 'yaml',
|
|
191
|
+
zsh: 'shell'
|
|
192
|
+
};
|
|
193
|
+
function getMode(lang) {
|
|
194
|
+
var mode = lang;
|
|
195
|
+
if (mode in exports.modes) {
|
|
196
|
+
mode = exports.modes[mode];
|
|
197
|
+
if (Array.isArray(mode)) {
|
|
198
|
+
var _mode = mode;
|
|
199
|
+
var _mode2 = _slicedToArray(_mode, 2);
|
|
200
|
+
mode = _mode2[1];
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
return mode;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/***/ }),
|
|
207
|
+
|
|
208
|
+
/***/ 638:
|
|
209
|
+
/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_6109__) {
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
var __importDefault = this && this.__importDefault || function (mod) {
|
|
214
|
+
return mod && mod.__esModule ? mod : {
|
|
215
|
+
"default": mod
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
219
|
+
value: true
|
|
220
|
+
}));
|
|
221
|
+
exports.getMode = exports.modes = exports.canonical = exports.uppercase = void 0;
|
|
222
|
+
var canonical_1 = __importDefault(__nested_webpack_require_6109__(42));
|
|
223
|
+
exports.canonical = canonical_1.default;
|
|
224
|
+
var modes_1 = __nested_webpack_require_6109__(476);
|
|
225
|
+
Object.defineProperty(exports, "modes", ({
|
|
226
|
+
enumerable: true,
|
|
227
|
+
get: function get() {
|
|
228
|
+
return modes_1.modes;
|
|
229
|
+
}
|
|
230
|
+
}));
|
|
231
|
+
Object.defineProperty(exports, "getMode", ({
|
|
232
|
+
enumerable: true,
|
|
233
|
+
get: function get() {
|
|
234
|
+
return modes_1.getMode;
|
|
235
|
+
}
|
|
236
|
+
}));
|
|
237
|
+
var uppercase_1 = __importDefault(__nested_webpack_require_6109__(704));
|
|
238
|
+
exports.uppercase = uppercase_1.default;
|
|
239
|
+
|
|
240
|
+
/***/ }),
|
|
241
|
+
|
|
242
|
+
/***/ 704:
|
|
243
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
248
|
+
value: true
|
|
249
|
+
}));
|
|
250
|
+
exports["default"] = uppercase;
|
|
251
|
+
var codeTypes = {
|
|
252
|
+
asp: 'ASP.NET',
|
|
253
|
+
aspx: 'ASP.NET',
|
|
254
|
+
bash: 'Bash',
|
|
255
|
+
c: 'C',
|
|
256
|
+
'c#': 'C#',
|
|
257
|
+
'c++': 'C++',
|
|
258
|
+
coffeescript: 'CoffeeScript',
|
|
259
|
+
clj: 'Clojure',
|
|
260
|
+
cljc: 'Clojure',
|
|
261
|
+
cljx: 'Clojure',
|
|
262
|
+
clojure: 'Clojure',
|
|
263
|
+
cplusplus: 'C++',
|
|
264
|
+
cpp: 'C++',
|
|
265
|
+
cql: 'Cassandra',
|
|
266
|
+
cs: 'C#',
|
|
267
|
+
csharp: 'C#',
|
|
268
|
+
css: 'CSS',
|
|
269
|
+
curl: 'cURL',
|
|
270
|
+
d: 'D',
|
|
271
|
+
dart: 'Dart',
|
|
272
|
+
diff: 'Diff',
|
|
273
|
+
dockerfile: 'Dockerfile',
|
|
274
|
+
ecmascript: 'ECMAScript',
|
|
275
|
+
erl: 'Erlang',
|
|
276
|
+
erlang: 'Erlang',
|
|
277
|
+
go: 'Go',
|
|
278
|
+
gql: 'GraphQL',
|
|
279
|
+
gradle: 'Gradle',
|
|
280
|
+
graphql: 'GraphQL',
|
|
281
|
+
groovy: 'Groovy',
|
|
282
|
+
handlebars: 'Handlebars',
|
|
283
|
+
hbs: 'Handlebars',
|
|
284
|
+
haml: 'HAML',
|
|
285
|
+
haxe: 'Haxe',
|
|
286
|
+
html: 'HTML',
|
|
287
|
+
http: 'HTTP',
|
|
288
|
+
java: 'Java',
|
|
289
|
+
javascript: 'JavaScript',
|
|
290
|
+
jinja2: 'Jinja2',
|
|
291
|
+
jl: 'Julia',
|
|
292
|
+
jruby: 'JRuby',
|
|
293
|
+
js: 'JavaScript',
|
|
294
|
+
json: 'JSON',
|
|
295
|
+
jsx: 'JSX',
|
|
296
|
+
julia: 'Julia',
|
|
297
|
+
kotlin: 'Kotlin',
|
|
298
|
+
kt: 'Kotlin',
|
|
299
|
+
less: 'LESS',
|
|
300
|
+
liquid: 'Liquid',
|
|
301
|
+
lua: 'Lua',
|
|
302
|
+
macruby: 'MacRuby',
|
|
303
|
+
markdown: 'Markdown',
|
|
304
|
+
md: 'Markdown',
|
|
305
|
+
mermaid: 'Mermaid',
|
|
306
|
+
// syntax highlighting not supported yet
|
|
307
|
+
ml: 'OCaml',
|
|
308
|
+
mssql: 'SQL Server',
|
|
309
|
+
mysql: 'MySQL',
|
|
310
|
+
node: 'Node',
|
|
311
|
+
objc: 'Objective-C',
|
|
312
|
+
'objc++': 'Objective-C++',
|
|
313
|
+
objcpp: 'Objective-C++',
|
|
314
|
+
objectivec: 'Objective-C',
|
|
315
|
+
objectivecpp: 'Objective-C++',
|
|
316
|
+
objectivecplusplus: 'Objective-C++',
|
|
317
|
+
ocaml: 'OCaml',
|
|
318
|
+
perl: 'Perl',
|
|
319
|
+
php: 'PHP',
|
|
320
|
+
pl: 'Perl',
|
|
321
|
+
pgsql: 'PL/pgSQL',
|
|
322
|
+
plsql: 'PL/SQL',
|
|
323
|
+
postgres: 'PostgreSQL',
|
|
324
|
+
postgresql: 'PostgreSQL',
|
|
325
|
+
powershell: 'PowerShell',
|
|
326
|
+
ps1: 'PowerShell',
|
|
327
|
+
python: 'Python',
|
|
328
|
+
py: 'Python',
|
|
329
|
+
r: 'R',
|
|
330
|
+
rake: 'Rake',
|
|
331
|
+
rb: 'Ruby',
|
|
332
|
+
rbx: 'Rubinius',
|
|
333
|
+
rs: 'Rust',
|
|
334
|
+
ruby: 'Ruby',
|
|
335
|
+
rust: 'Rust',
|
|
336
|
+
sass: 'Sass',
|
|
337
|
+
scala: 'Scala',
|
|
338
|
+
scss: 'SCSS',
|
|
339
|
+
sh: 'Shell',
|
|
340
|
+
shell: 'Shell',
|
|
341
|
+
smarty: 'Smarty',
|
|
342
|
+
solidity: 'Solidity',
|
|
343
|
+
sql: 'SQL',
|
|
344
|
+
sqlite: 'SQLite',
|
|
345
|
+
stylus: 'Stylus',
|
|
346
|
+
styl: 'Stylus',
|
|
347
|
+
swift: 'Swift',
|
|
348
|
+
text: 'Text',
|
|
349
|
+
toml: 'TOML',
|
|
350
|
+
twig: 'Twig',
|
|
351
|
+
typescript: 'TypeScript',
|
|
352
|
+
xhtml: 'XHTML',
|
|
353
|
+
xml: 'XML',
|
|
354
|
+
yaml: 'YAML',
|
|
355
|
+
yml: 'YAML',
|
|
356
|
+
zsh: 'Zsh'
|
|
357
|
+
};
|
|
358
|
+
function uppercase(language) {
|
|
359
|
+
if (language in codeTypes) return codeTypes[language];
|
|
360
|
+
return language;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
/***/ })
|
|
364
|
+
|
|
365
|
+
/******/ });
|
|
366
|
+
/************************************************************************/
|
|
367
|
+
/******/ // The module cache
|
|
368
|
+
/******/ var __webpack_module_cache__ = {};
|
|
369
|
+
/******/
|
|
370
|
+
/******/ // The require function
|
|
371
|
+
/******/ function __nested_webpack_require_9448__(moduleId) {
|
|
372
|
+
/******/ // Check if module is in cache
|
|
373
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
374
|
+
/******/ if (cachedModule !== undefined) {
|
|
375
|
+
/******/ return cachedModule.exports;
|
|
376
|
+
/******/ }
|
|
377
|
+
/******/ // Create a new module (and put it into the cache)
|
|
378
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
379
|
+
/******/ // no module.id needed
|
|
380
|
+
/******/ // no module.loaded needed
|
|
381
|
+
/******/ exports: {}
|
|
382
|
+
/******/ };
|
|
383
|
+
/******/
|
|
384
|
+
/******/ // Execute the module function
|
|
385
|
+
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __nested_webpack_require_9448__);
|
|
386
|
+
/******/
|
|
387
|
+
/******/ // Return the exports of the module
|
|
388
|
+
/******/ return module.exports;
|
|
389
|
+
/******/ }
|
|
390
|
+
/******/
|
|
391
|
+
/************************************************************************/
|
|
392
|
+
/******/
|
|
393
|
+
/******/ // startup
|
|
394
|
+
/******/ // Load entry module and return exports
|
|
395
|
+
/******/ // This entry module is referenced by other modules so it can't be inlined
|
|
396
|
+
/******/ var __nested_webpack_exports__ = __nested_webpack_require_9448__(638);
|
|
397
|
+
/******/ module.exports = __nested_webpack_exports__;
|
|
398
|
+
/******/
|
|
399
|
+
/******/ })()
|
|
400
|
+
;
|
|
401
|
+
|
|
402
|
+
/***/ })
|
|
403
|
+
|
|
404
|
+
};
|
|
405
|
+
;
|
|
406
|
+
//# sourceMappingURL=368.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"368.node.js","mappings":";;;;;;;AAAA,kBAAkB;AAClB;AACA;;AAEA;AACA;;;;AAIA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO;;AAEP;AACA;;;;AAIA,gCAAgC;AAChC,8BAA8B;AAC9B,6CAA6C,SAAS,0DAA0D,UAAU,gCAAgC;AAC1J,mCAAmC,+CAA+C,8BAA8B,OAAO,kBAAkB;AACzI,uCAAuC,kGAAkG,iBAAiB,wCAAwC,MAAM,yCAAyC,6BAA6B,UAAU,YAAY,kEAAkE,WAAW,YAAY,iBAAiB,UAAU,MAAM,2EAA2E,UAAU,oBAAoB;AACvgB,8BAA8B;AAC9B;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO;;AAEP;AACA,kDAAkD,+BAAmB;;;;AAIrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA,kCAAkC,+BAAmB;AACrD;AACA,cAAc,+BAAmB;AACjC;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,kCAAkC,+BAAmB;AACrD;;AAEA,OAAO;;AAEP;AACA;;;;AAIA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO;;AAEP,WAAW;AACX;AACA;AACA;AACA;AACA;AACA,mBAAmB,+BAAmB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sFAAsF,+BAAmB;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,0BAAmB,GAAG,+BAAmB;AACvD,2BAA2B,0BAAmB;AAC9C;AACA,UAAU;AACV","sources":["webpack://@readme/markdown/./node_modules/@readme/syntax-highlighter/dist/index.node.js"],"sourcesContent":["/******/ (() => { // webpackBootstrap\n/******/ \t\"use strict\";\n/******/ \tvar __webpack_modules__ = ({\n\n/***/ 42:\n/***/ ((__unused_webpack_module, exports) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nvar modeAliases = {\n aspx: 'asp',\n bash: 'shell',\n 'c++': 'cplusplus',\n 'c#': 'csharp',\n clj: 'clojure',\n cljc: 'clojure',\n cljx: 'clojure',\n coffeescript: 'javascript',\n cpp: 'cplusplus',\n cql: 'sql',\n cs: 'csharp',\n docker: 'dockerfile',\n ecmascript: 'javascript',\n erl: 'erlang',\n gql: 'graphql',\n gradle: 'groovy',\n handlebars: 'html',\n hbs: 'html',\n jl: 'julia',\n jruby: 'ruby',\n js: 'javascript',\n kt: 'kotlin',\n less: 'css',\n macruby: 'ruby',\n md: 'markdown',\n ml: 'ocaml',\n mssql: 'sql',\n mysql: 'sql',\n node: 'javascript',\n 'obj-c': 'objectivec',\n 'obj-c++': 'objectivecplusplus',\n 'objc++': 'objectivecplusplus',\n objc: 'objectivec',\n objcpp: 'objectivecplusplus',\n objectivecpp: 'objectivecplusplus',\n pgsql: 'sql',\n pl: 'perl',\n plsql: 'sql',\n postgres: 'sql',\n postgresql: 'sql',\n ps1: 'powershell',\n py: 'python',\n rake: 'ruby',\n rb: 'ruby',\n rbx: 'ruby',\n rs: 'rust',\n sass: 'css',\n scss: 'css',\n sh: 'shell',\n solidity: 'sol',\n sqlite: 'sql',\n styl: 'css',\n stylus: 'css',\n xhtml: 'html',\n yml: 'yaml',\n zsh: 'shell'\n};\nvar canonical = function canonical(language) {\n if (language in modeAliases) return modeAliases[language];\n return language;\n};\nexports[\"default\"] = canonical;\n\n/***/ }),\n\n/***/ 476:\n/***/ ((__unused_webpack_module, exports) => {\n\n\n\nfunction _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }\nfunction _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.\"); }\nfunction _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; } }\nfunction _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; }\nfunction _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; } }\nfunction _arrayWithHoles(r) { if (Array.isArray(r)) return r; }\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.modes = void 0;\nexports.getMode = getMode;\n// This is a mapping of languages that we support, but aren't directly loading the mode extension\n// Within `/src/codeMirror/index.jsx` and /src/codeEditor.index.jsx\n//\n// This list also includes a number of language aliases, as because of the way we're using\n// `CodeMirror.runMode` we can't take advantage of its known aliases in the mode extensions that\n// we're loading.\n//\n// There are 2 types of lookup, single and array. e.g. `html` needs to be rendered using\n// `htmlmixed`, but `java`, needs to be rendered using the `clike` mode.\n//\nexports.modes = {\n asp: 'clike',\n aspx: 'clike',\n bash: 'shell',\n c: 'clike',\n 'c#': ['clike', 'text/x-csharp'],\n 'c++': ['clike', 'text/x-c++src'],\n clj: 'clojure',\n cljc: 'clojure',\n cljx: 'clojure',\n coffeescript: 'javascript',\n cplusplus: ['clike', 'text/x-c++src'],\n cpp: ['clike', 'text/x-c++src'],\n cql: ['sql', 'text/x-cassandra'],\n cs: ['clike', 'text/x-csharp'],\n csharp: ['clike', 'text/x-csharp'],\n curl: 'shell',\n d: 'd',\n diff: 'diff',\n ecmascript: 'javascript',\n erl: 'erlang',\n go: ['go', 'text/x-go'],\n gradle: 'groovy',\n gql: 'graphql',\n handlebars: 'htmlmixed',\n hbs: 'htmlmixed',\n html: 'htmlmixed',\n java: ['clike', 'text/x-java'],\n jl: 'julia',\n js: 'javascript',\n jsx: 'jsx',\n json: ['javascript', 'application/ld+json'],\n jruby: 'ruby',\n kotlin: ['clike', 'text/x-kotlin'],\n kt: ['clike', 'text/x-kotlin'],\n less: 'css',\n liquid: 'htmlmixed',\n lua: 'lua',\n node: 'javascript',\n macruby: 'ruby',\n markdown: 'gfm',\n ml: ['mllike', 'text/x-ocaml'],\n mssql: ['sql', 'text/x-mssql'],\n mysql: ['sql', 'text/x-mysql'],\n objc: ['clike', 'text/x-objectivec'],\n 'objc++': ['clike', 'text/x-objectivec++'],\n objcpp: ['clike', 'text/x-objectivec++'],\n objectivec: ['clike', 'text/x-objectivec'],\n objectivecpp: ['clike', 'text/x-objectivec++'],\n objectivecplusplus: ['clike', 'text/x-objectivec++'],\n ocaml: ['mllike', 'text/x-ocaml'],\n php: ['php', 'text/x-php'],\n pgsql: ['sql', 'text/x-pgsql'],\n pl: 'perl',\n plsql: ['sql', 'text/x-plsql'],\n postgres: ['sql', 'text/x-pgsql'],\n postgresql: ['sql', 'text/x-pgsql'],\n ps1: 'powershell',\n py: 'python',\n r: 'r',\n rake: 'ruby',\n rb: 'ruby',\n rbx: 'ruby',\n rs: 'rust',\n sass: 'css',\n scala: ['clike', 'text/x-scala'],\n scss: 'css',\n sh: 'shell',\n sol: 'solidity',\n solidity: 'solidity',\n sql: ['sql', 'text/x-sql'],\n sqlite: ['sql', 'text/x-sqlite'],\n styl: 'css',\n stylus: 'css',\n text: ['null', 'text/plain'],\n ts: ['javascript', 'text/typescript'],\n typescript: ['javascript', 'text/typescript'],\n xhtml: 'htmlmixed',\n yml: 'yaml',\n zsh: 'shell'\n};\nfunction getMode(lang) {\n var mode = lang;\n if (mode in exports.modes) {\n mode = exports.modes[mode];\n if (Array.isArray(mode)) {\n var _mode = mode;\n var _mode2 = _slicedToArray(_mode, 2);\n mode = _mode2[1];\n }\n }\n return mode;\n}\n\n/***/ }),\n\n/***/ 638:\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\n\nvar __importDefault = this && this.__importDefault || function (mod) {\n return mod && mod.__esModule ? mod : {\n \"default\": mod\n };\n};\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.getMode = exports.modes = exports.canonical = exports.uppercase = void 0;\nvar canonical_1 = __importDefault(__webpack_require__(42));\nexports.canonical = canonical_1.default;\nvar modes_1 = __webpack_require__(476);\nObject.defineProperty(exports, \"modes\", ({\n enumerable: true,\n get: function get() {\n return modes_1.modes;\n }\n}));\nObject.defineProperty(exports, \"getMode\", ({\n enumerable: true,\n get: function get() {\n return modes_1.getMode;\n }\n}));\nvar uppercase_1 = __importDefault(__webpack_require__(704));\nexports.uppercase = uppercase_1.default;\n\n/***/ }),\n\n/***/ 704:\n/***/ ((__unused_webpack_module, exports) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = uppercase;\nvar codeTypes = {\n asp: 'ASP.NET',\n aspx: 'ASP.NET',\n bash: 'Bash',\n c: 'C',\n 'c#': 'C#',\n 'c++': 'C++',\n coffeescript: 'CoffeeScript',\n clj: 'Clojure',\n cljc: 'Clojure',\n cljx: 'Clojure',\n clojure: 'Clojure',\n cplusplus: 'C++',\n cpp: 'C++',\n cql: 'Cassandra',\n cs: 'C#',\n csharp: 'C#',\n css: 'CSS',\n curl: 'cURL',\n d: 'D',\n dart: 'Dart',\n diff: 'Diff',\n dockerfile: 'Dockerfile',\n ecmascript: 'ECMAScript',\n erl: 'Erlang',\n erlang: 'Erlang',\n go: 'Go',\n gql: 'GraphQL',\n gradle: 'Gradle',\n graphql: 'GraphQL',\n groovy: 'Groovy',\n handlebars: 'Handlebars',\n hbs: 'Handlebars',\n haml: 'HAML',\n haxe: 'Haxe',\n html: 'HTML',\n http: 'HTTP',\n java: 'Java',\n javascript: 'JavaScript',\n jinja2: 'Jinja2',\n jl: 'Julia',\n jruby: 'JRuby',\n js: 'JavaScript',\n json: 'JSON',\n jsx: 'JSX',\n julia: 'Julia',\n kotlin: 'Kotlin',\n kt: 'Kotlin',\n less: 'LESS',\n liquid: 'Liquid',\n lua: 'Lua',\n macruby: 'MacRuby',\n markdown: 'Markdown',\n md: 'Markdown',\n mermaid: 'Mermaid',\n // syntax highlighting not supported yet\n ml: 'OCaml',\n mssql: 'SQL Server',\n mysql: 'MySQL',\n node: 'Node',\n objc: 'Objective-C',\n 'objc++': 'Objective-C++',\n objcpp: 'Objective-C++',\n objectivec: 'Objective-C',\n objectivecpp: 'Objective-C++',\n objectivecplusplus: 'Objective-C++',\n ocaml: 'OCaml',\n perl: 'Perl',\n php: 'PHP',\n pl: 'Perl',\n pgsql: 'PL/pgSQL',\n plsql: 'PL/SQL',\n postgres: 'PostgreSQL',\n postgresql: 'PostgreSQL',\n powershell: 'PowerShell',\n ps1: 'PowerShell',\n python: 'Python',\n py: 'Python',\n r: 'R',\n rake: 'Rake',\n rb: 'Ruby',\n rbx: 'Rubinius',\n rs: 'Rust',\n ruby: 'Ruby',\n rust: 'Rust',\n sass: 'Sass',\n scala: 'Scala',\n scss: 'SCSS',\n sh: 'Shell',\n shell: 'Shell',\n smarty: 'Smarty',\n solidity: 'Solidity',\n sql: 'SQL',\n sqlite: 'SQLite',\n stylus: 'Stylus',\n styl: 'Stylus',\n swift: 'Swift',\n text: 'Text',\n toml: 'TOML',\n twig: 'Twig',\n typescript: 'TypeScript',\n xhtml: 'XHTML',\n xml: 'XML',\n yaml: 'YAML',\n yml: 'YAML',\n zsh: 'Zsh'\n};\nfunction uppercase(language) {\n if (language in codeTypes) return codeTypes[language];\n return language;\n}\n\n/***/ })\n\n/******/ \t});\n/************************************************************************/\n/******/ \t// The module cache\n/******/ \tvar __webpack_module_cache__ = {};\n/******/ \t\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/ \t\t// Check if module is in cache\n/******/ \t\tvar cachedModule = __webpack_module_cache__[moduleId];\n/******/ \t\tif (cachedModule !== undefined) {\n/******/ \t\t\treturn cachedModule.exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = __webpack_module_cache__[moduleId] = {\n/******/ \t\t\t// no module.id needed\n/******/ \t\t\t// no module.loaded needed\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/ \t\n/******/ \t\t// Execute the module function\n/******/ \t\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/ \t\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/ \t\n/************************************************************************/\n/******/ \t\n/******/ \t// startup\n/******/ \t// Load entry module and return exports\n/******/ \t// This entry module is referenced by other modules so it can't be inlined\n/******/ \tvar __webpack_exports__ = __webpack_require__(638);\n/******/ \tmodule.exports = __webpack_exports__;\n/******/ \t\n/******/ })()\n;"],"names":[],"sourceRoot":""}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
interface BlockHit {
|
|
2
|
+
raw: string;
|
|
3
|
+
token: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Extract legacy magic block syntax from a markdown string.
|
|
7
|
+
* Returns the modified markdown and an array of extracted blocks.
|
|
8
|
+
*/
|
|
9
|
+
export declare function extractMagicBlocks(markdown: string): {
|
|
10
|
+
replaced: string;
|
|
11
|
+
blocks: BlockHit[];
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Restore extracted magic blocks back into a markdown string.
|
|
15
|
+
*/
|
|
16
|
+
export declare function restoreMagicBlocks(replaced: string, blocks: BlockHit[]): string;
|
|
17
|
+
export {};
|