@readme/markdown 6.63.0 → 6.64.0
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/CodeTabs/style.scss +3 -1
- package/dist/main.css +1 -1
- package/dist/main.js +873 -1321
- package/dist/main.node.js +870 -1301
- package/package.json +5 -5
package/dist/main.js
CHANGED
|
@@ -115,7 +115,7 @@ var h = __webpack_require__(1742);
|
|
|
115
115
|
var find = __webpack_require__(9560);
|
|
116
116
|
var html = __webpack_require__(7247);
|
|
117
117
|
var svg = __webpack_require__(1218);
|
|
118
|
-
var vfileLocation = __webpack_require__(
|
|
118
|
+
var vfileLocation = __webpack_require__(4787);
|
|
119
119
|
var ns = __webpack_require__(6);
|
|
120
120
|
module.exports = wrapper;
|
|
121
121
|
var own = {}.hasOwnProperty;
|
|
@@ -312,59 +312,6 @@ function point(point) {
|
|
|
312
312
|
|
|
313
313
|
/***/ }),
|
|
314
314
|
|
|
315
|
-
/***/ 6976:
|
|
316
|
-
/***/ ((module) => {
|
|
317
|
-
|
|
318
|
-
"use strict";
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
module.exports = factory;
|
|
322
|
-
function factory(file) {
|
|
323
|
-
var value = String(file);
|
|
324
|
-
var indices = [];
|
|
325
|
-
var search = /\r?\n|\r/g;
|
|
326
|
-
while (search.exec(value)) {
|
|
327
|
-
indices.push(search.lastIndex);
|
|
328
|
-
}
|
|
329
|
-
indices.push(value.length + 1);
|
|
330
|
-
return {
|
|
331
|
-
toPoint: offsetToPoint,
|
|
332
|
-
toPosition: offsetToPoint,
|
|
333
|
-
toOffset: pointToOffset
|
|
334
|
-
};
|
|
335
|
-
|
|
336
|
-
// Get the line and column-based `point` for `offset` in the bound indices.
|
|
337
|
-
function offsetToPoint(offset) {
|
|
338
|
-
var index = -1;
|
|
339
|
-
if (offset > -1 && offset < indices[indices.length - 1]) {
|
|
340
|
-
while (++index < indices.length) {
|
|
341
|
-
if (indices[index] > offset) {
|
|
342
|
-
return {
|
|
343
|
-
line: index + 1,
|
|
344
|
-
column: offset - (indices[index - 1] || 0) + 1,
|
|
345
|
-
offset: offset
|
|
346
|
-
};
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
return {};
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
// Get the `offset` for a line and column-based `point` in the bound
|
|
354
|
-
// indices.
|
|
355
|
-
function pointToOffset(point) {
|
|
356
|
-
var line = point && point.line;
|
|
357
|
-
var column = point && point.column;
|
|
358
|
-
var offset;
|
|
359
|
-
if (!isNaN(line) && !isNaN(column) && line - 1 in indices) {
|
|
360
|
-
offset = (indices[line - 2] || 0) + column - 1 || 0;
|
|
361
|
-
}
|
|
362
|
-
return offset > -1 && offset < indices[indices.length - 1] ? offset : -1;
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
/***/ }),
|
|
367
|
-
|
|
368
315
|
/***/ 8335:
|
|
369
316
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
370
317
|
|
|
@@ -8643,7 +8590,10 @@ module.exports = function CodeTabsCompiler() {
|
|
|
8643
8590
|
var Compiler = this.Compiler;
|
|
8644
8591
|
var visitors = Compiler.prototype.visitors;
|
|
8645
8592
|
function compile(node) {
|
|
8646
|
-
|
|
8593
|
+
var fence = '```';
|
|
8594
|
+
return node.children.map(function (code) {
|
|
8595
|
+
return "".concat(fence).concat(code.lang || '').concat(code.meta ? " ".concat(code.meta) : '', "\n").concat(code.value ? "".concat(code.value, "\n") : '').concat(fence);
|
|
8596
|
+
}).join('\n');
|
|
8647
8597
|
}
|
|
8648
8598
|
visitors['code-tabs'] = compile;
|
|
8649
8599
|
};
|
|
@@ -9001,8 +8951,6 @@ function tokenizer(eat, value) {
|
|
|
9001
8951
|
hash = _rgx$exec2[1],
|
|
9002
8952
|
text = _rgx$exec2[2];
|
|
9003
8953
|
var now = eat.now();
|
|
9004
|
-
now.column += match.length;
|
|
9005
|
-
now.offset += match.length;
|
|
9006
8954
|
return eat(match)({
|
|
9007
8955
|
type: 'heading',
|
|
9008
8956
|
depth: hash.length,
|
|
@@ -9320,8 +9268,8 @@ function parser() {
|
|
|
9320
9268
|
var Parser = this.Parser;
|
|
9321
9269
|
var tokenizers = Parser.prototype.blockTokenizers;
|
|
9322
9270
|
var methods = Parser.prototype.blockMethods;
|
|
9323
|
-
tokenizers.
|
|
9324
|
-
methods.splice(methods.indexOf('
|
|
9271
|
+
tokenizers.codeTabs = tokenizer;
|
|
9272
|
+
methods.splice(methods.indexOf('indentedCode') - 1, 0, 'codeTabs');
|
|
9325
9273
|
}
|
|
9326
9274
|
module.exports = parser;
|
|
9327
9275
|
module.exports.sanitize = function (sanitizeSchema) {
|
|
@@ -11879,60 +11827,6 @@ exports.doubleQuotesEscapeChars = {
|
|
|
11879
11827
|
};
|
|
11880
11828
|
|
|
11881
11829
|
|
|
11882
|
-
/***/ }),
|
|
11883
|
-
|
|
11884
|
-
/***/ 3128:
|
|
11885
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
11886
|
-
|
|
11887
|
-
"use strict";
|
|
11888
|
-
|
|
11889
|
-
|
|
11890
|
-
module.exports = detab
|
|
11891
|
-
|
|
11892
|
-
var repeat = __webpack_require__(6464)
|
|
11893
|
-
|
|
11894
|
-
var tab = 0x09
|
|
11895
|
-
var lineFeed = 0x0a
|
|
11896
|
-
var carriageReturn = 0x0d
|
|
11897
|
-
|
|
11898
|
-
// Replace tabs with spaces, being smart about which column the tab is at and
|
|
11899
|
-
// which size should be used.
|
|
11900
|
-
function detab(value, size) {
|
|
11901
|
-
var string = typeof value === 'string'
|
|
11902
|
-
var length = string && value.length
|
|
11903
|
-
var start = 0
|
|
11904
|
-
var index = -1
|
|
11905
|
-
var column = -1
|
|
11906
|
-
var tabSize = size || 4
|
|
11907
|
-
var results = []
|
|
11908
|
-
var code
|
|
11909
|
-
var add
|
|
11910
|
-
|
|
11911
|
-
if (!string) {
|
|
11912
|
-
throw new Error('detab expected string')
|
|
11913
|
-
}
|
|
11914
|
-
|
|
11915
|
-
while (++index < length) {
|
|
11916
|
-
code = value.charCodeAt(index)
|
|
11917
|
-
|
|
11918
|
-
if (code === tab) {
|
|
11919
|
-
add = tabSize - ((column + 1) % tabSize)
|
|
11920
|
-
column += add
|
|
11921
|
-
results.push(value.slice(start, index) + repeat(' ', add))
|
|
11922
|
-
start = index + 1
|
|
11923
|
-
} else if (code === lineFeed || code === carriageReturn) {
|
|
11924
|
-
column = -1
|
|
11925
|
-
} else {
|
|
11926
|
-
column++
|
|
11927
|
-
}
|
|
11928
|
-
}
|
|
11929
|
-
|
|
11930
|
-
results.push(value.slice(start))
|
|
11931
|
-
|
|
11932
|
-
return results.join('')
|
|
11933
|
-
}
|
|
11934
|
-
|
|
11935
|
-
|
|
11936
11830
|
/***/ }),
|
|
11937
11831
|
|
|
11938
11832
|
/***/ 4470:
|
|
@@ -16415,27 +16309,23 @@ function getDefinitionFactory(node, options) {
|
|
|
16415
16309
|
}
|
|
16416
16310
|
|
|
16417
16311
|
// Gather all definitions in `node`
|
|
16418
|
-
function gather(node
|
|
16312
|
+
function gather(node) {
|
|
16419
16313
|
var cache = {}
|
|
16420
16314
|
|
|
16421
16315
|
if (!node || !node.type) {
|
|
16422
16316
|
throw new Error('mdast-util-definitions expected node')
|
|
16423
16317
|
}
|
|
16424
16318
|
|
|
16425
|
-
visit(node, 'definition',
|
|
16319
|
+
visit(node, 'definition', ondefinition)
|
|
16426
16320
|
|
|
16427
16321
|
return cache
|
|
16428
16322
|
|
|
16429
|
-
function
|
|
16323
|
+
function ondefinition(definition) {
|
|
16430
16324
|
var id = normalise(definition.identifier)
|
|
16431
16325
|
if (!own.call(cache, id)) {
|
|
16432
16326
|
cache[id] = definition
|
|
16433
16327
|
}
|
|
16434
16328
|
}
|
|
16435
|
-
|
|
16436
|
-
function normal(definition) {
|
|
16437
|
-
cache[normalise(definition.identifier)] = definition
|
|
16438
|
-
}
|
|
16439
16329
|
}
|
|
16440
16330
|
|
|
16441
16331
|
// Factory to get a node from the given definition-cache.
|
|
@@ -16862,19 +16752,27 @@ function hardBreak(h, node) {
|
|
|
16862
16752
|
|
|
16863
16753
|
module.exports = code
|
|
16864
16754
|
|
|
16865
|
-
var detab = __webpack_require__(3128)
|
|
16866
16755
|
var u = __webpack_require__(914)
|
|
16867
16756
|
|
|
16868
16757
|
function code(h, node) {
|
|
16869
|
-
var value = node.value ?
|
|
16758
|
+
var value = node.value ? node.value + '\n' : ''
|
|
16759
|
+
// To do: next major, use `node.lang` w/o regex, the splitting’s been going
|
|
16760
|
+
// on for years in remark now.
|
|
16870
16761
|
var lang = node.lang && node.lang.match(/^[^ \t]+(?=[ \t]|$)/)
|
|
16871
16762
|
var props = {}
|
|
16763
|
+
var code
|
|
16872
16764
|
|
|
16873
16765
|
if (lang) {
|
|
16874
16766
|
props.className = ['language-' + lang]
|
|
16875
16767
|
}
|
|
16876
16768
|
|
|
16877
|
-
|
|
16769
|
+
code = h(node, 'code', props, [u('text', value)])
|
|
16770
|
+
|
|
16771
|
+
if (node.meta) {
|
|
16772
|
+
code.data = {meta: node.meta}
|
|
16773
|
+
}
|
|
16774
|
+
|
|
16775
|
+
return h(node.position, 'pre', [code])
|
|
16878
16776
|
}
|
|
16879
16777
|
|
|
16880
16778
|
|
|
@@ -17124,11 +17022,11 @@ function ignore() {
|
|
|
17124
17022
|
|
|
17125
17023
|
module.exports = inlineCode
|
|
17126
17024
|
|
|
17127
|
-
var collapse = __webpack_require__(9357)
|
|
17128
17025
|
var u = __webpack_require__(914)
|
|
17129
17026
|
|
|
17130
17027
|
function inlineCode(h, node) {
|
|
17131
|
-
|
|
17028
|
+
var value = node.value.replace(/\r?\n|\r/g, ' ')
|
|
17029
|
+
return h(node, 'code', [u('text', value)])
|
|
17132
17030
|
}
|
|
17133
17031
|
|
|
17134
17032
|
|
|
@@ -17199,52 +17097,29 @@ function link(h, node) {
|
|
|
17199
17097
|
module.exports = listItem
|
|
17200
17098
|
|
|
17201
17099
|
var u = __webpack_require__(914)
|
|
17202
|
-
var wrap = __webpack_require__(2931)
|
|
17203
17100
|
var all = __webpack_require__(5426)
|
|
17204
17101
|
|
|
17205
17102
|
function listItem(h, node, parent) {
|
|
17206
|
-
var
|
|
17207
|
-
var head =
|
|
17208
|
-
var raw = all(h, node)
|
|
17103
|
+
var result = all(h, node)
|
|
17104
|
+
var head = result[0]
|
|
17209
17105
|
var loose = parent ? listLoose(parent) : listItemLoose(node)
|
|
17210
17106
|
var props = {}
|
|
17211
|
-
var
|
|
17212
|
-
var container
|
|
17213
|
-
var index
|
|
17107
|
+
var wrapped = []
|
|
17214
17108
|
var length
|
|
17109
|
+
var index
|
|
17215
17110
|
var child
|
|
17216
17111
|
|
|
17217
|
-
// Tight lists should not render `paragraph` nodes as `p` elements.
|
|
17218
|
-
if (loose) {
|
|
17219
|
-
result = raw
|
|
17220
|
-
} else {
|
|
17221
|
-
result = []
|
|
17222
|
-
length = raw.length
|
|
17223
|
-
index = -1
|
|
17224
|
-
|
|
17225
|
-
while (++index < length) {
|
|
17226
|
-
child = raw[index]
|
|
17227
|
-
|
|
17228
|
-
if (child.tagName === 'p') {
|
|
17229
|
-
result = result.concat(child.children)
|
|
17230
|
-
} else {
|
|
17231
|
-
result.push(child)
|
|
17232
|
-
}
|
|
17233
|
-
}
|
|
17234
|
-
}
|
|
17235
|
-
|
|
17236
17112
|
if (typeof node.checked === 'boolean') {
|
|
17237
|
-
if (
|
|
17238
|
-
|
|
17113
|
+
if (!head || head.tagName !== 'p') {
|
|
17114
|
+
head = h(null, 'p', [])
|
|
17115
|
+
result.unshift(head)
|
|
17239
17116
|
}
|
|
17240
17117
|
|
|
17241
|
-
|
|
17242
|
-
|
|
17243
|
-
if (container.length !== 0) {
|
|
17244
|
-
container.unshift(u('text', ' '))
|
|
17118
|
+
if (head.children.length > 0) {
|
|
17119
|
+
head.children.unshift(u('text', ' '))
|
|
17245
17120
|
}
|
|
17246
17121
|
|
|
17247
|
-
|
|
17122
|
+
head.children.unshift(
|
|
17248
17123
|
h(null, 'input', {
|
|
17249
17124
|
type: 'checkbox',
|
|
17250
17125
|
checked: node.checked,
|
|
@@ -17257,11 +17132,30 @@ function listItem(h, node, parent) {
|
|
|
17257
17132
|
props.className = ['task-list-item']
|
|
17258
17133
|
}
|
|
17259
17134
|
|
|
17260
|
-
|
|
17261
|
-
|
|
17135
|
+
length = result.length
|
|
17136
|
+
index = -1
|
|
17137
|
+
|
|
17138
|
+
while (++index < length) {
|
|
17139
|
+
child = result[index]
|
|
17140
|
+
|
|
17141
|
+
// Add eols before nodes, except if this is a loose, first paragraph.
|
|
17142
|
+
if (loose || index !== 0 || child.tagName !== 'p') {
|
|
17143
|
+
wrapped.push(u('text', '\n'))
|
|
17144
|
+
}
|
|
17145
|
+
|
|
17146
|
+
if (child.tagName === 'p' && !loose) {
|
|
17147
|
+
wrapped = wrapped.concat(child.children)
|
|
17148
|
+
} else {
|
|
17149
|
+
wrapped.push(child)
|
|
17150
|
+
}
|
|
17151
|
+
}
|
|
17152
|
+
|
|
17153
|
+
// Add a final eol.
|
|
17154
|
+
if (length && (loose || child.tagName !== 'p')) {
|
|
17155
|
+
wrapped.push(u('text', '\n'))
|
|
17262
17156
|
}
|
|
17263
17157
|
|
|
17264
|
-
return h(node, 'li', props,
|
|
17158
|
+
return h(node, 'li', props, wrapped)
|
|
17265
17159
|
}
|
|
17266
17160
|
|
|
17267
17161
|
function listLoose(node) {
|
|
@@ -17398,7 +17292,7 @@ var all = __webpack_require__(5426)
|
|
|
17398
17292
|
function table(h, node) {
|
|
17399
17293
|
var rows = node.children
|
|
17400
17294
|
var index = rows.length
|
|
17401
|
-
var align = node.align
|
|
17295
|
+
var align = node.align || []
|
|
17402
17296
|
var alignLength = align.length
|
|
17403
17297
|
var result = []
|
|
17404
17298
|
var pos
|
|
@@ -17410,7 +17304,7 @@ function table(h, node) {
|
|
|
17410
17304
|
while (index--) {
|
|
17411
17305
|
row = rows[index].children
|
|
17412
17306
|
name = index === 0 ? 'th' : 'td'
|
|
17413
|
-
pos = alignLength
|
|
17307
|
+
pos = alignLength || row.length
|
|
17414
17308
|
out = []
|
|
17415
17309
|
|
|
17416
17310
|
while (pos--) {
|
|
@@ -17425,17 +17319,18 @@ function table(h, node) {
|
|
|
17425
17319
|
node,
|
|
17426
17320
|
'table',
|
|
17427
17321
|
wrap(
|
|
17428
|
-
[
|
|
17429
|
-
|
|
17430
|
-
|
|
17431
|
-
|
|
17432
|
-
|
|
17433
|
-
|
|
17434
|
-
|
|
17435
|
-
|
|
17436
|
-
|
|
17437
|
-
|
|
17438
|
-
|
|
17322
|
+
[h(result[0].position, 'thead', wrap([result[0]], true))].concat(
|
|
17323
|
+
result[1]
|
|
17324
|
+
? h(
|
|
17325
|
+
{
|
|
17326
|
+
start: position.start(result[1]),
|
|
17327
|
+
end: position.end(result[result.length - 1])
|
|
17328
|
+
},
|
|
17329
|
+
'tbody',
|
|
17330
|
+
wrap(result.slice(1), true)
|
|
17331
|
+
)
|
|
17332
|
+
: []
|
|
17333
|
+
),
|
|
17439
17334
|
true
|
|
17440
17335
|
)
|
|
17441
17336
|
)
|
|
@@ -17453,10 +17348,12 @@ function table(h, node) {
|
|
|
17453
17348
|
module.exports = text
|
|
17454
17349
|
|
|
17455
17350
|
var u = __webpack_require__(914)
|
|
17456
|
-
var trimLines = __webpack_require__(6221)
|
|
17457
17351
|
|
|
17458
17352
|
function text(h, node) {
|
|
17459
|
-
return h.augment(
|
|
17353
|
+
return h.augment(
|
|
17354
|
+
node,
|
|
17355
|
+
u('text', String(node.value).replace(/[ \t]*(\r?\n|\r)[ \t]*/g, '$1'))
|
|
17356
|
+
)
|
|
17460
17357
|
}
|
|
17461
17358
|
|
|
17462
17359
|
|
|
@@ -17514,12 +17411,13 @@ function factory(tree, options) {
|
|
|
17514
17411
|
var footnoteById = {}
|
|
17515
17412
|
|
|
17516
17413
|
h.dangerous = dangerous
|
|
17517
|
-
h.definition = definitions(tree
|
|
17414
|
+
h.definition = definitions(tree)
|
|
17518
17415
|
h.footnoteById = footnoteById
|
|
17519
17416
|
h.footnoteOrder = []
|
|
17520
17417
|
h.augment = augment
|
|
17521
17418
|
h.handlers = Object.assign({}, handlers, settings.handlers)
|
|
17522
17419
|
h.unknownHandler = settings.unknownHandler
|
|
17420
|
+
h.passThrough = settings.passThrough
|
|
17523
17421
|
|
|
17524
17422
|
visit(tree, 'footnoteDefinition', onfootnotedefinition)
|
|
17525
17423
|
|
|
@@ -17531,10 +17429,19 @@ function factory(tree, options) {
|
|
|
17531
17429
|
var ctx
|
|
17532
17430
|
|
|
17533
17431
|
// Handle `data.hName`, `data.hProperties, `data.hChildren`.
|
|
17534
|
-
if (left &&
|
|
17432
|
+
if (left && left.data) {
|
|
17535
17433
|
data = left.data
|
|
17536
17434
|
|
|
17537
|
-
if (
|
|
17435
|
+
if (data.hName) {
|
|
17436
|
+
if (right.type !== 'element') {
|
|
17437
|
+
right = {
|
|
17438
|
+
type: 'element',
|
|
17439
|
+
tagName: '',
|
|
17440
|
+
properties: {},
|
|
17441
|
+
children: []
|
|
17442
|
+
}
|
|
17443
|
+
}
|
|
17444
|
+
|
|
17538
17445
|
right.tagName = data.hName
|
|
17539
17446
|
}
|
|
17540
17447
|
|
|
@@ -17582,7 +17489,7 @@ function factory(tree, options) {
|
|
|
17582
17489
|
var id = String(definition.identifier).toUpperCase()
|
|
17583
17490
|
|
|
17584
17491
|
// Mimick CM behavior of link definitions.
|
|
17585
|
-
// See: <https://github.com/syntax-tree/mdast-util-definitions/blob/
|
|
17492
|
+
// See: <https://github.com/syntax-tree/mdast-util-definitions/blob/8290999/index.js#L26>.
|
|
17586
17493
|
if (!own.call(footnoteById, id)) {
|
|
17587
17494
|
footnoteById[id] = definition
|
|
17588
17495
|
}
|
|
@@ -17630,13 +17537,21 @@ function unknown(h, node) {
|
|
|
17630
17537
|
// Visit a node.
|
|
17631
17538
|
function one(h, node, parent) {
|
|
17632
17539
|
var type = node && node.type
|
|
17633
|
-
var fn
|
|
17540
|
+
var fn
|
|
17634
17541
|
|
|
17635
17542
|
// Fail on non-nodes.
|
|
17636
17543
|
if (!type) {
|
|
17637
17544
|
throw new Error('Expected node, got `' + node + '`')
|
|
17638
17545
|
}
|
|
17639
17546
|
|
|
17547
|
+
if (own.call(h.handlers, type)) {
|
|
17548
|
+
fn = h.handlers[type]
|
|
17549
|
+
} else if (h.passThrough && h.passThrough.indexOf(type) > -1) {
|
|
17550
|
+
fn = returnNode
|
|
17551
|
+
} else {
|
|
17552
|
+
fn = h.unknownHandler
|
|
17553
|
+
}
|
|
17554
|
+
|
|
17640
17555
|
return (typeof fn === 'function' ? fn : unknown)(h, node, parent)
|
|
17641
17556
|
}
|
|
17642
17557
|
|
|
@@ -17655,6 +17570,18 @@ function text(node) {
|
|
|
17655
17570
|
return 'value' in node
|
|
17656
17571
|
}
|
|
17657
17572
|
|
|
17573
|
+
function returnNode(h, node) {
|
|
17574
|
+
var clone
|
|
17575
|
+
|
|
17576
|
+
if (node.children) {
|
|
17577
|
+
clone = Object.assign({}, node)
|
|
17578
|
+
clone.children = all(h, node)
|
|
17579
|
+
return clone
|
|
17580
|
+
}
|
|
17581
|
+
|
|
17582
|
+
return node
|
|
17583
|
+
}
|
|
17584
|
+
|
|
17658
17585
|
|
|
17659
17586
|
/***/ }),
|
|
17660
17587
|
|
|
@@ -17739,7 +17666,7 @@ function wrap(nodes, loose) {
|
|
|
17739
17666
|
result.push(nodes[index])
|
|
17740
17667
|
}
|
|
17741
17668
|
|
|
17742
|
-
if (loose && nodes.length
|
|
17669
|
+
if (loose && nodes.length > 0) {
|
|
17743
17670
|
result.push(u('text', '\n'))
|
|
17744
17671
|
}
|
|
17745
17672
|
|
|
@@ -18952,15 +18879,15 @@ var defaults = {
|
|
|
18952
18879
|
// Characters.
|
|
18953
18880
|
var tab = 9 // '\t'
|
|
18954
18881
|
var lineFeed = 10 // '\n'
|
|
18955
|
-
var formFeed = 12 //
|
|
18882
|
+
var formFeed = 12 // '\f'
|
|
18956
18883
|
var space = 32 // ' '
|
|
18957
|
-
var ampersand = 38 //
|
|
18958
|
-
var semicolon = 59 //
|
|
18959
|
-
var lessThan = 60 //
|
|
18960
|
-
var equalsTo = 61 //
|
|
18961
|
-
var numberSign = 35 //
|
|
18962
|
-
var uppercaseX = 88 //
|
|
18963
|
-
var lowercaseX = 120 //
|
|
18884
|
+
var ampersand = 38 // '&'
|
|
18885
|
+
var semicolon = 59 // ';'
|
|
18886
|
+
var lessThan = 60 // '<'
|
|
18887
|
+
var equalsTo = 61 // '='
|
|
18888
|
+
var numberSign = 35 // '#'
|
|
18889
|
+
var uppercaseX = 88 // 'X'
|
|
18890
|
+
var lowercaseX = 120 // 'x'
|
|
18964
18891
|
var replacementCharacter = 65533 // '�'
|
|
18965
18892
|
|
|
18966
18893
|
// Reference types.
|
|
@@ -19082,7 +19009,8 @@ function parse(value, settings) {
|
|
|
19082
19009
|
// Wrap `handleWarning`.
|
|
19083
19010
|
warning = handleWarning ? parseError : noop
|
|
19084
19011
|
|
|
19085
|
-
// Ensure the algorithm walks over the first character and the end
|
|
19012
|
+
// Ensure the algorithm walks over the first character and the end
|
|
19013
|
+
// (inclusive).
|
|
19086
19014
|
index--
|
|
19087
19015
|
length++
|
|
19088
19016
|
|
|
@@ -19315,7 +19243,7 @@ function parse(value, settings) {
|
|
|
19315
19243
|
}
|
|
19316
19244
|
}
|
|
19317
19245
|
|
|
19318
|
-
// Return the reduced nodes
|
|
19246
|
+
// Return the reduced nodes.
|
|
19319
19247
|
return result.join('')
|
|
19320
19248
|
|
|
19321
19249
|
// Get current position.
|
|
@@ -21929,7 +21857,6 @@ module.exports = {
|
|
|
21929
21857
|
position: true,
|
|
21930
21858
|
gfm: true,
|
|
21931
21859
|
commonmark: false,
|
|
21932
|
-
footnotes: false,
|
|
21933
21860
|
pedantic: false,
|
|
21934
21861
|
blocks: __webpack_require__(8829)
|
|
21935
21862
|
}
|
|
@@ -21990,6 +21917,65 @@ function locate(value, fromIndex) {
|
|
|
21990
21917
|
}
|
|
21991
21918
|
|
|
21992
21919
|
|
|
21920
|
+
/***/ }),
|
|
21921
|
+
|
|
21922
|
+
/***/ 858:
|
|
21923
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
21924
|
+
|
|
21925
|
+
"use strict";
|
|
21926
|
+
|
|
21927
|
+
|
|
21928
|
+
var decimal = __webpack_require__(6195)
|
|
21929
|
+
var alphabetical = __webpack_require__(6260)
|
|
21930
|
+
|
|
21931
|
+
var plusSign = 43 // '+'
|
|
21932
|
+
var dash = 45 // '-'
|
|
21933
|
+
var dot = 46 // '.'
|
|
21934
|
+
var underscore = 95 // '_'
|
|
21935
|
+
|
|
21936
|
+
module.exports = locate
|
|
21937
|
+
|
|
21938
|
+
// See: <https://github.github.com/gfm/#extended-email-autolink>
|
|
21939
|
+
function locate(value, fromIndex) {
|
|
21940
|
+
var self = this
|
|
21941
|
+
var at
|
|
21942
|
+
var position
|
|
21943
|
+
|
|
21944
|
+
if (!this.options.gfm) {
|
|
21945
|
+
return -1
|
|
21946
|
+
}
|
|
21947
|
+
|
|
21948
|
+
at = value.indexOf('@', fromIndex)
|
|
21949
|
+
|
|
21950
|
+
if (at === -1) {
|
|
21951
|
+
return -1
|
|
21952
|
+
}
|
|
21953
|
+
|
|
21954
|
+
position = at
|
|
21955
|
+
|
|
21956
|
+
if (position === fromIndex || !isGfmAtext(value.charCodeAt(position - 1))) {
|
|
21957
|
+
return locate.call(self, value, at + 1)
|
|
21958
|
+
}
|
|
21959
|
+
|
|
21960
|
+
while (position > fromIndex && isGfmAtext(value.charCodeAt(position - 1))) {
|
|
21961
|
+
position--
|
|
21962
|
+
}
|
|
21963
|
+
|
|
21964
|
+
return position
|
|
21965
|
+
}
|
|
21966
|
+
|
|
21967
|
+
function isGfmAtext(code) {
|
|
21968
|
+
return (
|
|
21969
|
+
decimal(code) ||
|
|
21970
|
+
alphabetical(code) ||
|
|
21971
|
+
code === plusSign ||
|
|
21972
|
+
code === dash ||
|
|
21973
|
+
code === dot ||
|
|
21974
|
+
code === underscore
|
|
21975
|
+
)
|
|
21976
|
+
}
|
|
21977
|
+
|
|
21978
|
+
|
|
21993
21979
|
/***/ }),
|
|
21994
21980
|
|
|
21995
21981
|
/***/ 6131:
|
|
@@ -22106,22 +22092,25 @@ function locate(value, fromIndex) {
|
|
|
22106
22092
|
|
|
22107
22093
|
module.exports = locate
|
|
22108
22094
|
|
|
22109
|
-
var
|
|
22095
|
+
var values = ['www.', 'http://', 'https://']
|
|
22110
22096
|
|
|
22111
22097
|
function locate(value, fromIndex) {
|
|
22112
|
-
var length = protocols.length
|
|
22113
|
-
var index = -1
|
|
22114
22098
|
var min = -1
|
|
22099
|
+
var index
|
|
22100
|
+
var length
|
|
22115
22101
|
var position
|
|
22116
22102
|
|
|
22117
22103
|
if (!this.options.gfm) {
|
|
22118
|
-
return
|
|
22104
|
+
return min
|
|
22119
22105
|
}
|
|
22120
22106
|
|
|
22107
|
+
length = values.length
|
|
22108
|
+
index = -1
|
|
22109
|
+
|
|
22121
22110
|
while (++index < length) {
|
|
22122
|
-
position = value.indexOf(
|
|
22111
|
+
position = value.indexOf(values[index], fromIndex)
|
|
22123
22112
|
|
|
22124
|
-
if (position !== -1 && (
|
|
22113
|
+
if (position !== -1 && (min === -1 || position < min)) {
|
|
22125
22114
|
min = position
|
|
22126
22115
|
}
|
|
22127
22116
|
}
|
|
@@ -22238,13 +22227,13 @@ proto.enterBlock = toggle('inBlock', false)
|
|
|
22238
22227
|
// In the above example, the thematic break “interupts” the paragraph.
|
|
22239
22228
|
proto.interruptParagraph = [
|
|
22240
22229
|
['thematicBreak'],
|
|
22230
|
+
['list'],
|
|
22241
22231
|
['atxHeading'],
|
|
22242
22232
|
['fencedCode'],
|
|
22243
22233
|
['blockquote'],
|
|
22244
22234
|
['html'],
|
|
22245
22235
|
['setextHeading', {commonmark: false}],
|
|
22246
|
-
['definition', {commonmark: false}]
|
|
22247
|
-
['footnote', {commonmark: false}]
|
|
22236
|
+
['definition', {commonmark: false}]
|
|
22248
22237
|
]
|
|
22249
22238
|
|
|
22250
22239
|
// Nodes that can interupt a list:
|
|
@@ -22259,8 +22248,7 @@ proto.interruptList = [
|
|
|
22259
22248
|
['atxHeading', {pedantic: false}],
|
|
22260
22249
|
['fencedCode', {pedantic: false}],
|
|
22261
22250
|
['thematicBreak', {pedantic: false}],
|
|
22262
|
-
['definition', {commonmark: false}]
|
|
22263
|
-
['footnote', {commonmark: false}]
|
|
22251
|
+
['definition', {commonmark: false}]
|
|
22264
22252
|
]
|
|
22265
22253
|
|
|
22266
22254
|
// Nodes that can interupt a blockquote:
|
|
@@ -22279,13 +22267,12 @@ proto.interruptBlockquote = [
|
|
|
22279
22267
|
['thematicBreak', {commonmark: true}],
|
|
22280
22268
|
['html', {commonmark: true}],
|
|
22281
22269
|
['list', {commonmark: true}],
|
|
22282
|
-
['definition', {commonmark: false}]
|
|
22283
|
-
['footnote', {commonmark: false}]
|
|
22270
|
+
['definition', {commonmark: false}]
|
|
22284
22271
|
]
|
|
22285
22272
|
|
|
22286
22273
|
// Handlers.
|
|
22287
22274
|
proto.blockTokenizers = {
|
|
22288
|
-
|
|
22275
|
+
blankLine: __webpack_require__(8086),
|
|
22289
22276
|
indentedCode: __webpack_require__(1018),
|
|
22290
22277
|
fencedCode: __webpack_require__(4967),
|
|
22291
22278
|
blockquote: __webpack_require__(1153),
|
|
@@ -22294,7 +22281,6 @@ proto.blockTokenizers = {
|
|
|
22294
22281
|
list: __webpack_require__(8332),
|
|
22295
22282
|
setextHeading: __webpack_require__(6530),
|
|
22296
22283
|
html: __webpack_require__(5215),
|
|
22297
|
-
footnote: __webpack_require__(8574),
|
|
22298
22284
|
definition: __webpack_require__(856),
|
|
22299
22285
|
table: __webpack_require__(8029),
|
|
22300
22286
|
paragraph: __webpack_require__(2431)
|
|
@@ -22304,6 +22290,7 @@ proto.inlineTokenizers = {
|
|
|
22304
22290
|
escape: __webpack_require__(4833),
|
|
22305
22291
|
autoLink: __webpack_require__(6507),
|
|
22306
22292
|
url: __webpack_require__(5044),
|
|
22293
|
+
email: __webpack_require__(1834),
|
|
22307
22294
|
html: __webpack_require__(3943),
|
|
22308
22295
|
link: __webpack_require__(8685),
|
|
22309
22296
|
reference: __webpack_require__(7551),
|
|
@@ -22532,6 +22519,57 @@ function autoLink(eat, value, silent) {
|
|
|
22532
22519
|
}
|
|
22533
22520
|
|
|
22534
22521
|
|
|
22522
|
+
/***/ }),
|
|
22523
|
+
|
|
22524
|
+
/***/ 8086:
|
|
22525
|
+
/***/ ((module) => {
|
|
22526
|
+
|
|
22527
|
+
"use strict";
|
|
22528
|
+
|
|
22529
|
+
|
|
22530
|
+
// A line containing no characters, or a line containing only spaces (U+0020) or
|
|
22531
|
+
// tabs (U+0009), is called a blank line.
|
|
22532
|
+
// See <https://spec.commonmark.org/0.29/#blank-line>.
|
|
22533
|
+
var reBlankLine = /^[ \t]*(\n|$)/
|
|
22534
|
+
|
|
22535
|
+
// Note that though blank lines play a special role in lists to determine
|
|
22536
|
+
// whether the list is tight or loose
|
|
22537
|
+
// (<https://spec.commonmark.org/0.29/#blank-lines>), it’s done by the list
|
|
22538
|
+
// tokenizer and this blank line tokenizer does not have to be responsible for
|
|
22539
|
+
// that.
|
|
22540
|
+
// Therefore, configs such as `blankLine.notInList` do not have to be set here.
|
|
22541
|
+
module.exports = blankLine
|
|
22542
|
+
|
|
22543
|
+
function blankLine(eat, value, silent) {
|
|
22544
|
+
var match
|
|
22545
|
+
var subvalue = ''
|
|
22546
|
+
var index = 0
|
|
22547
|
+
var length = value.length
|
|
22548
|
+
|
|
22549
|
+
while (index < length) {
|
|
22550
|
+
match = reBlankLine.exec(value.slice(index))
|
|
22551
|
+
|
|
22552
|
+
if (match == null) {
|
|
22553
|
+
break
|
|
22554
|
+
}
|
|
22555
|
+
|
|
22556
|
+
index += match[0].length
|
|
22557
|
+
subvalue += match[0]
|
|
22558
|
+
}
|
|
22559
|
+
|
|
22560
|
+
if (subvalue === '') {
|
|
22561
|
+
return
|
|
22562
|
+
}
|
|
22563
|
+
|
|
22564
|
+
/* istanbul ignore if - never used (yet) */
|
|
22565
|
+
if (silent) {
|
|
22566
|
+
return true
|
|
22567
|
+
}
|
|
22568
|
+
|
|
22569
|
+
eat(subvalue)
|
|
22570
|
+
}
|
|
22571
|
+
|
|
22572
|
+
|
|
22535
22573
|
/***/ }),
|
|
22536
22574
|
|
|
22537
22575
|
/***/ 1153:
|
|
@@ -23547,6 +23585,128 @@ function strikethrough(eat, value, silent) {
|
|
|
23547
23585
|
}
|
|
23548
23586
|
|
|
23549
23587
|
|
|
23588
|
+
/***/ }),
|
|
23589
|
+
|
|
23590
|
+
/***/ 1834:
|
|
23591
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
23592
|
+
|
|
23593
|
+
"use strict";
|
|
23594
|
+
|
|
23595
|
+
|
|
23596
|
+
var decode = __webpack_require__(7574)
|
|
23597
|
+
var decimal = __webpack_require__(6195)
|
|
23598
|
+
var alphabetical = __webpack_require__(6260)
|
|
23599
|
+
var locate = __webpack_require__(858)
|
|
23600
|
+
|
|
23601
|
+
module.exports = email
|
|
23602
|
+
email.locator = locate
|
|
23603
|
+
email.notInLink = true
|
|
23604
|
+
|
|
23605
|
+
var plusSign = 43 // '+'
|
|
23606
|
+
var dash = 45 // '-'
|
|
23607
|
+
var dot = 46 // '.'
|
|
23608
|
+
var atSign = 64 // '@'
|
|
23609
|
+
var underscore = 95 // '_'
|
|
23610
|
+
|
|
23611
|
+
function email(eat, value, silent) {
|
|
23612
|
+
var self = this
|
|
23613
|
+
var gfm = self.options.gfm
|
|
23614
|
+
var tokenizers = self.inlineTokenizers
|
|
23615
|
+
var index = 0
|
|
23616
|
+
var length = value.length
|
|
23617
|
+
var firstDot = -1
|
|
23618
|
+
var code
|
|
23619
|
+
var content
|
|
23620
|
+
var children
|
|
23621
|
+
var exit
|
|
23622
|
+
|
|
23623
|
+
if (!gfm) {
|
|
23624
|
+
return
|
|
23625
|
+
}
|
|
23626
|
+
|
|
23627
|
+
code = value.charCodeAt(index)
|
|
23628
|
+
|
|
23629
|
+
while (
|
|
23630
|
+
decimal(code) ||
|
|
23631
|
+
alphabetical(code) ||
|
|
23632
|
+
code === plusSign ||
|
|
23633
|
+
code === dash ||
|
|
23634
|
+
code === dot ||
|
|
23635
|
+
code === underscore
|
|
23636
|
+
) {
|
|
23637
|
+
code = value.charCodeAt(++index)
|
|
23638
|
+
}
|
|
23639
|
+
|
|
23640
|
+
if (index === 0) {
|
|
23641
|
+
return
|
|
23642
|
+
}
|
|
23643
|
+
|
|
23644
|
+
if (code !== atSign) {
|
|
23645
|
+
return
|
|
23646
|
+
}
|
|
23647
|
+
|
|
23648
|
+
index++
|
|
23649
|
+
|
|
23650
|
+
while (index < length) {
|
|
23651
|
+
code = value.charCodeAt(index)
|
|
23652
|
+
|
|
23653
|
+
if (
|
|
23654
|
+
decimal(code) ||
|
|
23655
|
+
alphabetical(code) ||
|
|
23656
|
+
code === dash ||
|
|
23657
|
+
code === dot ||
|
|
23658
|
+
code === underscore
|
|
23659
|
+
) {
|
|
23660
|
+
index++
|
|
23661
|
+
|
|
23662
|
+
if (firstDot === -1 && code === dot) {
|
|
23663
|
+
firstDot = index
|
|
23664
|
+
}
|
|
23665
|
+
|
|
23666
|
+
continue
|
|
23667
|
+
}
|
|
23668
|
+
|
|
23669
|
+
break
|
|
23670
|
+
}
|
|
23671
|
+
|
|
23672
|
+
if (
|
|
23673
|
+
firstDot === -1 ||
|
|
23674
|
+
firstDot === index ||
|
|
23675
|
+
code === dash ||
|
|
23676
|
+
code === underscore
|
|
23677
|
+
) {
|
|
23678
|
+
return
|
|
23679
|
+
}
|
|
23680
|
+
|
|
23681
|
+
if (code === dot) {
|
|
23682
|
+
index--
|
|
23683
|
+
}
|
|
23684
|
+
|
|
23685
|
+
content = value.slice(0, index)
|
|
23686
|
+
|
|
23687
|
+
/* istanbul ignore if - never used (yet) */
|
|
23688
|
+
if (silent) {
|
|
23689
|
+
return true
|
|
23690
|
+
}
|
|
23691
|
+
|
|
23692
|
+
exit = self.enterLink()
|
|
23693
|
+
|
|
23694
|
+
// Temporarily remove all tokenizers except text in url.
|
|
23695
|
+
self.inlineTokenizers = {text: tokenizers.text}
|
|
23696
|
+
children = self.tokenizeInline(content, eat.now())
|
|
23697
|
+
self.inlineTokenizers = tokenizers
|
|
23698
|
+
|
|
23699
|
+
exit()
|
|
23700
|
+
|
|
23701
|
+
return eat(content)({
|
|
23702
|
+
type: 'link',
|
|
23703
|
+
title: null,
|
|
23704
|
+
url: 'mailto:' + decode(content, {nonTerminated: false}),
|
|
23705
|
+
children: children
|
|
23706
|
+
})
|
|
23707
|
+
}
|
|
23708
|
+
|
|
23709
|
+
|
|
23550
23710
|
/***/ }),
|
|
23551
23711
|
|
|
23552
23712
|
/***/ 8210:
|
|
@@ -23577,7 +23737,7 @@ function emphasis(eat, value, silent) {
|
|
|
23577
23737
|
var queue
|
|
23578
23738
|
var subvalue
|
|
23579
23739
|
var length
|
|
23580
|
-
var
|
|
23740
|
+
var previous
|
|
23581
23741
|
|
|
23582
23742
|
if (character !== asterisk && character !== underscore) {
|
|
23583
23743
|
return
|
|
@@ -23596,14 +23756,14 @@ function emphasis(eat, value, silent) {
|
|
|
23596
23756
|
}
|
|
23597
23757
|
|
|
23598
23758
|
while (index < length) {
|
|
23599
|
-
|
|
23759
|
+
previous = character
|
|
23600
23760
|
character = value.charAt(index)
|
|
23601
23761
|
|
|
23602
|
-
if (character === marker && (!pedantic || !whitespace(
|
|
23762
|
+
if (character === marker && (!pedantic || !whitespace(previous))) {
|
|
23603
23763
|
character = value.charAt(++index)
|
|
23604
23764
|
|
|
23605
23765
|
if (character !== marker) {
|
|
23606
|
-
if (!trim(queue) ||
|
|
23766
|
+
if (!trim(queue) || previous === marker) {
|
|
23607
23767
|
return
|
|
23608
23768
|
}
|
|
23609
23769
|
|
|
@@ -23683,200 +23843,6 @@ function escape(eat, value, silent) {
|
|
|
23683
23843
|
}
|
|
23684
23844
|
|
|
23685
23845
|
|
|
23686
|
-
/***/ }),
|
|
23687
|
-
|
|
23688
|
-
/***/ 8574:
|
|
23689
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
23690
|
-
|
|
23691
|
-
"use strict";
|
|
23692
|
-
|
|
23693
|
-
|
|
23694
|
-
var whitespace = __webpack_require__(2139)
|
|
23695
|
-
var normalize = __webpack_require__(4405)
|
|
23696
|
-
|
|
23697
|
-
module.exports = footnoteDefinition
|
|
23698
|
-
footnoteDefinition.notInList = true
|
|
23699
|
-
footnoteDefinition.notInBlock = true
|
|
23700
|
-
|
|
23701
|
-
var backslash = '\\'
|
|
23702
|
-
var lineFeed = '\n'
|
|
23703
|
-
var tab = '\t'
|
|
23704
|
-
var space = ' '
|
|
23705
|
-
var leftSquareBracket = '['
|
|
23706
|
-
var rightSquareBracket = ']'
|
|
23707
|
-
var caret = '^'
|
|
23708
|
-
var colon = ':'
|
|
23709
|
-
|
|
23710
|
-
var EXPRESSION_INITIAL_TAB = /^( {4}|\t)?/gm
|
|
23711
|
-
|
|
23712
|
-
function footnoteDefinition(eat, value, silent) {
|
|
23713
|
-
var self = this
|
|
23714
|
-
var offsets = self.offset
|
|
23715
|
-
var index
|
|
23716
|
-
var length
|
|
23717
|
-
var subvalue
|
|
23718
|
-
var now
|
|
23719
|
-
var currentLine
|
|
23720
|
-
var content
|
|
23721
|
-
var queue
|
|
23722
|
-
var subqueue
|
|
23723
|
-
var character
|
|
23724
|
-
var identifier
|
|
23725
|
-
var add
|
|
23726
|
-
var exit
|
|
23727
|
-
|
|
23728
|
-
if (!self.options.footnotes) {
|
|
23729
|
-
return
|
|
23730
|
-
}
|
|
23731
|
-
|
|
23732
|
-
index = 0
|
|
23733
|
-
length = value.length
|
|
23734
|
-
subvalue = ''
|
|
23735
|
-
now = eat.now()
|
|
23736
|
-
currentLine = now.line
|
|
23737
|
-
|
|
23738
|
-
while (index < length) {
|
|
23739
|
-
character = value.charAt(index)
|
|
23740
|
-
|
|
23741
|
-
if (!whitespace(character)) {
|
|
23742
|
-
break
|
|
23743
|
-
}
|
|
23744
|
-
|
|
23745
|
-
subvalue += character
|
|
23746
|
-
index++
|
|
23747
|
-
}
|
|
23748
|
-
|
|
23749
|
-
if (
|
|
23750
|
-
value.charAt(index) !== leftSquareBracket ||
|
|
23751
|
-
value.charAt(index + 1) !== caret
|
|
23752
|
-
) {
|
|
23753
|
-
return
|
|
23754
|
-
}
|
|
23755
|
-
|
|
23756
|
-
subvalue += leftSquareBracket + caret
|
|
23757
|
-
index = subvalue.length
|
|
23758
|
-
queue = ''
|
|
23759
|
-
|
|
23760
|
-
while (index < length) {
|
|
23761
|
-
character = value.charAt(index)
|
|
23762
|
-
|
|
23763
|
-
if (character === rightSquareBracket) {
|
|
23764
|
-
break
|
|
23765
|
-
} else if (character === backslash) {
|
|
23766
|
-
queue += character
|
|
23767
|
-
index++
|
|
23768
|
-
character = value.charAt(index)
|
|
23769
|
-
}
|
|
23770
|
-
|
|
23771
|
-
queue += character
|
|
23772
|
-
index++
|
|
23773
|
-
}
|
|
23774
|
-
|
|
23775
|
-
if (
|
|
23776
|
-
!queue ||
|
|
23777
|
-
value.charAt(index) !== rightSquareBracket ||
|
|
23778
|
-
value.charAt(index + 1) !== colon
|
|
23779
|
-
) {
|
|
23780
|
-
return
|
|
23781
|
-
}
|
|
23782
|
-
|
|
23783
|
-
if (silent) {
|
|
23784
|
-
return true
|
|
23785
|
-
}
|
|
23786
|
-
|
|
23787
|
-
identifier = queue
|
|
23788
|
-
subvalue += queue + rightSquareBracket + colon
|
|
23789
|
-
index = subvalue.length
|
|
23790
|
-
|
|
23791
|
-
while (index < length) {
|
|
23792
|
-
character = value.charAt(index)
|
|
23793
|
-
|
|
23794
|
-
if (character !== tab && character !== space) {
|
|
23795
|
-
break
|
|
23796
|
-
}
|
|
23797
|
-
|
|
23798
|
-
subvalue += character
|
|
23799
|
-
index++
|
|
23800
|
-
}
|
|
23801
|
-
|
|
23802
|
-
now.column += subvalue.length
|
|
23803
|
-
now.offset += subvalue.length
|
|
23804
|
-
queue = ''
|
|
23805
|
-
content = ''
|
|
23806
|
-
subqueue = ''
|
|
23807
|
-
|
|
23808
|
-
while (index < length) {
|
|
23809
|
-
character = value.charAt(index)
|
|
23810
|
-
|
|
23811
|
-
if (character === lineFeed) {
|
|
23812
|
-
subqueue = character
|
|
23813
|
-
index++
|
|
23814
|
-
|
|
23815
|
-
while (index < length) {
|
|
23816
|
-
character = value.charAt(index)
|
|
23817
|
-
|
|
23818
|
-
if (character !== lineFeed) {
|
|
23819
|
-
break
|
|
23820
|
-
}
|
|
23821
|
-
|
|
23822
|
-
subqueue += character
|
|
23823
|
-
index++
|
|
23824
|
-
}
|
|
23825
|
-
|
|
23826
|
-
queue += subqueue
|
|
23827
|
-
subqueue = ''
|
|
23828
|
-
|
|
23829
|
-
while (index < length) {
|
|
23830
|
-
character = value.charAt(index)
|
|
23831
|
-
|
|
23832
|
-
if (character !== space) {
|
|
23833
|
-
break
|
|
23834
|
-
}
|
|
23835
|
-
|
|
23836
|
-
subqueue += character
|
|
23837
|
-
index++
|
|
23838
|
-
}
|
|
23839
|
-
|
|
23840
|
-
if (subqueue.length === 0) {
|
|
23841
|
-
break
|
|
23842
|
-
}
|
|
23843
|
-
|
|
23844
|
-
queue += subqueue
|
|
23845
|
-
}
|
|
23846
|
-
|
|
23847
|
-
if (queue) {
|
|
23848
|
-
content += queue
|
|
23849
|
-
queue = ''
|
|
23850
|
-
}
|
|
23851
|
-
|
|
23852
|
-
content += character
|
|
23853
|
-
index++
|
|
23854
|
-
}
|
|
23855
|
-
|
|
23856
|
-
subvalue += content
|
|
23857
|
-
|
|
23858
|
-
content = content.replace(EXPRESSION_INITIAL_TAB, function(line) {
|
|
23859
|
-
offsets[currentLine] = (offsets[currentLine] || 0) + line.length
|
|
23860
|
-
currentLine++
|
|
23861
|
-
|
|
23862
|
-
return ''
|
|
23863
|
-
})
|
|
23864
|
-
|
|
23865
|
-
add = eat(subvalue)
|
|
23866
|
-
|
|
23867
|
-
exit = self.enterBlock()
|
|
23868
|
-
content = self.tokenizeBlock(content, now)
|
|
23869
|
-
exit()
|
|
23870
|
-
|
|
23871
|
-
return add({
|
|
23872
|
-
type: 'footnoteDefinition',
|
|
23873
|
-
identifier: normalize(identifier),
|
|
23874
|
-
label: identifier,
|
|
23875
|
-
children: content
|
|
23876
|
-
})
|
|
23877
|
-
}
|
|
23878
|
-
|
|
23879
|
-
|
|
23880
23846
|
/***/ }),
|
|
23881
23847
|
|
|
23882
23848
|
/***/ 2867:
|
|
@@ -24156,7 +24122,7 @@ var instructionCloseExpression = /\?>/
|
|
|
24156
24122
|
var directiveOpenExpression = /^<![A-Za-z]/
|
|
24157
24123
|
var directiveCloseExpression = />/
|
|
24158
24124
|
var cdataOpenExpression = /^<!\[CDATA\[/
|
|
24159
|
-
var cdataCloseExpression =
|
|
24125
|
+
var cdataCloseExpression = /]]>/
|
|
24160
24126
|
var elementCloseExpression = /^$/
|
|
24161
24127
|
var otherElementOpenExpression = new RegExp(openCloseTag.source + '\\s*$')
|
|
24162
24128
|
|
|
@@ -24430,20 +24396,6 @@ function link(eat, value, silent) {
|
|
|
24430
24396
|
if (depth) {
|
|
24431
24397
|
depth--
|
|
24432
24398
|
} else {
|
|
24433
|
-
// Allow white-space between content and url in GFM mode.
|
|
24434
|
-
if (!pedantic) {
|
|
24435
|
-
while (index < length) {
|
|
24436
|
-
character = value.charAt(index + 1)
|
|
24437
|
-
|
|
24438
|
-
if (!whitespace(character)) {
|
|
24439
|
-
break
|
|
24440
|
-
}
|
|
24441
|
-
|
|
24442
|
-
subqueue += character
|
|
24443
|
-
index++
|
|
24444
|
-
}
|
|
24445
|
-
}
|
|
24446
|
-
|
|
24447
24399
|
if (value.charAt(index + 1) !== leftParenthesis) {
|
|
24448
24400
|
return
|
|
24449
24401
|
}
|
|
@@ -24735,7 +24687,7 @@ var lowercaseX = 'x'
|
|
|
24735
24687
|
|
|
24736
24688
|
var tabSize = 4
|
|
24737
24689
|
var looseListItemExpression = /\n\n(?!\s*$)/
|
|
24738
|
-
var taskItemExpression = /^\[([ \
|
|
24690
|
+
var taskItemExpression = /^\[([ X\tx])][ \t]/
|
|
24739
24691
|
var bulletExpression = /^([ \t]*)([*+-]|\d+[.)])( {1,4}(?! )| |\t|$|(?=\n))([^\n]*)/
|
|
24740
24692
|
var pedanticBulletExpression = /^([ \t]*)([*+-]|\d+[.)])([ \t]+)/
|
|
24741
24693
|
var initialIndentExpression = /^( {1,4}|\t)?/gm
|
|
@@ -24749,7 +24701,7 @@ function list(eat, value, silent) {
|
|
|
24749
24701
|
var index = 0
|
|
24750
24702
|
var length = value.length
|
|
24751
24703
|
var start = null
|
|
24752
|
-
var size
|
|
24704
|
+
var size
|
|
24753
24705
|
var queue
|
|
24754
24706
|
var ordered
|
|
24755
24707
|
var character
|
|
@@ -24760,7 +24712,7 @@ function list(eat, value, silent) {
|
|
|
24760
24712
|
var currentMarker
|
|
24761
24713
|
var content
|
|
24762
24714
|
var line
|
|
24763
|
-
var
|
|
24715
|
+
var previousEmpty
|
|
24764
24716
|
var empty
|
|
24765
24717
|
var items
|
|
24766
24718
|
var allLines
|
|
@@ -24777,21 +24729,13 @@ function list(eat, value, silent) {
|
|
|
24777
24729
|
while (index < length) {
|
|
24778
24730
|
character = value.charAt(index)
|
|
24779
24731
|
|
|
24780
|
-
if (character
|
|
24781
|
-
size += tabSize - (size % tabSize)
|
|
24782
|
-
} else if (character === space) {
|
|
24783
|
-
size++
|
|
24784
|
-
} else {
|
|
24732
|
+
if (character !== tab && character !== space) {
|
|
24785
24733
|
break
|
|
24786
24734
|
}
|
|
24787
24735
|
|
|
24788
24736
|
index++
|
|
24789
24737
|
}
|
|
24790
24738
|
|
|
24791
|
-
if (size >= tabSize) {
|
|
24792
|
-
return
|
|
24793
|
-
}
|
|
24794
|
-
|
|
24795
24739
|
character = value.charAt(index)
|
|
24796
24740
|
|
|
24797
24741
|
if (character === asterisk || character === plusSign || character === dash) {
|
|
@@ -24821,6 +24765,14 @@ function list(eat, value, silent) {
|
|
|
24821
24765
|
return
|
|
24822
24766
|
}
|
|
24823
24767
|
|
|
24768
|
+
/* Slightly abusing `silent` mode, whose goal is to make interrupting
|
|
24769
|
+
* paragraphs work.
|
|
24770
|
+
* Well, that’s exactly what we want to do here: don’t interrupt:
|
|
24771
|
+
* 2. here, because the “list” doesn’t start with `1`. */
|
|
24772
|
+
if (silent && queue !== '1') {
|
|
24773
|
+
return
|
|
24774
|
+
}
|
|
24775
|
+
|
|
24824
24776
|
start = parseInt(queue, 10)
|
|
24825
24777
|
marker = character
|
|
24826
24778
|
}
|
|
@@ -24854,7 +24806,6 @@ function list(eat, value, silent) {
|
|
|
24854
24806
|
nextIndex = length
|
|
24855
24807
|
}
|
|
24856
24808
|
|
|
24857
|
-
end = index + tabSize
|
|
24858
24809
|
size = 0
|
|
24859
24810
|
|
|
24860
24811
|
while (index < length) {
|
|
@@ -24871,10 +24822,6 @@ function list(eat, value, silent) {
|
|
|
24871
24822
|
index++
|
|
24872
24823
|
}
|
|
24873
24824
|
|
|
24874
|
-
if (size >= tabSize) {
|
|
24875
|
-
indented = true
|
|
24876
|
-
}
|
|
24877
|
-
|
|
24878
24825
|
if (item && size >= item.indent) {
|
|
24879
24826
|
indented = true
|
|
24880
24827
|
}
|
|
@@ -24975,7 +24922,7 @@ function list(eat, value, silent) {
|
|
|
24975
24922
|
}
|
|
24976
24923
|
}
|
|
24977
24924
|
|
|
24978
|
-
|
|
24925
|
+
previousEmpty = empty
|
|
24979
24926
|
empty = !prefixed && !trim(content).length
|
|
24980
24927
|
|
|
24981
24928
|
if (indented && item) {
|
|
@@ -24999,13 +24946,13 @@ function list(eat, value, silent) {
|
|
|
24999
24946
|
allLines = allLines.concat(emptyLines, line)
|
|
25000
24947
|
emptyLines = []
|
|
25001
24948
|
} else if (empty) {
|
|
25002
|
-
if (
|
|
24949
|
+
if (previousEmpty && !commonmark) {
|
|
25003
24950
|
break
|
|
25004
24951
|
}
|
|
25005
24952
|
|
|
25006
24953
|
emptyLines.push(line)
|
|
25007
24954
|
} else {
|
|
25008
|
-
if (
|
|
24955
|
+
if (previousEmpty) {
|
|
25009
24956
|
break
|
|
25010
24957
|
}
|
|
25011
24958
|
|
|
@@ -25164,62 +25111,6 @@ function normalListItem(ctx, value, position) {
|
|
|
25164
25111
|
}
|
|
25165
25112
|
|
|
25166
25113
|
|
|
25167
|
-
/***/ }),
|
|
25168
|
-
|
|
25169
|
-
/***/ 3885:
|
|
25170
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
25171
|
-
|
|
25172
|
-
"use strict";
|
|
25173
|
-
|
|
25174
|
-
|
|
25175
|
-
var whitespace = __webpack_require__(2139)
|
|
25176
|
-
|
|
25177
|
-
module.exports = newline
|
|
25178
|
-
|
|
25179
|
-
var lineFeed = '\n'
|
|
25180
|
-
|
|
25181
|
-
function newline(eat, value, silent) {
|
|
25182
|
-
var character = value.charAt(0)
|
|
25183
|
-
var length
|
|
25184
|
-
var subvalue
|
|
25185
|
-
var queue
|
|
25186
|
-
var index
|
|
25187
|
-
|
|
25188
|
-
if (character !== lineFeed) {
|
|
25189
|
-
return
|
|
25190
|
-
}
|
|
25191
|
-
|
|
25192
|
-
/* istanbul ignore if - never used (yet) */
|
|
25193
|
-
if (silent) {
|
|
25194
|
-
return true
|
|
25195
|
-
}
|
|
25196
|
-
|
|
25197
|
-
index = 1
|
|
25198
|
-
length = value.length
|
|
25199
|
-
subvalue = character
|
|
25200
|
-
queue = ''
|
|
25201
|
-
|
|
25202
|
-
while (index < length) {
|
|
25203
|
-
character = value.charAt(index)
|
|
25204
|
-
|
|
25205
|
-
if (!whitespace(character)) {
|
|
25206
|
-
break
|
|
25207
|
-
}
|
|
25208
|
-
|
|
25209
|
-
queue += character
|
|
25210
|
-
|
|
25211
|
-
if (character === lineFeed) {
|
|
25212
|
-
subvalue += queue
|
|
25213
|
-
queue = ''
|
|
25214
|
-
}
|
|
25215
|
-
|
|
25216
|
-
index++
|
|
25217
|
-
}
|
|
25218
|
-
|
|
25219
|
-
eat(subvalue)
|
|
25220
|
-
}
|
|
25221
|
-
|
|
25222
|
-
|
|
25223
25114
|
/***/ }),
|
|
25224
25115
|
|
|
25225
25116
|
/***/ 2431:
|
|
@@ -25229,7 +25120,6 @@ function newline(eat, value, silent) {
|
|
|
25229
25120
|
|
|
25230
25121
|
|
|
25231
25122
|
var trim = __webpack_require__(3059)
|
|
25232
|
-
var decimal = __webpack_require__(6195)
|
|
25233
25123
|
var trimTrailingLines = __webpack_require__(7257)
|
|
25234
25124
|
var interrupt = __webpack_require__(6588)
|
|
25235
25125
|
|
|
@@ -25246,7 +25136,6 @@ function paragraph(eat, value, silent) {
|
|
|
25246
25136
|
var self = this
|
|
25247
25137
|
var settings = self.options
|
|
25248
25138
|
var commonmark = settings.commonmark
|
|
25249
|
-
var gfm = settings.gfm
|
|
25250
25139
|
var tokenizers = self.blockTokenizers
|
|
25251
25140
|
var interruptors = self.interruptParagraph
|
|
25252
25141
|
var index = value.indexOf(lineFeed)
|
|
@@ -25302,17 +25191,6 @@ function paragraph(eat, value, silent) {
|
|
|
25302
25191
|
break
|
|
25303
25192
|
}
|
|
25304
25193
|
|
|
25305
|
-
// Break if the following line starts a list, when already in a list, or
|
|
25306
|
-
// when in commonmark, or when in gfm mode and the bullet is *not* numeric.
|
|
25307
|
-
if (
|
|
25308
|
-
tokenizers.list.call(self, eat, subvalue, true) &&
|
|
25309
|
-
(self.inList ||
|
|
25310
|
-
commonmark ||
|
|
25311
|
-
(gfm && !decimal(trim.left(subvalue).charAt(0))))
|
|
25312
|
-
) {
|
|
25313
|
-
break
|
|
25314
|
-
}
|
|
25315
|
-
|
|
25316
25194
|
position = index
|
|
25317
25195
|
index = value.indexOf(lineFeed, index + 1)
|
|
25318
25196
|
|
|
@@ -25324,12 +25202,6 @@ function paragraph(eat, value, silent) {
|
|
|
25324
25202
|
|
|
25325
25203
|
subvalue = value.slice(0, index)
|
|
25326
25204
|
|
|
25327
|
-
if (trim(subvalue) === '') {
|
|
25328
|
-
eat(subvalue)
|
|
25329
|
-
|
|
25330
|
-
return null
|
|
25331
|
-
}
|
|
25332
|
-
|
|
25333
25205
|
/* istanbul ignore if - never used (yet) */
|
|
25334
25206
|
if (silent) {
|
|
25335
25207
|
return true
|
|
@@ -25362,21 +25234,17 @@ reference.locator = locate
|
|
|
25362
25234
|
|
|
25363
25235
|
var link = 'link'
|
|
25364
25236
|
var image = 'image'
|
|
25365
|
-
var footnote = 'footnote'
|
|
25366
25237
|
var shortcut = 'shortcut'
|
|
25367
25238
|
var collapsed = 'collapsed'
|
|
25368
25239
|
var full = 'full'
|
|
25369
|
-
var space = ' '
|
|
25370
25240
|
var exclamationMark = '!'
|
|
25371
25241
|
var leftSquareBracket = '['
|
|
25372
25242
|
var backslash = '\\'
|
|
25373
25243
|
var rightSquareBracket = ']'
|
|
25374
|
-
var caret = '^'
|
|
25375
25244
|
|
|
25376
25245
|
function reference(eat, value, silent) {
|
|
25377
25246
|
var self = this
|
|
25378
25247
|
var commonmark = self.options.commonmark
|
|
25379
|
-
var footnotes = self.options.footnotes
|
|
25380
25248
|
var character = value.charAt(0)
|
|
25381
25249
|
var index = 0
|
|
25382
25250
|
var length = value.length
|
|
@@ -25408,19 +25276,6 @@ function reference(eat, value, silent) {
|
|
|
25408
25276
|
intro += character
|
|
25409
25277
|
queue = ''
|
|
25410
25278
|
|
|
25411
|
-
// Check whether we’re eating a footnote.
|
|
25412
|
-
if (footnotes && value.charAt(index) === caret) {
|
|
25413
|
-
// Exit if `![^` is found, so the `!` will be seen as text after this,
|
|
25414
|
-
// and we’ll enter this function again when `[^` is found.
|
|
25415
|
-
if (type === image) {
|
|
25416
|
-
return
|
|
25417
|
-
}
|
|
25418
|
-
|
|
25419
|
-
intro += caret
|
|
25420
|
-
index++
|
|
25421
|
-
type = footnote
|
|
25422
|
-
}
|
|
25423
|
-
|
|
25424
25279
|
// Eat the text.
|
|
25425
25280
|
depth = 0
|
|
25426
25281
|
|
|
@@ -25477,13 +25332,7 @@ function reference(eat, value, silent) {
|
|
|
25477
25332
|
|
|
25478
25333
|
character = value.charAt(index)
|
|
25479
25334
|
|
|
25480
|
-
|
|
25481
|
-
// If footnotes are enabled, link labels cannot start with a caret.
|
|
25482
|
-
if (
|
|
25483
|
-
type !== footnote &&
|
|
25484
|
-
character === leftSquareBracket &&
|
|
25485
|
-
(!footnotes || value.charAt(index + 1) !== caret)
|
|
25486
|
-
) {
|
|
25335
|
+
if (character === leftSquareBracket) {
|
|
25487
25336
|
identifier = ''
|
|
25488
25337
|
queue += character
|
|
25489
25338
|
index++
|
|
@@ -25540,13 +25389,6 @@ function reference(eat, value, silent) {
|
|
|
25540
25389
|
return true
|
|
25541
25390
|
}
|
|
25542
25391
|
|
|
25543
|
-
if (type === footnote && content.indexOf(space) !== -1) {
|
|
25544
|
-
return eat(subvalue)({
|
|
25545
|
-
type: footnote,
|
|
25546
|
-
children: this.tokenizeInline(content, eat.now())
|
|
25547
|
-
})
|
|
25548
|
-
}
|
|
25549
|
-
|
|
25550
25392
|
now = eat.now()
|
|
25551
25393
|
now.column += intro.length
|
|
25552
25394
|
now.offset += intro.length
|
|
@@ -25555,18 +25397,15 @@ function reference(eat, value, silent) {
|
|
|
25555
25397
|
node = {
|
|
25556
25398
|
type: type + 'Reference',
|
|
25557
25399
|
identifier: normalize(identifier),
|
|
25558
|
-
label: identifier
|
|
25559
|
-
|
|
25560
|
-
|
|
25561
|
-
if (type === link || type === image) {
|
|
25562
|
-
node.referenceType = referenceType
|
|
25400
|
+
label: identifier,
|
|
25401
|
+
referenceType: referenceType
|
|
25563
25402
|
}
|
|
25564
25403
|
|
|
25565
25404
|
if (type === link) {
|
|
25566
25405
|
exit = self.enterLink()
|
|
25567
25406
|
node.children = self.tokenizeInline(content, now)
|
|
25568
25407
|
exit()
|
|
25569
|
-
} else
|
|
25408
|
+
} else {
|
|
25570
25409
|
node.alt = self.decode.raw(self.unescape(content), now) || null
|
|
25571
25410
|
}
|
|
25572
25411
|
|
|
@@ -25603,7 +25442,7 @@ function strong(eat, value, silent) {
|
|
|
25603
25442
|
var queue
|
|
25604
25443
|
var subvalue
|
|
25605
25444
|
var length
|
|
25606
|
-
var
|
|
25445
|
+
var previous
|
|
25607
25446
|
|
|
25608
25447
|
if (
|
|
25609
25448
|
(character !== asterisk && character !== underscore) ||
|
|
@@ -25625,13 +25464,13 @@ function strong(eat, value, silent) {
|
|
|
25625
25464
|
}
|
|
25626
25465
|
|
|
25627
25466
|
while (index < length) {
|
|
25628
|
-
|
|
25467
|
+
previous = character
|
|
25629
25468
|
character = value.charAt(index)
|
|
25630
25469
|
|
|
25631
25470
|
if (
|
|
25632
25471
|
character === marker &&
|
|
25633
25472
|
value.charAt(index + 1) === marker &&
|
|
25634
|
-
(!pedantic || !whitespace(
|
|
25473
|
+
(!pedantic || !whitespace(previous))
|
|
25635
25474
|
) {
|
|
25636
25475
|
character = value.charAt(index + 2)
|
|
25637
25476
|
|
|
@@ -25858,7 +25697,7 @@ function table(eat, value, silent) {
|
|
|
25858
25697
|
|
|
25859
25698
|
if (queue.length > 1) {
|
|
25860
25699
|
if (character) {
|
|
25861
|
-
subvalue += queue.slice(0,
|
|
25700
|
+
subvalue += queue.slice(0, -1)
|
|
25862
25701
|
queue = queue.charAt(queue.length - 1)
|
|
25863
25702
|
} else {
|
|
25864
25703
|
subvalue += queue
|
|
@@ -26058,7 +25897,10 @@ function thematicBreak(eat, value, silent) {
|
|
|
26058
25897
|
"use strict";
|
|
26059
25898
|
|
|
26060
25899
|
|
|
25900
|
+
var ccount = __webpack_require__(932)
|
|
26061
25901
|
var decode = __webpack_require__(7574)
|
|
25902
|
+
var decimal = __webpack_require__(6195)
|
|
25903
|
+
var alphabetical = __webpack_require__(6260)
|
|
26062
25904
|
var whitespace = __webpack_require__(2139)
|
|
26063
25905
|
var locate = __webpack_require__(1020)
|
|
26064
25906
|
|
|
@@ -26066,148 +25908,202 @@ module.exports = url
|
|
|
26066
25908
|
url.locator = locate
|
|
26067
25909
|
url.notInLink = true
|
|
26068
25910
|
|
|
26069
|
-
var
|
|
26070
|
-
var
|
|
26071
|
-
var
|
|
26072
|
-
var
|
|
26073
|
-
var comma = ','
|
|
26074
|
-
var
|
|
26075
|
-
var
|
|
26076
|
-
var
|
|
26077
|
-
var
|
|
26078
|
-
var
|
|
26079
|
-
var
|
|
26080
|
-
var
|
|
26081
|
-
|
|
26082
|
-
var http = 'http://'
|
|
26083
|
-
var https = 'https://'
|
|
26084
|
-
var mailto = 'mailto:'
|
|
26085
|
-
|
|
26086
|
-
var protocols = [http, https, mailto]
|
|
25911
|
+
var exclamationMark = 33 // '!'
|
|
25912
|
+
var ampersand = 38 // '&'
|
|
25913
|
+
var rightParenthesis = 41 // ')'
|
|
25914
|
+
var asterisk = 42 // '*'
|
|
25915
|
+
var comma = 44 // ','
|
|
25916
|
+
var dash = 45 // '-'
|
|
25917
|
+
var dot = 46 // '.'
|
|
25918
|
+
var colon = 58 // ':'
|
|
25919
|
+
var semicolon = 59 // ';'
|
|
25920
|
+
var questionMark = 63 // '?'
|
|
25921
|
+
var lessThan = 60 // '<'
|
|
25922
|
+
var underscore = 95 // '_'
|
|
25923
|
+
var tilde = 126 // '~'
|
|
26087
25924
|
|
|
26088
|
-
var
|
|
25925
|
+
var leftParenthesisCharacter = '('
|
|
25926
|
+
var rightParenthesisCharacter = ')'
|
|
26089
25927
|
|
|
26090
25928
|
function url(eat, value, silent) {
|
|
26091
25929
|
var self = this
|
|
26092
|
-
var
|
|
26093
|
-
var
|
|
26094
|
-
var
|
|
25930
|
+
var gfm = self.options.gfm
|
|
25931
|
+
var tokenizers = self.inlineTokenizers
|
|
25932
|
+
var length = value.length
|
|
25933
|
+
var previousDot = -1
|
|
25934
|
+
var protocolless = false
|
|
25935
|
+
var dots
|
|
25936
|
+
var lastTwoPartsStart
|
|
25937
|
+
var start
|
|
26095
25938
|
var index
|
|
26096
|
-
var
|
|
26097
|
-
var
|
|
26098
|
-
var
|
|
26099
|
-
var
|
|
26100
|
-
var
|
|
26101
|
-
var
|
|
26102
|
-
var
|
|
26103
|
-
var
|
|
25939
|
+
var pathStart
|
|
25940
|
+
var path
|
|
25941
|
+
var code
|
|
25942
|
+
var end
|
|
25943
|
+
var leftCount
|
|
25944
|
+
var rightCount
|
|
25945
|
+
var content
|
|
25946
|
+
var children
|
|
25947
|
+
var url
|
|
26104
25948
|
var exit
|
|
26105
25949
|
|
|
26106
|
-
if (!
|
|
25950
|
+
if (!gfm) {
|
|
26107
25951
|
return
|
|
26108
25952
|
}
|
|
26109
25953
|
|
|
26110
|
-
|
|
26111
|
-
|
|
25954
|
+
// `WWW.` doesn’t work.
|
|
25955
|
+
if (value.slice(0, 4) === 'www.') {
|
|
25956
|
+
protocolless = true
|
|
25957
|
+
index = 4
|
|
25958
|
+
} else if (value.slice(0, 7).toLowerCase() === 'http://') {
|
|
25959
|
+
index = 7
|
|
25960
|
+
} else if (value.slice(0, 8).toLowerCase() === 'https://') {
|
|
25961
|
+
index = 8
|
|
25962
|
+
} else {
|
|
25963
|
+
return
|
|
25964
|
+
}
|
|
26112
25965
|
|
|
26113
|
-
|
|
26114
|
-
|
|
26115
|
-
match = value.slice(0, protocol.length)
|
|
25966
|
+
// Act as if the starting boundary is a dot.
|
|
25967
|
+
previousDot = index - 1
|
|
26116
25968
|
|
|
26117
|
-
|
|
26118
|
-
|
|
26119
|
-
|
|
25969
|
+
// Parse a valid domain.
|
|
25970
|
+
start = index
|
|
25971
|
+
dots = []
|
|
25972
|
+
|
|
25973
|
+
while (index < length) {
|
|
25974
|
+
code = value.charCodeAt(index)
|
|
25975
|
+
|
|
25976
|
+
if (code === dot) {
|
|
25977
|
+
// Dots may not appear after each other.
|
|
25978
|
+
if (previousDot === index - 1) {
|
|
25979
|
+
break
|
|
25980
|
+
}
|
|
25981
|
+
|
|
25982
|
+
dots.push(index)
|
|
25983
|
+
previousDot = index
|
|
25984
|
+
index++
|
|
25985
|
+
continue
|
|
25986
|
+
}
|
|
25987
|
+
|
|
25988
|
+
if (
|
|
25989
|
+
decimal(code) ||
|
|
25990
|
+
alphabetical(code) ||
|
|
25991
|
+
code === dash ||
|
|
25992
|
+
code === underscore
|
|
25993
|
+
) {
|
|
25994
|
+
index++
|
|
25995
|
+
continue
|
|
26120
25996
|
}
|
|
25997
|
+
|
|
25998
|
+
break
|
|
26121
25999
|
}
|
|
26122
26000
|
|
|
26123
|
-
|
|
26001
|
+
// Ignore a final dot:
|
|
26002
|
+
if (code === dot) {
|
|
26003
|
+
dots.pop()
|
|
26004
|
+
index--
|
|
26005
|
+
}
|
|
26006
|
+
|
|
26007
|
+
// If there are not dots, exit.
|
|
26008
|
+
if (dots[0] === undefined) {
|
|
26124
26009
|
return
|
|
26125
26010
|
}
|
|
26126
26011
|
|
|
26127
|
-
|
|
26128
|
-
|
|
26129
|
-
|
|
26130
|
-
|
|
26012
|
+
// If there is an underscore in the last two domain parts, exit:
|
|
26013
|
+
// `www.example.c_m` and `www.ex_ample.com` are not OK, but
|
|
26014
|
+
// `www.sub_domain.example.com` is.
|
|
26015
|
+
lastTwoPartsStart = dots.length < 2 ? start : dots[dots.length - 2] + 1
|
|
26016
|
+
|
|
26017
|
+
if (value.slice(lastTwoPartsStart, index).indexOf('_') !== -1) {
|
|
26018
|
+
return
|
|
26019
|
+
}
|
|
26131
26020
|
|
|
26021
|
+
/* istanbul ignore if - never used (yet) */
|
|
26022
|
+
if (silent) {
|
|
26023
|
+
return true
|
|
26024
|
+
}
|
|
26025
|
+
|
|
26026
|
+
end = index
|
|
26027
|
+
pathStart = index
|
|
26028
|
+
|
|
26029
|
+
// Parse a path.
|
|
26132
26030
|
while (index < length) {
|
|
26133
|
-
|
|
26031
|
+
code = value.charCodeAt(index)
|
|
26134
26032
|
|
|
26135
|
-
if (whitespace(
|
|
26033
|
+
if (whitespace(code) || code === lessThan) {
|
|
26136
26034
|
break
|
|
26137
26035
|
}
|
|
26138
26036
|
|
|
26037
|
+
index++
|
|
26038
|
+
|
|
26139
26039
|
if (
|
|
26140
|
-
|
|
26141
|
-
|
|
26142
|
-
|
|
26143
|
-
|
|
26144
|
-
|
|
26145
|
-
|
|
26146
|
-
|
|
26147
|
-
|
|
26040
|
+
code === exclamationMark ||
|
|
26041
|
+
code === asterisk ||
|
|
26042
|
+
code === comma ||
|
|
26043
|
+
code === dot ||
|
|
26044
|
+
code === colon ||
|
|
26045
|
+
code === questionMark ||
|
|
26046
|
+
code === underscore ||
|
|
26047
|
+
code === tilde
|
|
26148
26048
|
) {
|
|
26149
|
-
|
|
26150
|
-
|
|
26151
|
-
|
|
26152
|
-
break
|
|
26153
|
-
}
|
|
26049
|
+
// Empty
|
|
26050
|
+
} else {
|
|
26051
|
+
end = index
|
|
26154
26052
|
}
|
|
26053
|
+
}
|
|
26155
26054
|
|
|
26156
|
-
|
|
26157
|
-
parenCount++
|
|
26158
|
-
}
|
|
26055
|
+
index = end
|
|
26159
26056
|
|
|
26160
|
-
|
|
26161
|
-
|
|
26057
|
+
// If the path ends in a closing paren, and the count of closing parens is
|
|
26058
|
+
// higher than the opening count, then remove the supefluous closing parens.
|
|
26059
|
+
if (value.charCodeAt(index - 1) === rightParenthesis) {
|
|
26060
|
+
path = value.slice(pathStart, index)
|
|
26061
|
+
leftCount = ccount(path, leftParenthesisCharacter)
|
|
26062
|
+
rightCount = ccount(path, rightParenthesisCharacter)
|
|
26162
26063
|
|
|
26163
|
-
|
|
26164
|
-
|
|
26165
|
-
|
|
26064
|
+
while (rightCount > leftCount) {
|
|
26065
|
+
index = pathStart + path.lastIndexOf(rightParenthesisCharacter)
|
|
26066
|
+
path = value.slice(pathStart, index)
|
|
26067
|
+
rightCount--
|
|
26166
26068
|
}
|
|
26167
|
-
|
|
26168
|
-
queue += character
|
|
26169
|
-
index++
|
|
26170
26069
|
}
|
|
26171
26070
|
|
|
26172
|
-
if (
|
|
26173
|
-
|
|
26174
|
-
|
|
26071
|
+
if (value.charCodeAt(index - 1) === semicolon) {
|
|
26072
|
+
// GitHub doesn’t document this, but final semicolons aren’t paret of the
|
|
26073
|
+
// URL either.
|
|
26074
|
+
index--
|
|
26175
26075
|
|
|
26176
|
-
|
|
26177
|
-
|
|
26076
|
+
// // If the path ends in what looks like an entity, it’s not part of the path.
|
|
26077
|
+
if (alphabetical(value.charCodeAt(index - 1))) {
|
|
26078
|
+
end = index - 2
|
|
26178
26079
|
|
|
26179
|
-
|
|
26180
|
-
|
|
26080
|
+
while (alphabetical(value.charCodeAt(end))) {
|
|
26081
|
+
end--
|
|
26082
|
+
}
|
|
26181
26083
|
|
|
26182
|
-
|
|
26183
|
-
|
|
26084
|
+
if (value.charCodeAt(end) === ampersand) {
|
|
26085
|
+
index = end
|
|
26086
|
+
}
|
|
26184
26087
|
}
|
|
26185
|
-
|
|
26186
|
-
content = content.slice(mailto.length)
|
|
26187
26088
|
}
|
|
26188
26089
|
|
|
26189
|
-
|
|
26190
|
-
|
|
26191
|
-
|
|
26090
|
+
content = value.slice(0, index)
|
|
26091
|
+
url = decode(content, {nonTerminated: false})
|
|
26092
|
+
|
|
26093
|
+
if (protocolless) {
|
|
26094
|
+
url = 'http://' + url
|
|
26192
26095
|
}
|
|
26193
26096
|
|
|
26194
26097
|
exit = self.enterLink()
|
|
26195
26098
|
|
|
26196
26099
|
// Temporarily remove all tokenizers except text in url.
|
|
26197
|
-
tokenizers = self.inlineTokenizers
|
|
26198
26100
|
self.inlineTokenizers = {text: tokenizers.text}
|
|
26199
|
-
|
|
26200
|
-
content = self.tokenizeInline(content, eat.now())
|
|
26201
|
-
|
|
26101
|
+
children = self.tokenizeInline(content, eat.now())
|
|
26202
26102
|
self.inlineTokenizers = tokenizers
|
|
26103
|
+
|
|
26203
26104
|
exit()
|
|
26204
26105
|
|
|
26205
|
-
return eat(
|
|
26206
|
-
type: 'link',
|
|
26207
|
-
title: null,
|
|
26208
|
-
url: decode(subvalue, {nonTerminated: false}),
|
|
26209
|
-
children: content
|
|
26210
|
-
})
|
|
26106
|
+
return eat(content)({type: 'link', title: null, url: url, children: children})
|
|
26211
26107
|
}
|
|
26212
26108
|
|
|
26213
26109
|
|
|
@@ -26265,11 +26161,15 @@ function factory(type) {
|
|
|
26265
26161
|
name = methods[index]
|
|
26266
26162
|
method = tokenizers[name]
|
|
26267
26163
|
|
|
26164
|
+
// Previously, we had constructs such as footnotes and YAML that used
|
|
26165
|
+
// these properties.
|
|
26166
|
+
// Those are now external (plus there are userland extensions), that may
|
|
26167
|
+
// still use them.
|
|
26268
26168
|
if (
|
|
26269
26169
|
method &&
|
|
26270
26170
|
/* istanbul ignore next */ (!method.onlyAtStart || self.atStart) &&
|
|
26271
|
-
(!method.notInList || !self.inList) &&
|
|
26272
|
-
(!method.notInBlock || !self.inBlock) &&
|
|
26171
|
+
/* istanbul ignore next */ (!method.notInList || !self.inList) &&
|
|
26172
|
+
/* istanbul ignore next */ (!method.notInBlock || !self.inBlock) &&
|
|
26273
26173
|
(!method.notInLink || !self.inLink)
|
|
26274
26174
|
) {
|
|
26275
26175
|
valueLength = value.length
|
|
@@ -26328,7 +26228,7 @@ function factory(type) {
|
|
|
26328
26228
|
|
|
26329
26229
|
// Done. Called when the last character is eaten to retrieve the range’s
|
|
26330
26230
|
// offsets.
|
|
26331
|
-
return function() {
|
|
26231
|
+
return function () {
|
|
26332
26232
|
var last = line + 1
|
|
26333
26233
|
|
|
26334
26234
|
while (pos < last) {
|
|
@@ -26379,10 +26279,10 @@ function factory(type) {
|
|
|
26379
26279
|
|
|
26380
26280
|
// Add the position to a node.
|
|
26381
26281
|
function update(node, indent) {
|
|
26382
|
-
var
|
|
26383
|
-
var start =
|
|
26282
|
+
var previous = node.position
|
|
26283
|
+
var start = previous ? previous.start : before
|
|
26384
26284
|
var combined = []
|
|
26385
|
-
var n =
|
|
26285
|
+
var n = previous && previous.end.line
|
|
26386
26286
|
var l = before.line
|
|
26387
26287
|
|
|
26388
26288
|
node.position = new Position(start)
|
|
@@ -26392,8 +26292,8 @@ function factory(type) {
|
|
|
26392
26292
|
// because some information, the indent between `n` and `l` wasn’t
|
|
26393
26293
|
// tracked. Luckily, that space is (should be?) empty, so we can
|
|
26394
26294
|
// safely check for it now.
|
|
26395
|
-
if (
|
|
26396
|
-
combined =
|
|
26295
|
+
if (previous && indent && previous.indent) {
|
|
26296
|
+
combined = previous.indent
|
|
26397
26297
|
|
|
26398
26298
|
if (n < l) {
|
|
26399
26299
|
while (++n < l) {
|
|
@@ -26416,21 +26316,21 @@ function factory(type) {
|
|
|
26416
26316
|
// possible.
|
|
26417
26317
|
function add(node, parent) {
|
|
26418
26318
|
var children = parent ? parent.children : tokens
|
|
26419
|
-
var
|
|
26319
|
+
var previous = children[children.length - 1]
|
|
26420
26320
|
var fn
|
|
26421
26321
|
|
|
26422
26322
|
if (
|
|
26423
|
-
|
|
26424
|
-
node.type ===
|
|
26323
|
+
previous &&
|
|
26324
|
+
node.type === previous.type &&
|
|
26425
26325
|
(node.type === 'text' || node.type === 'blockquote') &&
|
|
26426
|
-
mergeable(
|
|
26326
|
+
mergeable(previous) &&
|
|
26427
26327
|
mergeable(node)
|
|
26428
26328
|
) {
|
|
26429
26329
|
fn = node.type === 'text' ? mergeText : mergeBlockquote
|
|
26430
|
-
node = fn.call(self,
|
|
26330
|
+
node = fn.call(self, previous, node)
|
|
26431
26331
|
}
|
|
26432
26332
|
|
|
26433
|
-
if (node !==
|
|
26333
|
+
if (node !== previous) {
|
|
26434
26334
|
children.push(node)
|
|
26435
26335
|
}
|
|
26436
26336
|
|
|
@@ -26515,21 +26415,21 @@ function mergeable(node) {
|
|
|
26515
26415
|
}
|
|
26516
26416
|
|
|
26517
26417
|
// Merge two text nodes: `node` into `prev`.
|
|
26518
|
-
function mergeText(
|
|
26519
|
-
|
|
26418
|
+
function mergeText(previous, node) {
|
|
26419
|
+
previous.value += node.value
|
|
26520
26420
|
|
|
26521
|
-
return
|
|
26421
|
+
return previous
|
|
26522
26422
|
}
|
|
26523
26423
|
|
|
26524
26424
|
// Merge two blockquotes: `node` into `prev`, unless in CommonMark or gfm modes.
|
|
26525
|
-
function mergeBlockquote(
|
|
26425
|
+
function mergeBlockquote(previous, node) {
|
|
26526
26426
|
if (this.options.commonmark || this.options.gfm) {
|
|
26527
26427
|
return node
|
|
26528
26428
|
}
|
|
26529
26429
|
|
|
26530
|
-
|
|
26430
|
+
previous.children = previous.children.concat(node.children)
|
|
26531
26431
|
|
|
26532
|
-
return
|
|
26432
|
+
return previous
|
|
26533
26433
|
}
|
|
26534
26434
|
|
|
26535
26435
|
|
|
@@ -26551,26 +26451,26 @@ function factory(ctx, key) {
|
|
|
26551
26451
|
|
|
26552
26452
|
// De-escape a string using the expression at `key` in `ctx`.
|
|
26553
26453
|
function unescape(value) {
|
|
26554
|
-
var
|
|
26454
|
+
var previous = 0
|
|
26555
26455
|
var index = value.indexOf(backslash)
|
|
26556
26456
|
var escape = ctx[key]
|
|
26557
26457
|
var queue = []
|
|
26558
26458
|
var character
|
|
26559
26459
|
|
|
26560
26460
|
while (index !== -1) {
|
|
26561
|
-
queue.push(value.slice(
|
|
26562
|
-
|
|
26563
|
-
character = value.charAt(
|
|
26461
|
+
queue.push(value.slice(previous, index))
|
|
26462
|
+
previous = index + 1
|
|
26463
|
+
character = value.charAt(previous)
|
|
26564
26464
|
|
|
26565
26465
|
// If the following character is not a valid escape, add the slash.
|
|
26566
26466
|
if (!character || escape.indexOf(character) === -1) {
|
|
26567
26467
|
queue.push(backslash)
|
|
26568
26468
|
}
|
|
26569
26469
|
|
|
26570
|
-
index = value.indexOf(backslash,
|
|
26470
|
+
index = value.indexOf(backslash, previous + 1)
|
|
26571
26471
|
}
|
|
26572
26472
|
|
|
26573
|
-
queue.push(value.slice(
|
|
26473
|
+
queue.push(value.slice(previous))
|
|
26574
26474
|
|
|
26575
26475
|
return queue.join('')
|
|
26576
26476
|
}
|
|
@@ -26600,6 +26500,7 @@ function indentation(value) {
|
|
|
26600
26500
|
var character = value.charAt(index)
|
|
26601
26501
|
var stops = {}
|
|
26602
26502
|
var size
|
|
26503
|
+
var lastIndent = 0
|
|
26603
26504
|
|
|
26604
26505
|
while (character === tab || character === space) {
|
|
26605
26506
|
size = character === tab ? tabSize : spaceSize
|
|
@@ -26610,7 +26511,10 @@ function indentation(value) {
|
|
|
26610
26511
|
indent = Math.floor(indent / size) * size
|
|
26611
26512
|
}
|
|
26612
26513
|
|
|
26613
|
-
|
|
26514
|
+
while (lastIndent < indent) {
|
|
26515
|
+
stops[++lastIndent] = index
|
|
26516
|
+
}
|
|
26517
|
+
|
|
26614
26518
|
character = value.charAt(++index)
|
|
26615
26519
|
}
|
|
26616
26520
|
|
|
@@ -26670,7 +26574,7 @@ exports._ = new RegExp(
|
|
|
26670
26574
|
|
|
26671
26575
|
module.exports = interrupt
|
|
26672
26576
|
|
|
26673
|
-
function interrupt(interruptors, tokenizers, ctx,
|
|
26577
|
+
function interrupt(interruptors, tokenizers, ctx, parameters) {
|
|
26674
26578
|
var length = interruptors.length
|
|
26675
26579
|
var index = -1
|
|
26676
26580
|
var interruptor
|
|
@@ -26694,7 +26598,7 @@ function interrupt(interruptors, tokenizers, ctx, params) {
|
|
|
26694
26598
|
continue
|
|
26695
26599
|
}
|
|
26696
26600
|
|
|
26697
|
-
if (tokenizers[interruptor[0]].apply(ctx,
|
|
26601
|
+
if (tokenizers[interruptor[0]].apply(ctx, parameters)) {
|
|
26698
26602
|
return true
|
|
26699
26603
|
}
|
|
26700
26604
|
}
|
|
@@ -26736,7 +26640,6 @@ var getIndent = __webpack_require__(2299)
|
|
|
26736
26640
|
|
|
26737
26641
|
module.exports = indentation
|
|
26738
26642
|
|
|
26739
|
-
var tab = '\t'
|
|
26740
26643
|
var lineFeed = '\n'
|
|
26741
26644
|
var space = ' '
|
|
26742
26645
|
var exclamationMark = '!'
|
|
@@ -26751,7 +26654,6 @@ function indentation(value, maximum) {
|
|
|
26751
26654
|
var index
|
|
26752
26655
|
var indentation
|
|
26753
26656
|
var stops
|
|
26754
|
-
var padding
|
|
26755
26657
|
|
|
26756
26658
|
values.unshift(repeat(space, maximum) + exclamationMark)
|
|
26757
26659
|
|
|
@@ -26786,18 +26688,7 @@ function indentation(value, maximum) {
|
|
|
26786
26688
|
index--
|
|
26787
26689
|
}
|
|
26788
26690
|
|
|
26789
|
-
|
|
26790
|
-
trim(values[position]).length !== 0 &&
|
|
26791
|
-
minIndent &&
|
|
26792
|
-
index !== minIndent
|
|
26793
|
-
) {
|
|
26794
|
-
padding = tab
|
|
26795
|
-
} else {
|
|
26796
|
-
padding = ''
|
|
26797
|
-
}
|
|
26798
|
-
|
|
26799
|
-
values[position] =
|
|
26800
|
-
padding + values[position].slice(index in stops ? stops[index] + 1 : 0)
|
|
26691
|
+
values[position] = values[position].slice(stops[index] + 1)
|
|
26801
26692
|
}
|
|
26802
26693
|
}
|
|
26803
26694
|
|
|
@@ -26862,8 +26753,8 @@ function bridge(destination, options) {
|
|
|
26862
26753
|
function transformer(node, file, next) {
|
|
26863
26754
|
destination.run(mdast2hast(node, options), file, done)
|
|
26864
26755
|
|
|
26865
|
-
function done(
|
|
26866
|
-
next(
|
|
26756
|
+
function done(error) {
|
|
26757
|
+
next(error)
|
|
26867
26758
|
}
|
|
26868
26759
|
}
|
|
26869
26760
|
}
|
|
@@ -28166,7 +28057,7 @@ function enter(compiler, node) {
|
|
|
28166
28057
|
"use strict";
|
|
28167
28058
|
|
|
28168
28059
|
|
|
28169
|
-
var decode = __webpack_require__(
|
|
28060
|
+
var decode = __webpack_require__(7574)
|
|
28170
28061
|
|
|
28171
28062
|
module.exports = length
|
|
28172
28063
|
|
|
@@ -28241,7 +28132,7 @@ function label(node) {
|
|
|
28241
28132
|
|
|
28242
28133
|
/***/ }),
|
|
28243
28134
|
|
|
28244
|
-
/***/
|
|
28135
|
+
/***/ 7468:
|
|
28245
28136
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
28246
28137
|
|
|
28247
28138
|
"use strict";
|
|
@@ -28335,7 +28226,7 @@ function lineBreak() {
|
|
|
28335
28226
|
|
|
28336
28227
|
var streak = __webpack_require__(2491)
|
|
28337
28228
|
var repeat = __webpack_require__(6464)
|
|
28338
|
-
var pad = __webpack_require__(
|
|
28229
|
+
var pad = __webpack_require__(7468)
|
|
28339
28230
|
|
|
28340
28231
|
module.exports = code
|
|
28341
28232
|
|
|
@@ -28879,7 +28770,7 @@ function link(node) {
|
|
|
28879
28770
|
|
|
28880
28771
|
|
|
28881
28772
|
var repeat = __webpack_require__(6464)
|
|
28882
|
-
var pad = __webpack_require__(
|
|
28773
|
+
var pad = __webpack_require__(7468)
|
|
28883
28774
|
|
|
28884
28775
|
module.exports = listItem
|
|
28885
28776
|
|
|
@@ -29175,503 +29066,6 @@ function thematic() {
|
|
|
29175
29066
|
}
|
|
29176
29067
|
|
|
29177
29068
|
|
|
29178
|
-
/***/ }),
|
|
29179
|
-
|
|
29180
|
-
/***/ 7468:
|
|
29181
|
-
/***/ ((module) => {
|
|
29182
|
-
|
|
29183
|
-
"use strict";
|
|
29184
|
-
|
|
29185
|
-
|
|
29186
|
-
/* eslint-env browser */
|
|
29187
|
-
|
|
29188
|
-
var el
|
|
29189
|
-
|
|
29190
|
-
var semicolon = 59 // ';'
|
|
29191
|
-
|
|
29192
|
-
module.exports = decodeEntity
|
|
29193
|
-
|
|
29194
|
-
function decodeEntity(characters) {
|
|
29195
|
-
var entity = '&' + characters + ';'
|
|
29196
|
-
var char
|
|
29197
|
-
|
|
29198
|
-
el = el || document.createElement('i')
|
|
29199
|
-
el.innerHTML = entity
|
|
29200
|
-
char = el.textContent
|
|
29201
|
-
|
|
29202
|
-
// Some entities do not require the closing semicolon (`¬` - for instance),
|
|
29203
|
-
// which leads to situations where parsing the assumed entity of ¬it; will
|
|
29204
|
-
// result in the string `¬it;`. When we encounter a trailing semicolon after
|
|
29205
|
-
// parsing and the entity to decode was not a semicolon (`;`), we can
|
|
29206
|
-
// assume that the matching was incomplete
|
|
29207
|
-
if (char.charCodeAt(char.length - 1) === semicolon && characters !== 'semi') {
|
|
29208
|
-
return false
|
|
29209
|
-
}
|
|
29210
|
-
|
|
29211
|
-
// If the decoded string is equal to the input, the entity was not valid
|
|
29212
|
-
return char === entity ? false : char
|
|
29213
|
-
}
|
|
29214
|
-
|
|
29215
|
-
|
|
29216
|
-
/***/ }),
|
|
29217
|
-
|
|
29218
|
-
/***/ 4595:
|
|
29219
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
29220
|
-
|
|
29221
|
-
"use strict";
|
|
29222
|
-
|
|
29223
|
-
|
|
29224
|
-
var legacy = __webpack_require__(7452)
|
|
29225
|
-
var invalid = __webpack_require__(3580)
|
|
29226
|
-
var decimal = __webpack_require__(6195)
|
|
29227
|
-
var hexadecimal = __webpack_require__(9480)
|
|
29228
|
-
var alphanumerical = __webpack_require__(7961)
|
|
29229
|
-
var decodeEntity = __webpack_require__(7468)
|
|
29230
|
-
|
|
29231
|
-
module.exports = parseEntities
|
|
29232
|
-
|
|
29233
|
-
var own = {}.hasOwnProperty
|
|
29234
|
-
var fromCharCode = String.fromCharCode
|
|
29235
|
-
var noop = Function.prototype
|
|
29236
|
-
|
|
29237
|
-
// Default settings.
|
|
29238
|
-
var defaults = {
|
|
29239
|
-
warning: null,
|
|
29240
|
-
reference: null,
|
|
29241
|
-
text: null,
|
|
29242
|
-
warningContext: null,
|
|
29243
|
-
referenceContext: null,
|
|
29244
|
-
textContext: null,
|
|
29245
|
-
position: {},
|
|
29246
|
-
additional: null,
|
|
29247
|
-
attribute: false,
|
|
29248
|
-
nonTerminated: true
|
|
29249
|
-
}
|
|
29250
|
-
|
|
29251
|
-
// Characters.
|
|
29252
|
-
var tab = 9 // '\t'
|
|
29253
|
-
var lineFeed = 10 // '\n'
|
|
29254
|
-
var formFeed = 12 // '\f'
|
|
29255
|
-
var space = 32 // ' '
|
|
29256
|
-
var ampersand = 38 // '&'
|
|
29257
|
-
var semicolon = 59 // ';'
|
|
29258
|
-
var lessThan = 60 // '<'
|
|
29259
|
-
var equalsTo = 61 // '='
|
|
29260
|
-
var numberSign = 35 // '#'
|
|
29261
|
-
var uppercaseX = 88 // 'X'
|
|
29262
|
-
var lowercaseX = 120 // 'x'
|
|
29263
|
-
var replacementCharacter = 65533 // '�'
|
|
29264
|
-
|
|
29265
|
-
// Reference types.
|
|
29266
|
-
var name = 'named'
|
|
29267
|
-
var hexa = 'hexadecimal'
|
|
29268
|
-
var deci = 'decimal'
|
|
29269
|
-
|
|
29270
|
-
// Map of bases.
|
|
29271
|
-
var bases = {}
|
|
29272
|
-
|
|
29273
|
-
bases[hexa] = 16
|
|
29274
|
-
bases[deci] = 10
|
|
29275
|
-
|
|
29276
|
-
// Map of types to tests.
|
|
29277
|
-
// Each type of character reference accepts different characters.
|
|
29278
|
-
// This test is used to detect whether a reference has ended (as the semicolon
|
|
29279
|
-
// is not strictly needed).
|
|
29280
|
-
var tests = {}
|
|
29281
|
-
|
|
29282
|
-
tests[name] = alphanumerical
|
|
29283
|
-
tests[deci] = decimal
|
|
29284
|
-
tests[hexa] = hexadecimal
|
|
29285
|
-
|
|
29286
|
-
// Warning types.
|
|
29287
|
-
var namedNotTerminated = 1
|
|
29288
|
-
var numericNotTerminated = 2
|
|
29289
|
-
var namedEmpty = 3
|
|
29290
|
-
var numericEmpty = 4
|
|
29291
|
-
var namedUnknown = 5
|
|
29292
|
-
var numericDisallowed = 6
|
|
29293
|
-
var numericProhibited = 7
|
|
29294
|
-
|
|
29295
|
-
// Warning messages.
|
|
29296
|
-
var messages = {}
|
|
29297
|
-
|
|
29298
|
-
messages[namedNotTerminated] =
|
|
29299
|
-
'Named character references must be terminated by a semicolon'
|
|
29300
|
-
messages[numericNotTerminated] =
|
|
29301
|
-
'Numeric character references must be terminated by a semicolon'
|
|
29302
|
-
messages[namedEmpty] = 'Named character references cannot be empty'
|
|
29303
|
-
messages[numericEmpty] = 'Numeric character references cannot be empty'
|
|
29304
|
-
messages[namedUnknown] = 'Named character references must be known'
|
|
29305
|
-
messages[numericDisallowed] =
|
|
29306
|
-
'Numeric character references cannot be disallowed'
|
|
29307
|
-
messages[numericProhibited] =
|
|
29308
|
-
'Numeric character references cannot be outside the permissible Unicode range'
|
|
29309
|
-
|
|
29310
|
-
// Wrap to ensure clean parameters are given to `parse`.
|
|
29311
|
-
function parseEntities(value, options) {
|
|
29312
|
-
var settings = {}
|
|
29313
|
-
var option
|
|
29314
|
-
var key
|
|
29315
|
-
|
|
29316
|
-
if (!options) {
|
|
29317
|
-
options = {}
|
|
29318
|
-
}
|
|
29319
|
-
|
|
29320
|
-
for (key in defaults) {
|
|
29321
|
-
option = options[key]
|
|
29322
|
-
settings[key] =
|
|
29323
|
-
option === null || option === undefined ? defaults[key] : option
|
|
29324
|
-
}
|
|
29325
|
-
|
|
29326
|
-
if (settings.position.indent || settings.position.start) {
|
|
29327
|
-
settings.indent = settings.position.indent || []
|
|
29328
|
-
settings.position = settings.position.start
|
|
29329
|
-
}
|
|
29330
|
-
|
|
29331
|
-
return parse(value, settings)
|
|
29332
|
-
}
|
|
29333
|
-
|
|
29334
|
-
// Parse entities.
|
|
29335
|
-
// eslint-disable-next-line complexity
|
|
29336
|
-
function parse(value, settings) {
|
|
29337
|
-
var additional = settings.additional
|
|
29338
|
-
var nonTerminated = settings.nonTerminated
|
|
29339
|
-
var handleText = settings.text
|
|
29340
|
-
var handleReference = settings.reference
|
|
29341
|
-
var handleWarning = settings.warning
|
|
29342
|
-
var textContext = settings.textContext
|
|
29343
|
-
var referenceContext = settings.referenceContext
|
|
29344
|
-
var warningContext = settings.warningContext
|
|
29345
|
-
var pos = settings.position
|
|
29346
|
-
var indent = settings.indent || []
|
|
29347
|
-
var length = value.length
|
|
29348
|
-
var index = 0
|
|
29349
|
-
var lines = -1
|
|
29350
|
-
var column = pos.column || 1
|
|
29351
|
-
var line = pos.line || 1
|
|
29352
|
-
var queue = ''
|
|
29353
|
-
var result = []
|
|
29354
|
-
var entityCharacters
|
|
29355
|
-
var namedEntity
|
|
29356
|
-
var terminated
|
|
29357
|
-
var characters
|
|
29358
|
-
var character
|
|
29359
|
-
var reference
|
|
29360
|
-
var following
|
|
29361
|
-
var warning
|
|
29362
|
-
var reason
|
|
29363
|
-
var output
|
|
29364
|
-
var entity
|
|
29365
|
-
var begin
|
|
29366
|
-
var start
|
|
29367
|
-
var type
|
|
29368
|
-
var test
|
|
29369
|
-
var prev
|
|
29370
|
-
var next
|
|
29371
|
-
var diff
|
|
29372
|
-
var end
|
|
29373
|
-
|
|
29374
|
-
if (typeof additional === 'string') {
|
|
29375
|
-
additional = additional.charCodeAt(0)
|
|
29376
|
-
}
|
|
29377
|
-
|
|
29378
|
-
// Cache the current point.
|
|
29379
|
-
prev = now()
|
|
29380
|
-
|
|
29381
|
-
// Wrap `handleWarning`.
|
|
29382
|
-
warning = handleWarning ? parseError : noop
|
|
29383
|
-
|
|
29384
|
-
// Ensure the algorithm walks over the first character and the end
|
|
29385
|
-
// (inclusive).
|
|
29386
|
-
index--
|
|
29387
|
-
length++
|
|
29388
|
-
|
|
29389
|
-
while (++index < length) {
|
|
29390
|
-
// If the previous character was a newline.
|
|
29391
|
-
if (character === lineFeed) {
|
|
29392
|
-
column = indent[lines] || 1
|
|
29393
|
-
}
|
|
29394
|
-
|
|
29395
|
-
character = value.charCodeAt(index)
|
|
29396
|
-
|
|
29397
|
-
if (character === ampersand) {
|
|
29398
|
-
following = value.charCodeAt(index + 1)
|
|
29399
|
-
|
|
29400
|
-
// The behaviour depends on the identity of the next character.
|
|
29401
|
-
if (
|
|
29402
|
-
following === tab ||
|
|
29403
|
-
following === lineFeed ||
|
|
29404
|
-
following === formFeed ||
|
|
29405
|
-
following === space ||
|
|
29406
|
-
following === ampersand ||
|
|
29407
|
-
following === lessThan ||
|
|
29408
|
-
following !== following ||
|
|
29409
|
-
(additional && following === additional)
|
|
29410
|
-
) {
|
|
29411
|
-
// Not a character reference.
|
|
29412
|
-
// No characters are consumed, and nothing is returned.
|
|
29413
|
-
// This is not an error, either.
|
|
29414
|
-
queue += fromCharCode(character)
|
|
29415
|
-
column++
|
|
29416
|
-
|
|
29417
|
-
continue
|
|
29418
|
-
}
|
|
29419
|
-
|
|
29420
|
-
start = index + 1
|
|
29421
|
-
begin = start
|
|
29422
|
-
end = start
|
|
29423
|
-
|
|
29424
|
-
if (following === numberSign) {
|
|
29425
|
-
// Numerical entity.
|
|
29426
|
-
end = ++begin
|
|
29427
|
-
|
|
29428
|
-
// The behaviour further depends on the next character.
|
|
29429
|
-
following = value.charCodeAt(end)
|
|
29430
|
-
|
|
29431
|
-
if (following === uppercaseX || following === lowercaseX) {
|
|
29432
|
-
// ASCII hex digits.
|
|
29433
|
-
type = hexa
|
|
29434
|
-
end = ++begin
|
|
29435
|
-
} else {
|
|
29436
|
-
// ASCII digits.
|
|
29437
|
-
type = deci
|
|
29438
|
-
}
|
|
29439
|
-
} else {
|
|
29440
|
-
// Named entity.
|
|
29441
|
-
type = name
|
|
29442
|
-
}
|
|
29443
|
-
|
|
29444
|
-
entityCharacters = ''
|
|
29445
|
-
entity = ''
|
|
29446
|
-
characters = ''
|
|
29447
|
-
test = tests[type]
|
|
29448
|
-
end--
|
|
29449
|
-
|
|
29450
|
-
while (++end < length) {
|
|
29451
|
-
following = value.charCodeAt(end)
|
|
29452
|
-
|
|
29453
|
-
if (!test(following)) {
|
|
29454
|
-
break
|
|
29455
|
-
}
|
|
29456
|
-
|
|
29457
|
-
characters += fromCharCode(following)
|
|
29458
|
-
|
|
29459
|
-
// Check if we can match a legacy named reference.
|
|
29460
|
-
// If so, we cache that as the last viable named reference.
|
|
29461
|
-
// This ensures we do not need to walk backwards later.
|
|
29462
|
-
if (type === name && own.call(legacy, characters)) {
|
|
29463
|
-
entityCharacters = characters
|
|
29464
|
-
entity = legacy[characters]
|
|
29465
|
-
}
|
|
29466
|
-
}
|
|
29467
|
-
|
|
29468
|
-
terminated = value.charCodeAt(end) === semicolon
|
|
29469
|
-
|
|
29470
|
-
if (terminated) {
|
|
29471
|
-
end++
|
|
29472
|
-
|
|
29473
|
-
namedEntity = type === name ? decodeEntity(characters) : false
|
|
29474
|
-
|
|
29475
|
-
if (namedEntity) {
|
|
29476
|
-
entityCharacters = characters
|
|
29477
|
-
entity = namedEntity
|
|
29478
|
-
}
|
|
29479
|
-
}
|
|
29480
|
-
|
|
29481
|
-
diff = 1 + end - start
|
|
29482
|
-
|
|
29483
|
-
if (!terminated && !nonTerminated) {
|
|
29484
|
-
// Empty.
|
|
29485
|
-
} else if (!characters) {
|
|
29486
|
-
// An empty (possible) entity is valid, unless it’s numeric (thus an
|
|
29487
|
-
// ampersand followed by an octothorp).
|
|
29488
|
-
if (type !== name) {
|
|
29489
|
-
warning(numericEmpty, diff)
|
|
29490
|
-
}
|
|
29491
|
-
} else if (type === name) {
|
|
29492
|
-
// An ampersand followed by anything unknown, and not terminated, is
|
|
29493
|
-
// invalid.
|
|
29494
|
-
if (terminated && !entity) {
|
|
29495
|
-
warning(namedUnknown, 1)
|
|
29496
|
-
} else {
|
|
29497
|
-
// If theres something after an entity name which is not known, cap
|
|
29498
|
-
// the reference.
|
|
29499
|
-
if (entityCharacters !== characters) {
|
|
29500
|
-
end = begin + entityCharacters.length
|
|
29501
|
-
diff = 1 + end - begin
|
|
29502
|
-
terminated = false
|
|
29503
|
-
}
|
|
29504
|
-
|
|
29505
|
-
// If the reference is not terminated, warn.
|
|
29506
|
-
if (!terminated) {
|
|
29507
|
-
reason = entityCharacters ? namedNotTerminated : namedEmpty
|
|
29508
|
-
|
|
29509
|
-
if (settings.attribute) {
|
|
29510
|
-
following = value.charCodeAt(end)
|
|
29511
|
-
|
|
29512
|
-
if (following === equalsTo) {
|
|
29513
|
-
warning(reason, diff)
|
|
29514
|
-
entity = null
|
|
29515
|
-
} else if (alphanumerical(following)) {
|
|
29516
|
-
entity = null
|
|
29517
|
-
} else {
|
|
29518
|
-
warning(reason, diff)
|
|
29519
|
-
}
|
|
29520
|
-
} else {
|
|
29521
|
-
warning(reason, diff)
|
|
29522
|
-
}
|
|
29523
|
-
}
|
|
29524
|
-
}
|
|
29525
|
-
|
|
29526
|
-
reference = entity
|
|
29527
|
-
} else {
|
|
29528
|
-
if (!terminated) {
|
|
29529
|
-
// All non-terminated numeric entities are not rendered, and trigger a
|
|
29530
|
-
// warning.
|
|
29531
|
-
warning(numericNotTerminated, diff)
|
|
29532
|
-
}
|
|
29533
|
-
|
|
29534
|
-
// When terminated and number, parse as either hexadecimal or decimal.
|
|
29535
|
-
reference = parseInt(characters, bases[type])
|
|
29536
|
-
|
|
29537
|
-
// Trigger a warning when the parsed number is prohibited, and replace
|
|
29538
|
-
// with replacement character.
|
|
29539
|
-
if (prohibited(reference)) {
|
|
29540
|
-
warning(numericProhibited, diff)
|
|
29541
|
-
reference = fromCharCode(replacementCharacter)
|
|
29542
|
-
} else if (reference in invalid) {
|
|
29543
|
-
// Trigger a warning when the parsed number is disallowed, and replace
|
|
29544
|
-
// by an alternative.
|
|
29545
|
-
warning(numericDisallowed, diff)
|
|
29546
|
-
reference = invalid[reference]
|
|
29547
|
-
} else {
|
|
29548
|
-
// Parse the number.
|
|
29549
|
-
output = ''
|
|
29550
|
-
|
|
29551
|
-
// Trigger a warning when the parsed number should not be used.
|
|
29552
|
-
if (disallowed(reference)) {
|
|
29553
|
-
warning(numericDisallowed, diff)
|
|
29554
|
-
}
|
|
29555
|
-
|
|
29556
|
-
// Stringify the number.
|
|
29557
|
-
if (reference > 0xffff) {
|
|
29558
|
-
reference -= 0x10000
|
|
29559
|
-
output += fromCharCode((reference >>> (10 & 0x3ff)) | 0xd800)
|
|
29560
|
-
reference = 0xdc00 | (reference & 0x3ff)
|
|
29561
|
-
}
|
|
29562
|
-
|
|
29563
|
-
reference = output + fromCharCode(reference)
|
|
29564
|
-
}
|
|
29565
|
-
}
|
|
29566
|
-
|
|
29567
|
-
// Found it!
|
|
29568
|
-
// First eat the queued characters as normal text, then eat an entity.
|
|
29569
|
-
if (reference) {
|
|
29570
|
-
flush()
|
|
29571
|
-
|
|
29572
|
-
prev = now()
|
|
29573
|
-
index = end - 1
|
|
29574
|
-
column += end - start + 1
|
|
29575
|
-
result.push(reference)
|
|
29576
|
-
next = now()
|
|
29577
|
-
next.offset++
|
|
29578
|
-
|
|
29579
|
-
if (handleReference) {
|
|
29580
|
-
handleReference.call(
|
|
29581
|
-
referenceContext,
|
|
29582
|
-
reference,
|
|
29583
|
-
{start: prev, end: next},
|
|
29584
|
-
value.slice(start - 1, end)
|
|
29585
|
-
)
|
|
29586
|
-
}
|
|
29587
|
-
|
|
29588
|
-
prev = next
|
|
29589
|
-
} else {
|
|
29590
|
-
// If we could not find a reference, queue the checked characters (as
|
|
29591
|
-
// normal characters), and move the pointer to their end.
|
|
29592
|
-
// This is possible because we can be certain neither newlines nor
|
|
29593
|
-
// ampersands are included.
|
|
29594
|
-
characters = value.slice(start - 1, end)
|
|
29595
|
-
queue += characters
|
|
29596
|
-
column += characters.length
|
|
29597
|
-
index = end - 1
|
|
29598
|
-
}
|
|
29599
|
-
} else {
|
|
29600
|
-
// Handle anything other than an ampersand, including newlines and EOF.
|
|
29601
|
-
if (
|
|
29602
|
-
character === 10 // Line feed
|
|
29603
|
-
) {
|
|
29604
|
-
line++
|
|
29605
|
-
lines++
|
|
29606
|
-
column = 0
|
|
29607
|
-
}
|
|
29608
|
-
|
|
29609
|
-
if (character === character) {
|
|
29610
|
-
queue += fromCharCode(character)
|
|
29611
|
-
column++
|
|
29612
|
-
} else {
|
|
29613
|
-
flush()
|
|
29614
|
-
}
|
|
29615
|
-
}
|
|
29616
|
-
}
|
|
29617
|
-
|
|
29618
|
-
// Return the reduced nodes.
|
|
29619
|
-
return result.join('')
|
|
29620
|
-
|
|
29621
|
-
// Get current position.
|
|
29622
|
-
function now() {
|
|
29623
|
-
return {
|
|
29624
|
-
line: line,
|
|
29625
|
-
column: column,
|
|
29626
|
-
offset: index + (pos.offset || 0)
|
|
29627
|
-
}
|
|
29628
|
-
}
|
|
29629
|
-
|
|
29630
|
-
// “Throw” a parse-error: a warning.
|
|
29631
|
-
function parseError(code, offset) {
|
|
29632
|
-
var position = now()
|
|
29633
|
-
|
|
29634
|
-
position.column += offset
|
|
29635
|
-
position.offset += offset
|
|
29636
|
-
|
|
29637
|
-
handleWarning.call(warningContext, messages[code], position, code)
|
|
29638
|
-
}
|
|
29639
|
-
|
|
29640
|
-
// Flush `queue` (normal text).
|
|
29641
|
-
// Macro invoked before each entity and at the end of `value`.
|
|
29642
|
-
// Does nothing when `queue` is empty.
|
|
29643
|
-
function flush() {
|
|
29644
|
-
if (queue) {
|
|
29645
|
-
result.push(queue)
|
|
29646
|
-
|
|
29647
|
-
if (handleText) {
|
|
29648
|
-
handleText.call(textContext, queue, {start: prev, end: now()})
|
|
29649
|
-
}
|
|
29650
|
-
|
|
29651
|
-
queue = ''
|
|
29652
|
-
}
|
|
29653
|
-
}
|
|
29654
|
-
}
|
|
29655
|
-
|
|
29656
|
-
// Check if `character` is outside the permissible unicode range.
|
|
29657
|
-
function prohibited(code) {
|
|
29658
|
-
return (code >= 0xd800 && code <= 0xdfff) || code > 0x10ffff
|
|
29659
|
-
}
|
|
29660
|
-
|
|
29661
|
-
// Check if `character` is disallowed.
|
|
29662
|
-
function disallowed(code) {
|
|
29663
|
-
return (
|
|
29664
|
-
(code >= 0x0001 && code <= 0x0008) ||
|
|
29665
|
-
code === 0x000b ||
|
|
29666
|
-
(code >= 0x000d && code <= 0x001f) ||
|
|
29667
|
-
(code >= 0x007f && code <= 0x009f) ||
|
|
29668
|
-
(code >= 0xfdd0 && code <= 0xfdef) ||
|
|
29669
|
-
(code & 0xffff) === 0xffff ||
|
|
29670
|
-
(code & 0xffff) === 0xfffe
|
|
29671
|
-
)
|
|
29672
|
-
}
|
|
29673
|
-
|
|
29674
|
-
|
|
29675
29069
|
/***/ }),
|
|
29676
29070
|
|
|
29677
29071
|
/***/ 7089:
|
|
@@ -30232,24 +29626,6 @@ module.exports = function () {
|
|
|
30232
29626
|
};
|
|
30233
29627
|
|
|
30234
29628
|
|
|
30235
|
-
/***/ }),
|
|
30236
|
-
|
|
30237
|
-
/***/ 6221:
|
|
30238
|
-
/***/ ((module) => {
|
|
30239
|
-
|
|
30240
|
-
"use strict";
|
|
30241
|
-
|
|
30242
|
-
|
|
30243
|
-
module.exports = trimLines
|
|
30244
|
-
|
|
30245
|
-
var ws = /[ \t]*\n+[ \t]*/g
|
|
30246
|
-
var newline = '\n'
|
|
30247
|
-
|
|
30248
|
-
function trimLines(value) {
|
|
30249
|
-
return String(value).replace(ws, newline)
|
|
30250
|
-
}
|
|
30251
|
-
|
|
30252
|
-
|
|
30253
29629
|
/***/ }),
|
|
30254
29630
|
|
|
30255
29631
|
/***/ 7257:
|
|
@@ -30519,11 +29895,12 @@ function unherit(Super) {
|
|
|
30519
29895
|
"use strict";
|
|
30520
29896
|
|
|
30521
29897
|
|
|
30522
|
-
var extend = __webpack_require__(4470)
|
|
30523
29898
|
var bail = __webpack_require__(8841)
|
|
30524
|
-
var
|
|
30525
|
-
var
|
|
29899
|
+
var buffer = __webpack_require__(8738)
|
|
29900
|
+
var extend = __webpack_require__(4470)
|
|
30526
29901
|
var plain = __webpack_require__(8980)
|
|
29902
|
+
var trough = __webpack_require__(8281)
|
|
29903
|
+
var vfile = __webpack_require__(939)
|
|
30527
29904
|
|
|
30528
29905
|
// Expose a frozen processor.
|
|
30529
29906
|
module.exports = unified().freeze()
|
|
@@ -30544,9 +29921,9 @@ function pipelineParse(p, ctx) {
|
|
|
30544
29921
|
function pipelineRun(p, ctx, next) {
|
|
30545
29922
|
p.run(ctx.tree, ctx.file, done)
|
|
30546
29923
|
|
|
30547
|
-
function done(
|
|
30548
|
-
if (
|
|
30549
|
-
next(
|
|
29924
|
+
function done(error, tree, file) {
|
|
29925
|
+
if (error) {
|
|
29926
|
+
next(error)
|
|
30550
29927
|
} else {
|
|
30551
29928
|
ctx.tree = tree
|
|
30552
29929
|
ctx.file = file
|
|
@@ -30556,7 +29933,19 @@ function pipelineRun(p, ctx, next) {
|
|
|
30556
29933
|
}
|
|
30557
29934
|
|
|
30558
29935
|
function pipelineStringify(p, ctx) {
|
|
30559
|
-
|
|
29936
|
+
var result = p.stringify(ctx.tree, ctx.file)
|
|
29937
|
+
|
|
29938
|
+
if (result === undefined || result === null) {
|
|
29939
|
+
// Empty.
|
|
29940
|
+
} else if (typeof result === 'string' || buffer(result)) {
|
|
29941
|
+
if ('value' in ctx.file) {
|
|
29942
|
+
ctx.file.value = result
|
|
29943
|
+
}
|
|
29944
|
+
|
|
29945
|
+
ctx.file.contents = result
|
|
29946
|
+
} else {
|
|
29947
|
+
ctx.file.result = result
|
|
29948
|
+
}
|
|
30560
29949
|
}
|
|
30561
29950
|
|
|
30562
29951
|
// Function to create the first processor.
|
|
@@ -30564,8 +29953,8 @@ function unified() {
|
|
|
30564
29953
|
var attachers = []
|
|
30565
29954
|
var transformers = trough()
|
|
30566
29955
|
var namespace = {}
|
|
30567
|
-
var frozen = false
|
|
30568
29956
|
var freezeIndex = -1
|
|
29957
|
+
var frozen
|
|
30569
29958
|
|
|
30570
29959
|
// Data management.
|
|
30571
29960
|
processor.data = data
|
|
@@ -30591,10 +29980,9 @@ function unified() {
|
|
|
30591
29980
|
// Create a new processor based on the processor in the current scope.
|
|
30592
29981
|
function processor() {
|
|
30593
29982
|
var destination = unified()
|
|
30594
|
-
var length = attachers.length
|
|
30595
29983
|
var index = -1
|
|
30596
29984
|
|
|
30597
|
-
while (++index < length) {
|
|
29985
|
+
while (++index < attachers.length) {
|
|
30598
29986
|
destination.use.apply(null, attachers[index])
|
|
30599
29987
|
}
|
|
30600
29988
|
|
|
@@ -30612,8 +30000,6 @@ function unified() {
|
|
|
30612
30000
|
// In essence, always invoke this when exporting a processor.
|
|
30613
30001
|
function freeze() {
|
|
30614
30002
|
var values
|
|
30615
|
-
var plugin
|
|
30616
|
-
var options
|
|
30617
30003
|
var transformer
|
|
30618
30004
|
|
|
30619
30005
|
if (frozen) {
|
|
@@ -30622,19 +30008,16 @@ function unified() {
|
|
|
30622
30008
|
|
|
30623
30009
|
while (++freezeIndex < attachers.length) {
|
|
30624
30010
|
values = attachers[freezeIndex]
|
|
30625
|
-
plugin = values[0]
|
|
30626
|
-
options = values[1]
|
|
30627
|
-
transformer = null
|
|
30628
30011
|
|
|
30629
|
-
if (
|
|
30012
|
+
if (values[1] === false) {
|
|
30630
30013
|
continue
|
|
30631
30014
|
}
|
|
30632
30015
|
|
|
30633
|
-
if (
|
|
30016
|
+
if (values[1] === true) {
|
|
30634
30017
|
values[1] = undefined
|
|
30635
30018
|
}
|
|
30636
30019
|
|
|
30637
|
-
transformer =
|
|
30020
|
+
transformer = values[0].apply(processor, values.slice(1))
|
|
30638
30021
|
|
|
30639
30022
|
if (typeof transformer === 'function') {
|
|
30640
30023
|
transformers.use(transformer)
|
|
@@ -30654,9 +30037,7 @@ function unified() {
|
|
|
30654
30037
|
// Set `key`.
|
|
30655
30038
|
if (arguments.length === 2) {
|
|
30656
30039
|
assertUnfrozen('data', frozen)
|
|
30657
|
-
|
|
30658
30040
|
namespace[key] = value
|
|
30659
|
-
|
|
30660
30041
|
return processor
|
|
30661
30042
|
}
|
|
30662
30043
|
|
|
@@ -30730,16 +30111,12 @@ function unified() {
|
|
|
30730
30111
|
}
|
|
30731
30112
|
|
|
30732
30113
|
function addList(plugins) {
|
|
30733
|
-
var
|
|
30734
|
-
var index
|
|
30114
|
+
var index = -1
|
|
30735
30115
|
|
|
30736
30116
|
if (plugins === null || plugins === undefined) {
|
|
30737
30117
|
// Empty.
|
|
30738
30118
|
} else if (typeof plugins === 'object' && 'length' in plugins) {
|
|
30739
|
-
|
|
30740
|
-
index = -1
|
|
30741
|
-
|
|
30742
|
-
while (++index < length) {
|
|
30119
|
+
while (++index < plugins.length) {
|
|
30743
30120
|
add(plugins[index])
|
|
30744
30121
|
}
|
|
30745
30122
|
} else {
|
|
@@ -30752,7 +30129,7 @@ function unified() {
|
|
|
30752
30129
|
|
|
30753
30130
|
if (entry) {
|
|
30754
30131
|
if (plain(entry[1]) && plain(value)) {
|
|
30755
|
-
value = extend(entry[1], value)
|
|
30132
|
+
value = extend(true, entry[1], value)
|
|
30756
30133
|
}
|
|
30757
30134
|
|
|
30758
30135
|
entry[1] = value
|
|
@@ -30763,15 +30140,11 @@ function unified() {
|
|
|
30763
30140
|
}
|
|
30764
30141
|
|
|
30765
30142
|
function find(plugin) {
|
|
30766
|
-
var length = attachers.length
|
|
30767
30143
|
var index = -1
|
|
30768
|
-
var entry
|
|
30769
30144
|
|
|
30770
|
-
while (++index < length) {
|
|
30771
|
-
|
|
30772
|
-
|
|
30773
|
-
if (entry[0] === plugin) {
|
|
30774
|
-
return entry
|
|
30145
|
+
while (++index < attachers.length) {
|
|
30146
|
+
if (attachers[index][0] === plugin) {
|
|
30147
|
+
return attachers[index]
|
|
30775
30148
|
}
|
|
30776
30149
|
}
|
|
30777
30150
|
}
|
|
@@ -30813,10 +30186,10 @@ function unified() {
|
|
|
30813
30186
|
function executor(resolve, reject) {
|
|
30814
30187
|
transformers.run(node, vfile(file), done)
|
|
30815
30188
|
|
|
30816
|
-
function done(
|
|
30189
|
+
function done(error, tree, file) {
|
|
30817
30190
|
tree = tree || node
|
|
30818
|
-
if (
|
|
30819
|
-
reject(
|
|
30191
|
+
if (error) {
|
|
30192
|
+
reject(error)
|
|
30820
30193
|
} else if (resolve) {
|
|
30821
30194
|
resolve(tree)
|
|
30822
30195
|
} else {
|
|
@@ -30829,8 +30202,8 @@ function unified() {
|
|
|
30829
30202
|
// Run transforms on a unist node representation of a file (in string or
|
|
30830
30203
|
// vfile representation), sync.
|
|
30831
30204
|
function runSync(node, file) {
|
|
30832
|
-
var complete = false
|
|
30833
30205
|
var result
|
|
30206
|
+
var complete
|
|
30834
30207
|
|
|
30835
30208
|
run(node, file, done)
|
|
30836
30209
|
|
|
@@ -30838,10 +30211,10 @@ function unified() {
|
|
|
30838
30211
|
|
|
30839
30212
|
return result
|
|
30840
30213
|
|
|
30841
|
-
function done(
|
|
30214
|
+
function done(error, tree) {
|
|
30842
30215
|
complete = true
|
|
30843
|
-
bail(err)
|
|
30844
30216
|
result = tree
|
|
30217
|
+
bail(error)
|
|
30845
30218
|
}
|
|
30846
30219
|
}
|
|
30847
30220
|
|
|
@@ -30883,9 +30256,9 @@ function unified() {
|
|
|
30883
30256
|
|
|
30884
30257
|
pipeline.run(processor, {file: file}, done)
|
|
30885
30258
|
|
|
30886
|
-
function done(
|
|
30887
|
-
if (
|
|
30888
|
-
reject(
|
|
30259
|
+
function done(error) {
|
|
30260
|
+
if (error) {
|
|
30261
|
+
reject(error)
|
|
30889
30262
|
} else if (resolve) {
|
|
30890
30263
|
resolve(file)
|
|
30891
30264
|
} else {
|
|
@@ -30897,8 +30270,8 @@ function unified() {
|
|
|
30897
30270
|
|
|
30898
30271
|
// Process the given document (in string or vfile representation), sync.
|
|
30899
30272
|
function processSync(doc) {
|
|
30900
|
-
var complete = false
|
|
30901
30273
|
var file
|
|
30274
|
+
var complete
|
|
30902
30275
|
|
|
30903
30276
|
freeze()
|
|
30904
30277
|
assertParser('processSync', processor.Parser)
|
|
@@ -30911,9 +30284,9 @@ function unified() {
|
|
|
30911
30284
|
|
|
30912
30285
|
return file
|
|
30913
30286
|
|
|
30914
|
-
function done(
|
|
30287
|
+
function done(error) {
|
|
30915
30288
|
complete = true
|
|
30916
|
-
bail(
|
|
30289
|
+
bail(error)
|
|
30917
30290
|
}
|
|
30918
30291
|
}
|
|
30919
30292
|
}
|
|
@@ -31055,15 +30428,16 @@ function flatMap(ast, fn) {
|
|
|
31055
30428
|
module.exports = generated
|
|
31056
30429
|
|
|
31057
30430
|
function generated(node) {
|
|
31058
|
-
|
|
31059
|
-
|
|
31060
|
-
|
|
31061
|
-
|
|
31062
|
-
|
|
31063
|
-
|
|
31064
|
-
|
|
31065
|
-
|
|
31066
|
-
|
|
30431
|
+
return (
|
|
30432
|
+
!node ||
|
|
30433
|
+
!node.position ||
|
|
30434
|
+
!node.position.start ||
|
|
30435
|
+
!node.position.start.line ||
|
|
30436
|
+
!node.position.start.column ||
|
|
30437
|
+
!node.position.end ||
|
|
30438
|
+
!node.position.end.line ||
|
|
30439
|
+
!node.position.end.column
|
|
30440
|
+
)
|
|
31067
30441
|
}
|
|
31068
30442
|
|
|
31069
30443
|
|
|
@@ -31225,6 +30599,203 @@ function soft(node) {
|
|
|
31225
30599
|
}
|
|
31226
30600
|
|
|
31227
30601
|
|
|
30602
|
+
/***/ }),
|
|
30603
|
+
|
|
30604
|
+
/***/ 7627:
|
|
30605
|
+
/***/ ((module) => {
|
|
30606
|
+
|
|
30607
|
+
"use strict";
|
|
30608
|
+
|
|
30609
|
+
|
|
30610
|
+
module.exports = convert
|
|
30611
|
+
|
|
30612
|
+
function convert(test) {
|
|
30613
|
+
if (test == null) {
|
|
30614
|
+
return ok
|
|
30615
|
+
}
|
|
30616
|
+
|
|
30617
|
+
if (typeof test === 'string') {
|
|
30618
|
+
return typeFactory(test)
|
|
30619
|
+
}
|
|
30620
|
+
|
|
30621
|
+
if (typeof test === 'object') {
|
|
30622
|
+
return 'length' in test ? anyFactory(test) : allFactory(test)
|
|
30623
|
+
}
|
|
30624
|
+
|
|
30625
|
+
if (typeof test === 'function') {
|
|
30626
|
+
return test
|
|
30627
|
+
}
|
|
30628
|
+
|
|
30629
|
+
throw new Error('Expected function, string, or object as test')
|
|
30630
|
+
}
|
|
30631
|
+
|
|
30632
|
+
// Utility assert each property in `test` is represented in `node`, and each
|
|
30633
|
+
// values are strictly equal.
|
|
30634
|
+
function allFactory(test) {
|
|
30635
|
+
return all
|
|
30636
|
+
|
|
30637
|
+
function all(node) {
|
|
30638
|
+
var key
|
|
30639
|
+
|
|
30640
|
+
for (key in test) {
|
|
30641
|
+
if (node[key] !== test[key]) return false
|
|
30642
|
+
}
|
|
30643
|
+
|
|
30644
|
+
return true
|
|
30645
|
+
}
|
|
30646
|
+
}
|
|
30647
|
+
|
|
30648
|
+
function anyFactory(tests) {
|
|
30649
|
+
var checks = []
|
|
30650
|
+
var index = -1
|
|
30651
|
+
|
|
30652
|
+
while (++index < tests.length) {
|
|
30653
|
+
checks[index] = convert(tests[index])
|
|
30654
|
+
}
|
|
30655
|
+
|
|
30656
|
+
return any
|
|
30657
|
+
|
|
30658
|
+
function any() {
|
|
30659
|
+
var index = -1
|
|
30660
|
+
|
|
30661
|
+
while (++index < checks.length) {
|
|
30662
|
+
if (checks[index].apply(this, arguments)) {
|
|
30663
|
+
return true
|
|
30664
|
+
}
|
|
30665
|
+
}
|
|
30666
|
+
|
|
30667
|
+
return false
|
|
30668
|
+
}
|
|
30669
|
+
}
|
|
30670
|
+
|
|
30671
|
+
// Utility to convert a string into a function which checks a given node’s type
|
|
30672
|
+
// for said string.
|
|
30673
|
+
function typeFactory(test) {
|
|
30674
|
+
return type
|
|
30675
|
+
|
|
30676
|
+
function type(node) {
|
|
30677
|
+
return Boolean(node && node.type === test)
|
|
30678
|
+
}
|
|
30679
|
+
}
|
|
30680
|
+
|
|
30681
|
+
// Utility to return true.
|
|
30682
|
+
function ok() {
|
|
30683
|
+
return true
|
|
30684
|
+
}
|
|
30685
|
+
|
|
30686
|
+
|
|
30687
|
+
/***/ }),
|
|
30688
|
+
|
|
30689
|
+
/***/ 1733:
|
|
30690
|
+
/***/ ((module) => {
|
|
30691
|
+
|
|
30692
|
+
module.exports = identity
|
|
30693
|
+
function identity(d) {
|
|
30694
|
+
return d
|
|
30695
|
+
}
|
|
30696
|
+
|
|
30697
|
+
|
|
30698
|
+
/***/ }),
|
|
30699
|
+
|
|
30700
|
+
/***/ 5195:
|
|
30701
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
30702
|
+
|
|
30703
|
+
"use strict";
|
|
30704
|
+
|
|
30705
|
+
|
|
30706
|
+
module.exports = visitParents
|
|
30707
|
+
|
|
30708
|
+
var convert = __webpack_require__(7627)
|
|
30709
|
+
var color = __webpack_require__(1733)
|
|
30710
|
+
|
|
30711
|
+
var CONTINUE = true
|
|
30712
|
+
var SKIP = 'skip'
|
|
30713
|
+
var EXIT = false
|
|
30714
|
+
|
|
30715
|
+
visitParents.CONTINUE = CONTINUE
|
|
30716
|
+
visitParents.SKIP = SKIP
|
|
30717
|
+
visitParents.EXIT = EXIT
|
|
30718
|
+
|
|
30719
|
+
function visitParents(tree, test, visitor, reverse) {
|
|
30720
|
+
var step
|
|
30721
|
+
var is
|
|
30722
|
+
|
|
30723
|
+
if (typeof test === 'function' && typeof visitor !== 'function') {
|
|
30724
|
+
reverse = visitor
|
|
30725
|
+
visitor = test
|
|
30726
|
+
test = null
|
|
30727
|
+
}
|
|
30728
|
+
|
|
30729
|
+
is = convert(test)
|
|
30730
|
+
step = reverse ? -1 : 1
|
|
30731
|
+
|
|
30732
|
+
factory(tree, null, [])()
|
|
30733
|
+
|
|
30734
|
+
function factory(node, index, parents) {
|
|
30735
|
+
var value = typeof node === 'object' && node !== null ? node : {}
|
|
30736
|
+
var name
|
|
30737
|
+
|
|
30738
|
+
if (typeof value.type === 'string') {
|
|
30739
|
+
name =
|
|
30740
|
+
typeof value.tagName === 'string'
|
|
30741
|
+
? value.tagName
|
|
30742
|
+
: typeof value.name === 'string'
|
|
30743
|
+
? value.name
|
|
30744
|
+
: undefined
|
|
30745
|
+
|
|
30746
|
+
visit.displayName =
|
|
30747
|
+
'node (' + color(value.type + (name ? '<' + name + '>' : '')) + ')'
|
|
30748
|
+
}
|
|
30749
|
+
|
|
30750
|
+
return visit
|
|
30751
|
+
|
|
30752
|
+
function visit() {
|
|
30753
|
+
var grandparents = parents.concat(node)
|
|
30754
|
+
var result = []
|
|
30755
|
+
var subresult
|
|
30756
|
+
var offset
|
|
30757
|
+
|
|
30758
|
+
if (!test || is(node, index, parents[parents.length - 1] || null)) {
|
|
30759
|
+
result = toResult(visitor(node, parents))
|
|
30760
|
+
|
|
30761
|
+
if (result[0] === EXIT) {
|
|
30762
|
+
return result
|
|
30763
|
+
}
|
|
30764
|
+
}
|
|
30765
|
+
|
|
30766
|
+
if (node.children && result[0] !== SKIP) {
|
|
30767
|
+
offset = (reverse ? node.children.length : -1) + step
|
|
30768
|
+
|
|
30769
|
+
while (offset > -1 && offset < node.children.length) {
|
|
30770
|
+
subresult = factory(node.children[offset], offset, grandparents)()
|
|
30771
|
+
|
|
30772
|
+
if (subresult[0] === EXIT) {
|
|
30773
|
+
return subresult
|
|
30774
|
+
}
|
|
30775
|
+
|
|
30776
|
+
offset =
|
|
30777
|
+
typeof subresult[1] === 'number' ? subresult[1] : offset + step
|
|
30778
|
+
}
|
|
30779
|
+
}
|
|
30780
|
+
|
|
30781
|
+
return result
|
|
30782
|
+
}
|
|
30783
|
+
}
|
|
30784
|
+
}
|
|
30785
|
+
|
|
30786
|
+
function toResult(value) {
|
|
30787
|
+
if (value !== null && typeof value === 'object' && 'length' in value) {
|
|
30788
|
+
return value
|
|
30789
|
+
}
|
|
30790
|
+
|
|
30791
|
+
if (typeof value === 'number') {
|
|
30792
|
+
return [CONTINUE, value]
|
|
30793
|
+
}
|
|
30794
|
+
|
|
30795
|
+
return [value]
|
|
30796
|
+
}
|
|
30797
|
+
|
|
30798
|
+
|
|
31228
30799
|
/***/ }),
|
|
31229
30800
|
|
|
31230
30801
|
/***/ 750:
|
|
@@ -31235,7 +30806,7 @@ function soft(node) {
|
|
|
31235
30806
|
|
|
31236
30807
|
module.exports = visit
|
|
31237
30808
|
|
|
31238
|
-
var visitParents = __webpack_require__(
|
|
30809
|
+
var visitParents = __webpack_require__(5195)
|
|
31239
30810
|
|
|
31240
30811
|
var CONTINUE = visitParents.CONTINUE
|
|
31241
30812
|
var SKIP = visitParents.SKIP
|
|
@@ -31417,74 +30988,54 @@ function toResult(value) {
|
|
|
31417
30988
|
module.exports = factory
|
|
31418
30989
|
|
|
31419
30990
|
function factory(file) {
|
|
31420
|
-
var
|
|
30991
|
+
var value = String(file)
|
|
30992
|
+
var indices = []
|
|
30993
|
+
var search = /\r?\n|\r/g
|
|
31421
30994
|
|
|
31422
|
-
|
|
31423
|
-
|
|
31424
|
-
toOffset: positionToOffsetFactory(contents)
|
|
30995
|
+
while (search.exec(value)) {
|
|
30996
|
+
indices.push(search.lastIndex)
|
|
31425
30997
|
}
|
|
31426
|
-
}
|
|
31427
30998
|
|
|
31428
|
-
|
|
31429
|
-
// indices.
|
|
31430
|
-
function offsetToPositionFactory(indices) {
|
|
31431
|
-
return offsetToPosition
|
|
30999
|
+
indices.push(value.length + 1)
|
|
31432
31000
|
|
|
31433
|
-
|
|
31434
|
-
|
|
31435
|
-
|
|
31436
|
-
|
|
31001
|
+
return {
|
|
31002
|
+
toPoint: offsetToPoint,
|
|
31003
|
+
toPosition: offsetToPoint,
|
|
31004
|
+
toOffset: pointToOffset
|
|
31005
|
+
}
|
|
31437
31006
|
|
|
31438
|
-
|
|
31439
|
-
|
|
31440
|
-
|
|
31007
|
+
// Get the line and column-based `point` for `offset` in the bound indices.
|
|
31008
|
+
function offsetToPoint(offset) {
|
|
31009
|
+
var index = -1
|
|
31441
31010
|
|
|
31442
|
-
|
|
31443
|
-
|
|
31444
|
-
|
|
31445
|
-
|
|
31446
|
-
|
|
31447
|
-
|
|
31011
|
+
if (offset > -1 && offset < indices[indices.length - 1]) {
|
|
31012
|
+
while (++index < indices.length) {
|
|
31013
|
+
if (indices[index] > offset) {
|
|
31014
|
+
return {
|
|
31015
|
+
line: index + 1,
|
|
31016
|
+
column: offset - (indices[index - 1] || 0) + 1,
|
|
31017
|
+
offset: offset
|
|
31018
|
+
}
|
|
31448
31019
|
}
|
|
31449
31020
|
}
|
|
31450
31021
|
}
|
|
31451
31022
|
|
|
31452
31023
|
return {}
|
|
31453
31024
|
}
|
|
31454
|
-
}
|
|
31455
31025
|
|
|
31456
|
-
//
|
|
31457
|
-
// bound indices.
|
|
31458
|
-
function positionToOffsetFactory(indices) {
|
|
31459
|
-
return positionToOffset
|
|
31460
|
-
|
|
31461
|
-
// Get the `offset` for a line and column-based `position` in the bound
|
|
31026
|
+
// Get the `offset` for a line and column-based `point` in the bound
|
|
31462
31027
|
// indices.
|
|
31463
|
-
function
|
|
31464
|
-
var line =
|
|
31465
|
-
var column =
|
|
31028
|
+
function pointToOffset(point) {
|
|
31029
|
+
var line = point && point.line
|
|
31030
|
+
var column = point && point.column
|
|
31031
|
+
var offset
|
|
31466
31032
|
|
|
31467
31033
|
if (!isNaN(line) && !isNaN(column) && line - 1 in indices) {
|
|
31468
|
-
|
|
31034
|
+
offset = (indices[line - 2] || 0) + column - 1 || 0
|
|
31469
31035
|
}
|
|
31470
31036
|
|
|
31471
|
-
return -1
|
|
31472
|
-
}
|
|
31473
|
-
}
|
|
31474
|
-
|
|
31475
|
-
// Get indices of line-breaks in `value`.
|
|
31476
|
-
function indices(value) {
|
|
31477
|
-
var result = []
|
|
31478
|
-
var index = value.indexOf('\n')
|
|
31479
|
-
|
|
31480
|
-
while (index !== -1) {
|
|
31481
|
-
result.push(index + 1)
|
|
31482
|
-
index = value.indexOf('\n', index + 1)
|
|
31037
|
+
return offset > -1 && offset < indices[indices.length - 1] ? offset : -1
|
|
31483
31038
|
}
|
|
31484
|
-
|
|
31485
|
-
result.push(value.length + 1)
|
|
31486
|
-
|
|
31487
|
-
return result
|
|
31488
31039
|
}
|
|
31489
31040
|
|
|
31490
31041
|
|
|
@@ -34976,11 +34527,12 @@ function plain(text) {
|
|
|
34976
34527
|
var _setup6 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_setup5, 2);
|
|
34977
34528
|
text = _setup6[0];
|
|
34978
34529
|
opts = _setup6[1];
|
|
34979
|
-
|
|
34530
|
+
var proc = htmlProcessor(opts).use(rehypeReact, {
|
|
34980
34531
|
createElement: React.createElement,
|
|
34981
34532
|
Fragment: React.Fragment,
|
|
34982
34533
|
components: components
|
|
34983
|
-
})
|
|
34534
|
+
});
|
|
34535
|
+
return proc.processSync(text).result;
|
|
34984
34536
|
}
|
|
34985
34537
|
|
|
34986
34538
|
/**
|