@readme/markdown 6.63.0 → 6.65.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 +872 -1321
- package/dist/main.node.js +869 -1301
- package/package.json +6 -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
|
|
|
@@ -9001,8 +8948,6 @@ function tokenizer(eat, value) {
|
|
|
9001
8948
|
hash = _rgx$exec2[1],
|
|
9002
8949
|
text = _rgx$exec2[2];
|
|
9003
8950
|
var now = eat.now();
|
|
9004
|
-
now.column += match.length;
|
|
9005
|
-
now.offset += match.length;
|
|
9006
8951
|
return eat(match)({
|
|
9007
8952
|
type: 'heading',
|
|
9008
8953
|
depth: hash.length,
|
|
@@ -9256,6 +9201,7 @@ var _inherits = __webpack_require__(1655);
|
|
|
9256
9201
|
var _setPrototypeOf = __webpack_require__(6015);
|
|
9257
9202
|
var _slicedToArray = __webpack_require__(7424);
|
|
9258
9203
|
function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(re, groups) { return new BabelRegExp(re, void 0, groups); }; var _super = RegExp.prototype, _groups = new WeakMap(); function BabelRegExp(re, flags, groups) { var _this = new RegExp(re, flags); return _groups.set(_this, groups || _groups.get(re)), _setPrototypeOf(_this, BabelRegExp.prototype); } function buildGroups(result, re) { var g = _groups.get(re); return Object.keys(g).reduce(function (groups, name) { var i = g[name]; if ("number" == typeof i) groups[name] = result[i];else { for (var k = 0; void 0 === result[i[k]] && k + 1 < i.length;) { k++; } groups[name] = result[i[k]]; } return groups; }, Object.create(null)); } return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (str) { var result = _super.exec.call(this, str); return result && (result.groups = buildGroups(result, this)), result; }, BabelRegExp.prototype[Symbol.replace] = function (str, substitution) { if ("string" == typeof substitution) { var groups = _groups.get(this); return _super[Symbol.replace].call(this, str, substitution.replace(/\$<([^>]+)>/g, function (_, name) { return "$" + groups[name]; })); } if ("function" == typeof substitution) { var _this = this; return _super[Symbol.replace].call(this, str, function () { var args = arguments; return "object" != _typeof(args[args.length - 1]) && (args = [].slice.call(args)).push(buildGroups(args, _this)), substitution.apply(this, args); }); } return _super[Symbol.replace].call(this, str, substitution); }, _wrapRegExp.apply(this, arguments); }
|
|
9204
|
+
var decode = __webpack_require__(7574);
|
|
9259
9205
|
function tokenizer(eat, value) {
|
|
9260
9206
|
// eslint-disable-next-line unicorn/no-unsafe-regex
|
|
9261
9207
|
var TAB_BLOCK_RGXP = /^(?:(?:^|\n)```(?:(?!\n```)[\s\S])*\n```[^\S\n]*){2,}/g;
|
|
@@ -9286,7 +9232,8 @@ function tokenizer(eat, value) {
|
|
|
9286
9232
|
meta = _codeBlock$groups$met === void 0 ? '' : _codeBlock$groups$met,
|
|
9287
9233
|
_codeBlock$groups$cod = _codeBlock$groups.code,
|
|
9288
9234
|
code = _codeBlock$groups$cod === void 0 ? '' : _codeBlock$groups$cod;
|
|
9289
|
-
|
|
9235
|
+
lang = lang ? decode(this.unescape(lang)) : lang;
|
|
9236
|
+
meta = decode(this.unescape(meta.trim()));
|
|
9290
9237
|
kids.push({
|
|
9291
9238
|
type: 'code',
|
|
9292
9239
|
className: 'tab-panel',
|
|
@@ -9320,8 +9267,8 @@ function parser() {
|
|
|
9320
9267
|
var Parser = this.Parser;
|
|
9321
9268
|
var tokenizers = Parser.prototype.blockTokenizers;
|
|
9322
9269
|
var methods = Parser.prototype.blockMethods;
|
|
9323
|
-
tokenizers.
|
|
9324
|
-
methods.splice(methods.indexOf('
|
|
9270
|
+
tokenizers.codeTabs = tokenizer;
|
|
9271
|
+
methods.splice(methods.indexOf('indentedCode') - 1, 0, 'codeTabs');
|
|
9325
9272
|
}
|
|
9326
9273
|
module.exports = parser;
|
|
9327
9274
|
module.exports.sanitize = function (sanitizeSchema) {
|
|
@@ -11879,60 +11826,6 @@ exports.doubleQuotesEscapeChars = {
|
|
|
11879
11826
|
};
|
|
11880
11827
|
|
|
11881
11828
|
|
|
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
11829
|
/***/ }),
|
|
11937
11830
|
|
|
11938
11831
|
/***/ 4470:
|
|
@@ -16415,27 +16308,23 @@ function getDefinitionFactory(node, options) {
|
|
|
16415
16308
|
}
|
|
16416
16309
|
|
|
16417
16310
|
// Gather all definitions in `node`
|
|
16418
|
-
function gather(node
|
|
16311
|
+
function gather(node) {
|
|
16419
16312
|
var cache = {}
|
|
16420
16313
|
|
|
16421
16314
|
if (!node || !node.type) {
|
|
16422
16315
|
throw new Error('mdast-util-definitions expected node')
|
|
16423
16316
|
}
|
|
16424
16317
|
|
|
16425
|
-
visit(node, 'definition',
|
|
16318
|
+
visit(node, 'definition', ondefinition)
|
|
16426
16319
|
|
|
16427
16320
|
return cache
|
|
16428
16321
|
|
|
16429
|
-
function
|
|
16322
|
+
function ondefinition(definition) {
|
|
16430
16323
|
var id = normalise(definition.identifier)
|
|
16431
16324
|
if (!own.call(cache, id)) {
|
|
16432
16325
|
cache[id] = definition
|
|
16433
16326
|
}
|
|
16434
16327
|
}
|
|
16435
|
-
|
|
16436
|
-
function normal(definition) {
|
|
16437
|
-
cache[normalise(definition.identifier)] = definition
|
|
16438
|
-
}
|
|
16439
16328
|
}
|
|
16440
16329
|
|
|
16441
16330
|
// Factory to get a node from the given definition-cache.
|
|
@@ -16862,19 +16751,27 @@ function hardBreak(h, node) {
|
|
|
16862
16751
|
|
|
16863
16752
|
module.exports = code
|
|
16864
16753
|
|
|
16865
|
-
var detab = __webpack_require__(3128)
|
|
16866
16754
|
var u = __webpack_require__(914)
|
|
16867
16755
|
|
|
16868
16756
|
function code(h, node) {
|
|
16869
|
-
var value = node.value ?
|
|
16757
|
+
var value = node.value ? node.value + '\n' : ''
|
|
16758
|
+
// To do: next major, use `node.lang` w/o regex, the splitting’s been going
|
|
16759
|
+
// on for years in remark now.
|
|
16870
16760
|
var lang = node.lang && node.lang.match(/^[^ \t]+(?=[ \t]|$)/)
|
|
16871
16761
|
var props = {}
|
|
16762
|
+
var code
|
|
16872
16763
|
|
|
16873
16764
|
if (lang) {
|
|
16874
16765
|
props.className = ['language-' + lang]
|
|
16875
16766
|
}
|
|
16876
16767
|
|
|
16877
|
-
|
|
16768
|
+
code = h(node, 'code', props, [u('text', value)])
|
|
16769
|
+
|
|
16770
|
+
if (node.meta) {
|
|
16771
|
+
code.data = {meta: node.meta}
|
|
16772
|
+
}
|
|
16773
|
+
|
|
16774
|
+
return h(node.position, 'pre', [code])
|
|
16878
16775
|
}
|
|
16879
16776
|
|
|
16880
16777
|
|
|
@@ -17124,11 +17021,11 @@ function ignore() {
|
|
|
17124
17021
|
|
|
17125
17022
|
module.exports = inlineCode
|
|
17126
17023
|
|
|
17127
|
-
var collapse = __webpack_require__(9357)
|
|
17128
17024
|
var u = __webpack_require__(914)
|
|
17129
17025
|
|
|
17130
17026
|
function inlineCode(h, node) {
|
|
17131
|
-
|
|
17027
|
+
var value = node.value.replace(/\r?\n|\r/g, ' ')
|
|
17028
|
+
return h(node, 'code', [u('text', value)])
|
|
17132
17029
|
}
|
|
17133
17030
|
|
|
17134
17031
|
|
|
@@ -17199,52 +17096,29 @@ function link(h, node) {
|
|
|
17199
17096
|
module.exports = listItem
|
|
17200
17097
|
|
|
17201
17098
|
var u = __webpack_require__(914)
|
|
17202
|
-
var wrap = __webpack_require__(2931)
|
|
17203
17099
|
var all = __webpack_require__(5426)
|
|
17204
17100
|
|
|
17205
17101
|
function listItem(h, node, parent) {
|
|
17206
|
-
var
|
|
17207
|
-
var head =
|
|
17208
|
-
var raw = all(h, node)
|
|
17102
|
+
var result = all(h, node)
|
|
17103
|
+
var head = result[0]
|
|
17209
17104
|
var loose = parent ? listLoose(parent) : listItemLoose(node)
|
|
17210
17105
|
var props = {}
|
|
17211
|
-
var
|
|
17212
|
-
var container
|
|
17213
|
-
var index
|
|
17106
|
+
var wrapped = []
|
|
17214
17107
|
var length
|
|
17108
|
+
var index
|
|
17215
17109
|
var child
|
|
17216
17110
|
|
|
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
17111
|
if (typeof node.checked === 'boolean') {
|
|
17237
|
-
if (
|
|
17238
|
-
|
|
17112
|
+
if (!head || head.tagName !== 'p') {
|
|
17113
|
+
head = h(null, 'p', [])
|
|
17114
|
+
result.unshift(head)
|
|
17239
17115
|
}
|
|
17240
17116
|
|
|
17241
|
-
|
|
17242
|
-
|
|
17243
|
-
if (container.length !== 0) {
|
|
17244
|
-
container.unshift(u('text', ' '))
|
|
17117
|
+
if (head.children.length > 0) {
|
|
17118
|
+
head.children.unshift(u('text', ' '))
|
|
17245
17119
|
}
|
|
17246
17120
|
|
|
17247
|
-
|
|
17121
|
+
head.children.unshift(
|
|
17248
17122
|
h(null, 'input', {
|
|
17249
17123
|
type: 'checkbox',
|
|
17250
17124
|
checked: node.checked,
|
|
@@ -17257,11 +17131,30 @@ function listItem(h, node, parent) {
|
|
|
17257
17131
|
props.className = ['task-list-item']
|
|
17258
17132
|
}
|
|
17259
17133
|
|
|
17260
|
-
|
|
17261
|
-
|
|
17134
|
+
length = result.length
|
|
17135
|
+
index = -1
|
|
17136
|
+
|
|
17137
|
+
while (++index < length) {
|
|
17138
|
+
child = result[index]
|
|
17139
|
+
|
|
17140
|
+
// Add eols before nodes, except if this is a loose, first paragraph.
|
|
17141
|
+
if (loose || index !== 0 || child.tagName !== 'p') {
|
|
17142
|
+
wrapped.push(u('text', '\n'))
|
|
17143
|
+
}
|
|
17144
|
+
|
|
17145
|
+
if (child.tagName === 'p' && !loose) {
|
|
17146
|
+
wrapped = wrapped.concat(child.children)
|
|
17147
|
+
} else {
|
|
17148
|
+
wrapped.push(child)
|
|
17149
|
+
}
|
|
17150
|
+
}
|
|
17151
|
+
|
|
17152
|
+
// Add a final eol.
|
|
17153
|
+
if (length && (loose || child.tagName !== 'p')) {
|
|
17154
|
+
wrapped.push(u('text', '\n'))
|
|
17262
17155
|
}
|
|
17263
17156
|
|
|
17264
|
-
return h(node, 'li', props,
|
|
17157
|
+
return h(node, 'li', props, wrapped)
|
|
17265
17158
|
}
|
|
17266
17159
|
|
|
17267
17160
|
function listLoose(node) {
|
|
@@ -17398,7 +17291,7 @@ var all = __webpack_require__(5426)
|
|
|
17398
17291
|
function table(h, node) {
|
|
17399
17292
|
var rows = node.children
|
|
17400
17293
|
var index = rows.length
|
|
17401
|
-
var align = node.align
|
|
17294
|
+
var align = node.align || []
|
|
17402
17295
|
var alignLength = align.length
|
|
17403
17296
|
var result = []
|
|
17404
17297
|
var pos
|
|
@@ -17410,7 +17303,7 @@ function table(h, node) {
|
|
|
17410
17303
|
while (index--) {
|
|
17411
17304
|
row = rows[index].children
|
|
17412
17305
|
name = index === 0 ? 'th' : 'td'
|
|
17413
|
-
pos = alignLength
|
|
17306
|
+
pos = alignLength || row.length
|
|
17414
17307
|
out = []
|
|
17415
17308
|
|
|
17416
17309
|
while (pos--) {
|
|
@@ -17425,17 +17318,18 @@ function table(h, node) {
|
|
|
17425
17318
|
node,
|
|
17426
17319
|
'table',
|
|
17427
17320
|
wrap(
|
|
17428
|
-
[
|
|
17429
|
-
|
|
17430
|
-
|
|
17431
|
-
|
|
17432
|
-
|
|
17433
|
-
|
|
17434
|
-
|
|
17435
|
-
|
|
17436
|
-
|
|
17437
|
-
|
|
17438
|
-
|
|
17321
|
+
[h(result[0].position, 'thead', wrap([result[0]], true))].concat(
|
|
17322
|
+
result[1]
|
|
17323
|
+
? h(
|
|
17324
|
+
{
|
|
17325
|
+
start: position.start(result[1]),
|
|
17326
|
+
end: position.end(result[result.length - 1])
|
|
17327
|
+
},
|
|
17328
|
+
'tbody',
|
|
17329
|
+
wrap(result.slice(1), true)
|
|
17330
|
+
)
|
|
17331
|
+
: []
|
|
17332
|
+
),
|
|
17439
17333
|
true
|
|
17440
17334
|
)
|
|
17441
17335
|
)
|
|
@@ -17453,10 +17347,12 @@ function table(h, node) {
|
|
|
17453
17347
|
module.exports = text
|
|
17454
17348
|
|
|
17455
17349
|
var u = __webpack_require__(914)
|
|
17456
|
-
var trimLines = __webpack_require__(6221)
|
|
17457
17350
|
|
|
17458
17351
|
function text(h, node) {
|
|
17459
|
-
return h.augment(
|
|
17352
|
+
return h.augment(
|
|
17353
|
+
node,
|
|
17354
|
+
u('text', String(node.value).replace(/[ \t]*(\r?\n|\r)[ \t]*/g, '$1'))
|
|
17355
|
+
)
|
|
17460
17356
|
}
|
|
17461
17357
|
|
|
17462
17358
|
|
|
@@ -17514,12 +17410,13 @@ function factory(tree, options) {
|
|
|
17514
17410
|
var footnoteById = {}
|
|
17515
17411
|
|
|
17516
17412
|
h.dangerous = dangerous
|
|
17517
|
-
h.definition = definitions(tree
|
|
17413
|
+
h.definition = definitions(tree)
|
|
17518
17414
|
h.footnoteById = footnoteById
|
|
17519
17415
|
h.footnoteOrder = []
|
|
17520
17416
|
h.augment = augment
|
|
17521
17417
|
h.handlers = Object.assign({}, handlers, settings.handlers)
|
|
17522
17418
|
h.unknownHandler = settings.unknownHandler
|
|
17419
|
+
h.passThrough = settings.passThrough
|
|
17523
17420
|
|
|
17524
17421
|
visit(tree, 'footnoteDefinition', onfootnotedefinition)
|
|
17525
17422
|
|
|
@@ -17531,10 +17428,19 @@ function factory(tree, options) {
|
|
|
17531
17428
|
var ctx
|
|
17532
17429
|
|
|
17533
17430
|
// Handle `data.hName`, `data.hProperties, `data.hChildren`.
|
|
17534
|
-
if (left &&
|
|
17431
|
+
if (left && left.data) {
|
|
17535
17432
|
data = left.data
|
|
17536
17433
|
|
|
17537
|
-
if (
|
|
17434
|
+
if (data.hName) {
|
|
17435
|
+
if (right.type !== 'element') {
|
|
17436
|
+
right = {
|
|
17437
|
+
type: 'element',
|
|
17438
|
+
tagName: '',
|
|
17439
|
+
properties: {},
|
|
17440
|
+
children: []
|
|
17441
|
+
}
|
|
17442
|
+
}
|
|
17443
|
+
|
|
17538
17444
|
right.tagName = data.hName
|
|
17539
17445
|
}
|
|
17540
17446
|
|
|
@@ -17582,7 +17488,7 @@ function factory(tree, options) {
|
|
|
17582
17488
|
var id = String(definition.identifier).toUpperCase()
|
|
17583
17489
|
|
|
17584
17490
|
// Mimick CM behavior of link definitions.
|
|
17585
|
-
// See: <https://github.com/syntax-tree/mdast-util-definitions/blob/
|
|
17491
|
+
// See: <https://github.com/syntax-tree/mdast-util-definitions/blob/8290999/index.js#L26>.
|
|
17586
17492
|
if (!own.call(footnoteById, id)) {
|
|
17587
17493
|
footnoteById[id] = definition
|
|
17588
17494
|
}
|
|
@@ -17630,13 +17536,21 @@ function unknown(h, node) {
|
|
|
17630
17536
|
// Visit a node.
|
|
17631
17537
|
function one(h, node, parent) {
|
|
17632
17538
|
var type = node && node.type
|
|
17633
|
-
var fn
|
|
17539
|
+
var fn
|
|
17634
17540
|
|
|
17635
17541
|
// Fail on non-nodes.
|
|
17636
17542
|
if (!type) {
|
|
17637
17543
|
throw new Error('Expected node, got `' + node + '`')
|
|
17638
17544
|
}
|
|
17639
17545
|
|
|
17546
|
+
if (own.call(h.handlers, type)) {
|
|
17547
|
+
fn = h.handlers[type]
|
|
17548
|
+
} else if (h.passThrough && h.passThrough.indexOf(type) > -1) {
|
|
17549
|
+
fn = returnNode
|
|
17550
|
+
} else {
|
|
17551
|
+
fn = h.unknownHandler
|
|
17552
|
+
}
|
|
17553
|
+
|
|
17640
17554
|
return (typeof fn === 'function' ? fn : unknown)(h, node, parent)
|
|
17641
17555
|
}
|
|
17642
17556
|
|
|
@@ -17655,6 +17569,18 @@ function text(node) {
|
|
|
17655
17569
|
return 'value' in node
|
|
17656
17570
|
}
|
|
17657
17571
|
|
|
17572
|
+
function returnNode(h, node) {
|
|
17573
|
+
var clone
|
|
17574
|
+
|
|
17575
|
+
if (node.children) {
|
|
17576
|
+
clone = Object.assign({}, node)
|
|
17577
|
+
clone.children = all(h, node)
|
|
17578
|
+
return clone
|
|
17579
|
+
}
|
|
17580
|
+
|
|
17581
|
+
return node
|
|
17582
|
+
}
|
|
17583
|
+
|
|
17658
17584
|
|
|
17659
17585
|
/***/ }),
|
|
17660
17586
|
|
|
@@ -17739,7 +17665,7 @@ function wrap(nodes, loose) {
|
|
|
17739
17665
|
result.push(nodes[index])
|
|
17740
17666
|
}
|
|
17741
17667
|
|
|
17742
|
-
if (loose && nodes.length
|
|
17668
|
+
if (loose && nodes.length > 0) {
|
|
17743
17669
|
result.push(u('text', '\n'))
|
|
17744
17670
|
}
|
|
17745
17671
|
|
|
@@ -18952,15 +18878,15 @@ var defaults = {
|
|
|
18952
18878
|
// Characters.
|
|
18953
18879
|
var tab = 9 // '\t'
|
|
18954
18880
|
var lineFeed = 10 // '\n'
|
|
18955
|
-
var formFeed = 12 //
|
|
18881
|
+
var formFeed = 12 // '\f'
|
|
18956
18882
|
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 //
|
|
18883
|
+
var ampersand = 38 // '&'
|
|
18884
|
+
var semicolon = 59 // ';'
|
|
18885
|
+
var lessThan = 60 // '<'
|
|
18886
|
+
var equalsTo = 61 // '='
|
|
18887
|
+
var numberSign = 35 // '#'
|
|
18888
|
+
var uppercaseX = 88 // 'X'
|
|
18889
|
+
var lowercaseX = 120 // 'x'
|
|
18964
18890
|
var replacementCharacter = 65533 // '�'
|
|
18965
18891
|
|
|
18966
18892
|
// Reference types.
|
|
@@ -19082,7 +19008,8 @@ function parse(value, settings) {
|
|
|
19082
19008
|
// Wrap `handleWarning`.
|
|
19083
19009
|
warning = handleWarning ? parseError : noop
|
|
19084
19010
|
|
|
19085
|
-
// Ensure the algorithm walks over the first character and the end
|
|
19011
|
+
// Ensure the algorithm walks over the first character and the end
|
|
19012
|
+
// (inclusive).
|
|
19086
19013
|
index--
|
|
19087
19014
|
length++
|
|
19088
19015
|
|
|
@@ -19315,7 +19242,7 @@ function parse(value, settings) {
|
|
|
19315
19242
|
}
|
|
19316
19243
|
}
|
|
19317
19244
|
|
|
19318
|
-
// Return the reduced nodes
|
|
19245
|
+
// Return the reduced nodes.
|
|
19319
19246
|
return result.join('')
|
|
19320
19247
|
|
|
19321
19248
|
// Get current position.
|
|
@@ -21929,7 +21856,6 @@ module.exports = {
|
|
|
21929
21856
|
position: true,
|
|
21930
21857
|
gfm: true,
|
|
21931
21858
|
commonmark: false,
|
|
21932
|
-
footnotes: false,
|
|
21933
21859
|
pedantic: false,
|
|
21934
21860
|
blocks: __webpack_require__(8829)
|
|
21935
21861
|
}
|
|
@@ -21990,6 +21916,65 @@ function locate(value, fromIndex) {
|
|
|
21990
21916
|
}
|
|
21991
21917
|
|
|
21992
21918
|
|
|
21919
|
+
/***/ }),
|
|
21920
|
+
|
|
21921
|
+
/***/ 858:
|
|
21922
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
21923
|
+
|
|
21924
|
+
"use strict";
|
|
21925
|
+
|
|
21926
|
+
|
|
21927
|
+
var decimal = __webpack_require__(6195)
|
|
21928
|
+
var alphabetical = __webpack_require__(6260)
|
|
21929
|
+
|
|
21930
|
+
var plusSign = 43 // '+'
|
|
21931
|
+
var dash = 45 // '-'
|
|
21932
|
+
var dot = 46 // '.'
|
|
21933
|
+
var underscore = 95 // '_'
|
|
21934
|
+
|
|
21935
|
+
module.exports = locate
|
|
21936
|
+
|
|
21937
|
+
// See: <https://github.github.com/gfm/#extended-email-autolink>
|
|
21938
|
+
function locate(value, fromIndex) {
|
|
21939
|
+
var self = this
|
|
21940
|
+
var at
|
|
21941
|
+
var position
|
|
21942
|
+
|
|
21943
|
+
if (!this.options.gfm) {
|
|
21944
|
+
return -1
|
|
21945
|
+
}
|
|
21946
|
+
|
|
21947
|
+
at = value.indexOf('@', fromIndex)
|
|
21948
|
+
|
|
21949
|
+
if (at === -1) {
|
|
21950
|
+
return -1
|
|
21951
|
+
}
|
|
21952
|
+
|
|
21953
|
+
position = at
|
|
21954
|
+
|
|
21955
|
+
if (position === fromIndex || !isGfmAtext(value.charCodeAt(position - 1))) {
|
|
21956
|
+
return locate.call(self, value, at + 1)
|
|
21957
|
+
}
|
|
21958
|
+
|
|
21959
|
+
while (position > fromIndex && isGfmAtext(value.charCodeAt(position - 1))) {
|
|
21960
|
+
position--
|
|
21961
|
+
}
|
|
21962
|
+
|
|
21963
|
+
return position
|
|
21964
|
+
}
|
|
21965
|
+
|
|
21966
|
+
function isGfmAtext(code) {
|
|
21967
|
+
return (
|
|
21968
|
+
decimal(code) ||
|
|
21969
|
+
alphabetical(code) ||
|
|
21970
|
+
code === plusSign ||
|
|
21971
|
+
code === dash ||
|
|
21972
|
+
code === dot ||
|
|
21973
|
+
code === underscore
|
|
21974
|
+
)
|
|
21975
|
+
}
|
|
21976
|
+
|
|
21977
|
+
|
|
21993
21978
|
/***/ }),
|
|
21994
21979
|
|
|
21995
21980
|
/***/ 6131:
|
|
@@ -22106,22 +22091,25 @@ function locate(value, fromIndex) {
|
|
|
22106
22091
|
|
|
22107
22092
|
module.exports = locate
|
|
22108
22093
|
|
|
22109
|
-
var
|
|
22094
|
+
var values = ['www.', 'http://', 'https://']
|
|
22110
22095
|
|
|
22111
22096
|
function locate(value, fromIndex) {
|
|
22112
|
-
var length = protocols.length
|
|
22113
|
-
var index = -1
|
|
22114
22097
|
var min = -1
|
|
22098
|
+
var index
|
|
22099
|
+
var length
|
|
22115
22100
|
var position
|
|
22116
22101
|
|
|
22117
22102
|
if (!this.options.gfm) {
|
|
22118
|
-
return
|
|
22103
|
+
return min
|
|
22119
22104
|
}
|
|
22120
22105
|
|
|
22106
|
+
length = values.length
|
|
22107
|
+
index = -1
|
|
22108
|
+
|
|
22121
22109
|
while (++index < length) {
|
|
22122
|
-
position = value.indexOf(
|
|
22110
|
+
position = value.indexOf(values[index], fromIndex)
|
|
22123
22111
|
|
|
22124
|
-
if (position !== -1 && (
|
|
22112
|
+
if (position !== -1 && (min === -1 || position < min)) {
|
|
22125
22113
|
min = position
|
|
22126
22114
|
}
|
|
22127
22115
|
}
|
|
@@ -22238,13 +22226,13 @@ proto.enterBlock = toggle('inBlock', false)
|
|
|
22238
22226
|
// In the above example, the thematic break “interupts” the paragraph.
|
|
22239
22227
|
proto.interruptParagraph = [
|
|
22240
22228
|
['thematicBreak'],
|
|
22229
|
+
['list'],
|
|
22241
22230
|
['atxHeading'],
|
|
22242
22231
|
['fencedCode'],
|
|
22243
22232
|
['blockquote'],
|
|
22244
22233
|
['html'],
|
|
22245
22234
|
['setextHeading', {commonmark: false}],
|
|
22246
|
-
['definition', {commonmark: false}]
|
|
22247
|
-
['footnote', {commonmark: false}]
|
|
22235
|
+
['definition', {commonmark: false}]
|
|
22248
22236
|
]
|
|
22249
22237
|
|
|
22250
22238
|
// Nodes that can interupt a list:
|
|
@@ -22259,8 +22247,7 @@ proto.interruptList = [
|
|
|
22259
22247
|
['atxHeading', {pedantic: false}],
|
|
22260
22248
|
['fencedCode', {pedantic: false}],
|
|
22261
22249
|
['thematicBreak', {pedantic: false}],
|
|
22262
|
-
['definition', {commonmark: false}]
|
|
22263
|
-
['footnote', {commonmark: false}]
|
|
22250
|
+
['definition', {commonmark: false}]
|
|
22264
22251
|
]
|
|
22265
22252
|
|
|
22266
22253
|
// Nodes that can interupt a blockquote:
|
|
@@ -22279,13 +22266,12 @@ proto.interruptBlockquote = [
|
|
|
22279
22266
|
['thematicBreak', {commonmark: true}],
|
|
22280
22267
|
['html', {commonmark: true}],
|
|
22281
22268
|
['list', {commonmark: true}],
|
|
22282
|
-
['definition', {commonmark: false}]
|
|
22283
|
-
['footnote', {commonmark: false}]
|
|
22269
|
+
['definition', {commonmark: false}]
|
|
22284
22270
|
]
|
|
22285
22271
|
|
|
22286
22272
|
// Handlers.
|
|
22287
22273
|
proto.blockTokenizers = {
|
|
22288
|
-
|
|
22274
|
+
blankLine: __webpack_require__(8086),
|
|
22289
22275
|
indentedCode: __webpack_require__(1018),
|
|
22290
22276
|
fencedCode: __webpack_require__(4967),
|
|
22291
22277
|
blockquote: __webpack_require__(1153),
|
|
@@ -22294,7 +22280,6 @@ proto.blockTokenizers = {
|
|
|
22294
22280
|
list: __webpack_require__(8332),
|
|
22295
22281
|
setextHeading: __webpack_require__(6530),
|
|
22296
22282
|
html: __webpack_require__(5215),
|
|
22297
|
-
footnote: __webpack_require__(8574),
|
|
22298
22283
|
definition: __webpack_require__(856),
|
|
22299
22284
|
table: __webpack_require__(8029),
|
|
22300
22285
|
paragraph: __webpack_require__(2431)
|
|
@@ -22304,6 +22289,7 @@ proto.inlineTokenizers = {
|
|
|
22304
22289
|
escape: __webpack_require__(4833),
|
|
22305
22290
|
autoLink: __webpack_require__(6507),
|
|
22306
22291
|
url: __webpack_require__(5044),
|
|
22292
|
+
email: __webpack_require__(1834),
|
|
22307
22293
|
html: __webpack_require__(3943),
|
|
22308
22294
|
link: __webpack_require__(8685),
|
|
22309
22295
|
reference: __webpack_require__(7551),
|
|
@@ -22532,6 +22518,57 @@ function autoLink(eat, value, silent) {
|
|
|
22532
22518
|
}
|
|
22533
22519
|
|
|
22534
22520
|
|
|
22521
|
+
/***/ }),
|
|
22522
|
+
|
|
22523
|
+
/***/ 8086:
|
|
22524
|
+
/***/ ((module) => {
|
|
22525
|
+
|
|
22526
|
+
"use strict";
|
|
22527
|
+
|
|
22528
|
+
|
|
22529
|
+
// A line containing no characters, or a line containing only spaces (U+0020) or
|
|
22530
|
+
// tabs (U+0009), is called a blank line.
|
|
22531
|
+
// See <https://spec.commonmark.org/0.29/#blank-line>.
|
|
22532
|
+
var reBlankLine = /^[ \t]*(\n|$)/
|
|
22533
|
+
|
|
22534
|
+
// Note that though blank lines play a special role in lists to determine
|
|
22535
|
+
// whether the list is tight or loose
|
|
22536
|
+
// (<https://spec.commonmark.org/0.29/#blank-lines>), it’s done by the list
|
|
22537
|
+
// tokenizer and this blank line tokenizer does not have to be responsible for
|
|
22538
|
+
// that.
|
|
22539
|
+
// Therefore, configs such as `blankLine.notInList` do not have to be set here.
|
|
22540
|
+
module.exports = blankLine
|
|
22541
|
+
|
|
22542
|
+
function blankLine(eat, value, silent) {
|
|
22543
|
+
var match
|
|
22544
|
+
var subvalue = ''
|
|
22545
|
+
var index = 0
|
|
22546
|
+
var length = value.length
|
|
22547
|
+
|
|
22548
|
+
while (index < length) {
|
|
22549
|
+
match = reBlankLine.exec(value.slice(index))
|
|
22550
|
+
|
|
22551
|
+
if (match == null) {
|
|
22552
|
+
break
|
|
22553
|
+
}
|
|
22554
|
+
|
|
22555
|
+
index += match[0].length
|
|
22556
|
+
subvalue += match[0]
|
|
22557
|
+
}
|
|
22558
|
+
|
|
22559
|
+
if (subvalue === '') {
|
|
22560
|
+
return
|
|
22561
|
+
}
|
|
22562
|
+
|
|
22563
|
+
/* istanbul ignore if - never used (yet) */
|
|
22564
|
+
if (silent) {
|
|
22565
|
+
return true
|
|
22566
|
+
}
|
|
22567
|
+
|
|
22568
|
+
eat(subvalue)
|
|
22569
|
+
}
|
|
22570
|
+
|
|
22571
|
+
|
|
22535
22572
|
/***/ }),
|
|
22536
22573
|
|
|
22537
22574
|
/***/ 1153:
|
|
@@ -23547,6 +23584,128 @@ function strikethrough(eat, value, silent) {
|
|
|
23547
23584
|
}
|
|
23548
23585
|
|
|
23549
23586
|
|
|
23587
|
+
/***/ }),
|
|
23588
|
+
|
|
23589
|
+
/***/ 1834:
|
|
23590
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
23591
|
+
|
|
23592
|
+
"use strict";
|
|
23593
|
+
|
|
23594
|
+
|
|
23595
|
+
var decode = __webpack_require__(7574)
|
|
23596
|
+
var decimal = __webpack_require__(6195)
|
|
23597
|
+
var alphabetical = __webpack_require__(6260)
|
|
23598
|
+
var locate = __webpack_require__(858)
|
|
23599
|
+
|
|
23600
|
+
module.exports = email
|
|
23601
|
+
email.locator = locate
|
|
23602
|
+
email.notInLink = true
|
|
23603
|
+
|
|
23604
|
+
var plusSign = 43 // '+'
|
|
23605
|
+
var dash = 45 // '-'
|
|
23606
|
+
var dot = 46 // '.'
|
|
23607
|
+
var atSign = 64 // '@'
|
|
23608
|
+
var underscore = 95 // '_'
|
|
23609
|
+
|
|
23610
|
+
function email(eat, value, silent) {
|
|
23611
|
+
var self = this
|
|
23612
|
+
var gfm = self.options.gfm
|
|
23613
|
+
var tokenizers = self.inlineTokenizers
|
|
23614
|
+
var index = 0
|
|
23615
|
+
var length = value.length
|
|
23616
|
+
var firstDot = -1
|
|
23617
|
+
var code
|
|
23618
|
+
var content
|
|
23619
|
+
var children
|
|
23620
|
+
var exit
|
|
23621
|
+
|
|
23622
|
+
if (!gfm) {
|
|
23623
|
+
return
|
|
23624
|
+
}
|
|
23625
|
+
|
|
23626
|
+
code = value.charCodeAt(index)
|
|
23627
|
+
|
|
23628
|
+
while (
|
|
23629
|
+
decimal(code) ||
|
|
23630
|
+
alphabetical(code) ||
|
|
23631
|
+
code === plusSign ||
|
|
23632
|
+
code === dash ||
|
|
23633
|
+
code === dot ||
|
|
23634
|
+
code === underscore
|
|
23635
|
+
) {
|
|
23636
|
+
code = value.charCodeAt(++index)
|
|
23637
|
+
}
|
|
23638
|
+
|
|
23639
|
+
if (index === 0) {
|
|
23640
|
+
return
|
|
23641
|
+
}
|
|
23642
|
+
|
|
23643
|
+
if (code !== atSign) {
|
|
23644
|
+
return
|
|
23645
|
+
}
|
|
23646
|
+
|
|
23647
|
+
index++
|
|
23648
|
+
|
|
23649
|
+
while (index < length) {
|
|
23650
|
+
code = value.charCodeAt(index)
|
|
23651
|
+
|
|
23652
|
+
if (
|
|
23653
|
+
decimal(code) ||
|
|
23654
|
+
alphabetical(code) ||
|
|
23655
|
+
code === dash ||
|
|
23656
|
+
code === dot ||
|
|
23657
|
+
code === underscore
|
|
23658
|
+
) {
|
|
23659
|
+
index++
|
|
23660
|
+
|
|
23661
|
+
if (firstDot === -1 && code === dot) {
|
|
23662
|
+
firstDot = index
|
|
23663
|
+
}
|
|
23664
|
+
|
|
23665
|
+
continue
|
|
23666
|
+
}
|
|
23667
|
+
|
|
23668
|
+
break
|
|
23669
|
+
}
|
|
23670
|
+
|
|
23671
|
+
if (
|
|
23672
|
+
firstDot === -1 ||
|
|
23673
|
+
firstDot === index ||
|
|
23674
|
+
code === dash ||
|
|
23675
|
+
code === underscore
|
|
23676
|
+
) {
|
|
23677
|
+
return
|
|
23678
|
+
}
|
|
23679
|
+
|
|
23680
|
+
if (code === dot) {
|
|
23681
|
+
index--
|
|
23682
|
+
}
|
|
23683
|
+
|
|
23684
|
+
content = value.slice(0, index)
|
|
23685
|
+
|
|
23686
|
+
/* istanbul ignore if - never used (yet) */
|
|
23687
|
+
if (silent) {
|
|
23688
|
+
return true
|
|
23689
|
+
}
|
|
23690
|
+
|
|
23691
|
+
exit = self.enterLink()
|
|
23692
|
+
|
|
23693
|
+
// Temporarily remove all tokenizers except text in url.
|
|
23694
|
+
self.inlineTokenizers = {text: tokenizers.text}
|
|
23695
|
+
children = self.tokenizeInline(content, eat.now())
|
|
23696
|
+
self.inlineTokenizers = tokenizers
|
|
23697
|
+
|
|
23698
|
+
exit()
|
|
23699
|
+
|
|
23700
|
+
return eat(content)({
|
|
23701
|
+
type: 'link',
|
|
23702
|
+
title: null,
|
|
23703
|
+
url: 'mailto:' + decode(content, {nonTerminated: false}),
|
|
23704
|
+
children: children
|
|
23705
|
+
})
|
|
23706
|
+
}
|
|
23707
|
+
|
|
23708
|
+
|
|
23550
23709
|
/***/ }),
|
|
23551
23710
|
|
|
23552
23711
|
/***/ 8210:
|
|
@@ -23577,7 +23736,7 @@ function emphasis(eat, value, silent) {
|
|
|
23577
23736
|
var queue
|
|
23578
23737
|
var subvalue
|
|
23579
23738
|
var length
|
|
23580
|
-
var
|
|
23739
|
+
var previous
|
|
23581
23740
|
|
|
23582
23741
|
if (character !== asterisk && character !== underscore) {
|
|
23583
23742
|
return
|
|
@@ -23596,14 +23755,14 @@ function emphasis(eat, value, silent) {
|
|
|
23596
23755
|
}
|
|
23597
23756
|
|
|
23598
23757
|
while (index < length) {
|
|
23599
|
-
|
|
23758
|
+
previous = character
|
|
23600
23759
|
character = value.charAt(index)
|
|
23601
23760
|
|
|
23602
|
-
if (character === marker && (!pedantic || !whitespace(
|
|
23761
|
+
if (character === marker && (!pedantic || !whitespace(previous))) {
|
|
23603
23762
|
character = value.charAt(++index)
|
|
23604
23763
|
|
|
23605
23764
|
if (character !== marker) {
|
|
23606
|
-
if (!trim(queue) ||
|
|
23765
|
+
if (!trim(queue) || previous === marker) {
|
|
23607
23766
|
return
|
|
23608
23767
|
}
|
|
23609
23768
|
|
|
@@ -23683,200 +23842,6 @@ function escape(eat, value, silent) {
|
|
|
23683
23842
|
}
|
|
23684
23843
|
|
|
23685
23844
|
|
|
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
23845
|
/***/ }),
|
|
23881
23846
|
|
|
23882
23847
|
/***/ 2867:
|
|
@@ -24156,7 +24121,7 @@ var instructionCloseExpression = /\?>/
|
|
|
24156
24121
|
var directiveOpenExpression = /^<![A-Za-z]/
|
|
24157
24122
|
var directiveCloseExpression = />/
|
|
24158
24123
|
var cdataOpenExpression = /^<!\[CDATA\[/
|
|
24159
|
-
var cdataCloseExpression =
|
|
24124
|
+
var cdataCloseExpression = /]]>/
|
|
24160
24125
|
var elementCloseExpression = /^$/
|
|
24161
24126
|
var otherElementOpenExpression = new RegExp(openCloseTag.source + '\\s*$')
|
|
24162
24127
|
|
|
@@ -24430,20 +24395,6 @@ function link(eat, value, silent) {
|
|
|
24430
24395
|
if (depth) {
|
|
24431
24396
|
depth--
|
|
24432
24397
|
} 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
24398
|
if (value.charAt(index + 1) !== leftParenthesis) {
|
|
24448
24399
|
return
|
|
24449
24400
|
}
|
|
@@ -24735,7 +24686,7 @@ var lowercaseX = 'x'
|
|
|
24735
24686
|
|
|
24736
24687
|
var tabSize = 4
|
|
24737
24688
|
var looseListItemExpression = /\n\n(?!\s*$)/
|
|
24738
|
-
var taskItemExpression = /^\[([ \
|
|
24689
|
+
var taskItemExpression = /^\[([ X\tx])][ \t]/
|
|
24739
24690
|
var bulletExpression = /^([ \t]*)([*+-]|\d+[.)])( {1,4}(?! )| |\t|$|(?=\n))([^\n]*)/
|
|
24740
24691
|
var pedanticBulletExpression = /^([ \t]*)([*+-]|\d+[.)])([ \t]+)/
|
|
24741
24692
|
var initialIndentExpression = /^( {1,4}|\t)?/gm
|
|
@@ -24749,7 +24700,7 @@ function list(eat, value, silent) {
|
|
|
24749
24700
|
var index = 0
|
|
24750
24701
|
var length = value.length
|
|
24751
24702
|
var start = null
|
|
24752
|
-
var size
|
|
24703
|
+
var size
|
|
24753
24704
|
var queue
|
|
24754
24705
|
var ordered
|
|
24755
24706
|
var character
|
|
@@ -24760,7 +24711,7 @@ function list(eat, value, silent) {
|
|
|
24760
24711
|
var currentMarker
|
|
24761
24712
|
var content
|
|
24762
24713
|
var line
|
|
24763
|
-
var
|
|
24714
|
+
var previousEmpty
|
|
24764
24715
|
var empty
|
|
24765
24716
|
var items
|
|
24766
24717
|
var allLines
|
|
@@ -24777,21 +24728,13 @@ function list(eat, value, silent) {
|
|
|
24777
24728
|
while (index < length) {
|
|
24778
24729
|
character = value.charAt(index)
|
|
24779
24730
|
|
|
24780
|
-
if (character
|
|
24781
|
-
size += tabSize - (size % tabSize)
|
|
24782
|
-
} else if (character === space) {
|
|
24783
|
-
size++
|
|
24784
|
-
} else {
|
|
24731
|
+
if (character !== tab && character !== space) {
|
|
24785
24732
|
break
|
|
24786
24733
|
}
|
|
24787
24734
|
|
|
24788
24735
|
index++
|
|
24789
24736
|
}
|
|
24790
24737
|
|
|
24791
|
-
if (size >= tabSize) {
|
|
24792
|
-
return
|
|
24793
|
-
}
|
|
24794
|
-
|
|
24795
24738
|
character = value.charAt(index)
|
|
24796
24739
|
|
|
24797
24740
|
if (character === asterisk || character === plusSign || character === dash) {
|
|
@@ -24821,6 +24764,14 @@ function list(eat, value, silent) {
|
|
|
24821
24764
|
return
|
|
24822
24765
|
}
|
|
24823
24766
|
|
|
24767
|
+
/* Slightly abusing `silent` mode, whose goal is to make interrupting
|
|
24768
|
+
* paragraphs work.
|
|
24769
|
+
* Well, that’s exactly what we want to do here: don’t interrupt:
|
|
24770
|
+
* 2. here, because the “list” doesn’t start with `1`. */
|
|
24771
|
+
if (silent && queue !== '1') {
|
|
24772
|
+
return
|
|
24773
|
+
}
|
|
24774
|
+
|
|
24824
24775
|
start = parseInt(queue, 10)
|
|
24825
24776
|
marker = character
|
|
24826
24777
|
}
|
|
@@ -24854,7 +24805,6 @@ function list(eat, value, silent) {
|
|
|
24854
24805
|
nextIndex = length
|
|
24855
24806
|
}
|
|
24856
24807
|
|
|
24857
|
-
end = index + tabSize
|
|
24858
24808
|
size = 0
|
|
24859
24809
|
|
|
24860
24810
|
while (index < length) {
|
|
@@ -24871,10 +24821,6 @@ function list(eat, value, silent) {
|
|
|
24871
24821
|
index++
|
|
24872
24822
|
}
|
|
24873
24823
|
|
|
24874
|
-
if (size >= tabSize) {
|
|
24875
|
-
indented = true
|
|
24876
|
-
}
|
|
24877
|
-
|
|
24878
24824
|
if (item && size >= item.indent) {
|
|
24879
24825
|
indented = true
|
|
24880
24826
|
}
|
|
@@ -24975,7 +24921,7 @@ function list(eat, value, silent) {
|
|
|
24975
24921
|
}
|
|
24976
24922
|
}
|
|
24977
24923
|
|
|
24978
|
-
|
|
24924
|
+
previousEmpty = empty
|
|
24979
24925
|
empty = !prefixed && !trim(content).length
|
|
24980
24926
|
|
|
24981
24927
|
if (indented && item) {
|
|
@@ -24999,13 +24945,13 @@ function list(eat, value, silent) {
|
|
|
24999
24945
|
allLines = allLines.concat(emptyLines, line)
|
|
25000
24946
|
emptyLines = []
|
|
25001
24947
|
} else if (empty) {
|
|
25002
|
-
if (
|
|
24948
|
+
if (previousEmpty && !commonmark) {
|
|
25003
24949
|
break
|
|
25004
24950
|
}
|
|
25005
24951
|
|
|
25006
24952
|
emptyLines.push(line)
|
|
25007
24953
|
} else {
|
|
25008
|
-
if (
|
|
24954
|
+
if (previousEmpty) {
|
|
25009
24955
|
break
|
|
25010
24956
|
}
|
|
25011
24957
|
|
|
@@ -25164,62 +25110,6 @@ function normalListItem(ctx, value, position) {
|
|
|
25164
25110
|
}
|
|
25165
25111
|
|
|
25166
25112
|
|
|
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
25113
|
/***/ }),
|
|
25224
25114
|
|
|
25225
25115
|
/***/ 2431:
|
|
@@ -25229,7 +25119,6 @@ function newline(eat, value, silent) {
|
|
|
25229
25119
|
|
|
25230
25120
|
|
|
25231
25121
|
var trim = __webpack_require__(3059)
|
|
25232
|
-
var decimal = __webpack_require__(6195)
|
|
25233
25122
|
var trimTrailingLines = __webpack_require__(7257)
|
|
25234
25123
|
var interrupt = __webpack_require__(6588)
|
|
25235
25124
|
|
|
@@ -25246,7 +25135,6 @@ function paragraph(eat, value, silent) {
|
|
|
25246
25135
|
var self = this
|
|
25247
25136
|
var settings = self.options
|
|
25248
25137
|
var commonmark = settings.commonmark
|
|
25249
|
-
var gfm = settings.gfm
|
|
25250
25138
|
var tokenizers = self.blockTokenizers
|
|
25251
25139
|
var interruptors = self.interruptParagraph
|
|
25252
25140
|
var index = value.indexOf(lineFeed)
|
|
@@ -25302,17 +25190,6 @@ function paragraph(eat, value, silent) {
|
|
|
25302
25190
|
break
|
|
25303
25191
|
}
|
|
25304
25192
|
|
|
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
25193
|
position = index
|
|
25317
25194
|
index = value.indexOf(lineFeed, index + 1)
|
|
25318
25195
|
|
|
@@ -25324,12 +25201,6 @@ function paragraph(eat, value, silent) {
|
|
|
25324
25201
|
|
|
25325
25202
|
subvalue = value.slice(0, index)
|
|
25326
25203
|
|
|
25327
|
-
if (trim(subvalue) === '') {
|
|
25328
|
-
eat(subvalue)
|
|
25329
|
-
|
|
25330
|
-
return null
|
|
25331
|
-
}
|
|
25332
|
-
|
|
25333
25204
|
/* istanbul ignore if - never used (yet) */
|
|
25334
25205
|
if (silent) {
|
|
25335
25206
|
return true
|
|
@@ -25362,21 +25233,17 @@ reference.locator = locate
|
|
|
25362
25233
|
|
|
25363
25234
|
var link = 'link'
|
|
25364
25235
|
var image = 'image'
|
|
25365
|
-
var footnote = 'footnote'
|
|
25366
25236
|
var shortcut = 'shortcut'
|
|
25367
25237
|
var collapsed = 'collapsed'
|
|
25368
25238
|
var full = 'full'
|
|
25369
|
-
var space = ' '
|
|
25370
25239
|
var exclamationMark = '!'
|
|
25371
25240
|
var leftSquareBracket = '['
|
|
25372
25241
|
var backslash = '\\'
|
|
25373
25242
|
var rightSquareBracket = ']'
|
|
25374
|
-
var caret = '^'
|
|
25375
25243
|
|
|
25376
25244
|
function reference(eat, value, silent) {
|
|
25377
25245
|
var self = this
|
|
25378
25246
|
var commonmark = self.options.commonmark
|
|
25379
|
-
var footnotes = self.options.footnotes
|
|
25380
25247
|
var character = value.charAt(0)
|
|
25381
25248
|
var index = 0
|
|
25382
25249
|
var length = value.length
|
|
@@ -25408,19 +25275,6 @@ function reference(eat, value, silent) {
|
|
|
25408
25275
|
intro += character
|
|
25409
25276
|
queue = ''
|
|
25410
25277
|
|
|
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
25278
|
// Eat the text.
|
|
25425
25279
|
depth = 0
|
|
25426
25280
|
|
|
@@ -25477,13 +25331,7 @@ function reference(eat, value, silent) {
|
|
|
25477
25331
|
|
|
25478
25332
|
character = value.charAt(index)
|
|
25479
25333
|
|
|
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
|
-
) {
|
|
25334
|
+
if (character === leftSquareBracket) {
|
|
25487
25335
|
identifier = ''
|
|
25488
25336
|
queue += character
|
|
25489
25337
|
index++
|
|
@@ -25540,13 +25388,6 @@ function reference(eat, value, silent) {
|
|
|
25540
25388
|
return true
|
|
25541
25389
|
}
|
|
25542
25390
|
|
|
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
25391
|
now = eat.now()
|
|
25551
25392
|
now.column += intro.length
|
|
25552
25393
|
now.offset += intro.length
|
|
@@ -25555,18 +25396,15 @@ function reference(eat, value, silent) {
|
|
|
25555
25396
|
node = {
|
|
25556
25397
|
type: type + 'Reference',
|
|
25557
25398
|
identifier: normalize(identifier),
|
|
25558
|
-
label: identifier
|
|
25559
|
-
|
|
25560
|
-
|
|
25561
|
-
if (type === link || type === image) {
|
|
25562
|
-
node.referenceType = referenceType
|
|
25399
|
+
label: identifier,
|
|
25400
|
+
referenceType: referenceType
|
|
25563
25401
|
}
|
|
25564
25402
|
|
|
25565
25403
|
if (type === link) {
|
|
25566
25404
|
exit = self.enterLink()
|
|
25567
25405
|
node.children = self.tokenizeInline(content, now)
|
|
25568
25406
|
exit()
|
|
25569
|
-
} else
|
|
25407
|
+
} else {
|
|
25570
25408
|
node.alt = self.decode.raw(self.unescape(content), now) || null
|
|
25571
25409
|
}
|
|
25572
25410
|
|
|
@@ -25603,7 +25441,7 @@ function strong(eat, value, silent) {
|
|
|
25603
25441
|
var queue
|
|
25604
25442
|
var subvalue
|
|
25605
25443
|
var length
|
|
25606
|
-
var
|
|
25444
|
+
var previous
|
|
25607
25445
|
|
|
25608
25446
|
if (
|
|
25609
25447
|
(character !== asterisk && character !== underscore) ||
|
|
@@ -25625,13 +25463,13 @@ function strong(eat, value, silent) {
|
|
|
25625
25463
|
}
|
|
25626
25464
|
|
|
25627
25465
|
while (index < length) {
|
|
25628
|
-
|
|
25466
|
+
previous = character
|
|
25629
25467
|
character = value.charAt(index)
|
|
25630
25468
|
|
|
25631
25469
|
if (
|
|
25632
25470
|
character === marker &&
|
|
25633
25471
|
value.charAt(index + 1) === marker &&
|
|
25634
|
-
(!pedantic || !whitespace(
|
|
25472
|
+
(!pedantic || !whitespace(previous))
|
|
25635
25473
|
) {
|
|
25636
25474
|
character = value.charAt(index + 2)
|
|
25637
25475
|
|
|
@@ -25858,7 +25696,7 @@ function table(eat, value, silent) {
|
|
|
25858
25696
|
|
|
25859
25697
|
if (queue.length > 1) {
|
|
25860
25698
|
if (character) {
|
|
25861
|
-
subvalue += queue.slice(0,
|
|
25699
|
+
subvalue += queue.slice(0, -1)
|
|
25862
25700
|
queue = queue.charAt(queue.length - 1)
|
|
25863
25701
|
} else {
|
|
25864
25702
|
subvalue += queue
|
|
@@ -26058,7 +25896,10 @@ function thematicBreak(eat, value, silent) {
|
|
|
26058
25896
|
"use strict";
|
|
26059
25897
|
|
|
26060
25898
|
|
|
25899
|
+
var ccount = __webpack_require__(932)
|
|
26061
25900
|
var decode = __webpack_require__(7574)
|
|
25901
|
+
var decimal = __webpack_require__(6195)
|
|
25902
|
+
var alphabetical = __webpack_require__(6260)
|
|
26062
25903
|
var whitespace = __webpack_require__(2139)
|
|
26063
25904
|
var locate = __webpack_require__(1020)
|
|
26064
25905
|
|
|
@@ -26066,148 +25907,202 @@ module.exports = url
|
|
|
26066
25907
|
url.locator = locate
|
|
26067
25908
|
url.notInLink = true
|
|
26068
25909
|
|
|
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]
|
|
25910
|
+
var exclamationMark = 33 // '!'
|
|
25911
|
+
var ampersand = 38 // '&'
|
|
25912
|
+
var rightParenthesis = 41 // ')'
|
|
25913
|
+
var asterisk = 42 // '*'
|
|
25914
|
+
var comma = 44 // ','
|
|
25915
|
+
var dash = 45 // '-'
|
|
25916
|
+
var dot = 46 // '.'
|
|
25917
|
+
var colon = 58 // ':'
|
|
25918
|
+
var semicolon = 59 // ';'
|
|
25919
|
+
var questionMark = 63 // '?'
|
|
25920
|
+
var lessThan = 60 // '<'
|
|
25921
|
+
var underscore = 95 // '_'
|
|
25922
|
+
var tilde = 126 // '~'
|
|
26087
25923
|
|
|
26088
|
-
var
|
|
25924
|
+
var leftParenthesisCharacter = '('
|
|
25925
|
+
var rightParenthesisCharacter = ')'
|
|
26089
25926
|
|
|
26090
25927
|
function url(eat, value, silent) {
|
|
26091
25928
|
var self = this
|
|
26092
|
-
var
|
|
26093
|
-
var
|
|
26094
|
-
var
|
|
25929
|
+
var gfm = self.options.gfm
|
|
25930
|
+
var tokenizers = self.inlineTokenizers
|
|
25931
|
+
var length = value.length
|
|
25932
|
+
var previousDot = -1
|
|
25933
|
+
var protocolless = false
|
|
25934
|
+
var dots
|
|
25935
|
+
var lastTwoPartsStart
|
|
25936
|
+
var start
|
|
26095
25937
|
var index
|
|
26096
|
-
var
|
|
26097
|
-
var
|
|
26098
|
-
var
|
|
26099
|
-
var
|
|
26100
|
-
var
|
|
26101
|
-
var
|
|
26102
|
-
var
|
|
26103
|
-
var
|
|
25938
|
+
var pathStart
|
|
25939
|
+
var path
|
|
25940
|
+
var code
|
|
25941
|
+
var end
|
|
25942
|
+
var leftCount
|
|
25943
|
+
var rightCount
|
|
25944
|
+
var content
|
|
25945
|
+
var children
|
|
25946
|
+
var url
|
|
26104
25947
|
var exit
|
|
26105
25948
|
|
|
26106
|
-
if (!
|
|
25949
|
+
if (!gfm) {
|
|
26107
25950
|
return
|
|
26108
25951
|
}
|
|
26109
25952
|
|
|
26110
|
-
|
|
26111
|
-
|
|
25953
|
+
// `WWW.` doesn’t work.
|
|
25954
|
+
if (value.slice(0, 4) === 'www.') {
|
|
25955
|
+
protocolless = true
|
|
25956
|
+
index = 4
|
|
25957
|
+
} else if (value.slice(0, 7).toLowerCase() === 'http://') {
|
|
25958
|
+
index = 7
|
|
25959
|
+
} else if (value.slice(0, 8).toLowerCase() === 'https://') {
|
|
25960
|
+
index = 8
|
|
25961
|
+
} else {
|
|
25962
|
+
return
|
|
25963
|
+
}
|
|
26112
25964
|
|
|
26113
|
-
|
|
26114
|
-
|
|
26115
|
-
match = value.slice(0, protocol.length)
|
|
25965
|
+
// Act as if the starting boundary is a dot.
|
|
25966
|
+
previousDot = index - 1
|
|
26116
25967
|
|
|
26117
|
-
|
|
26118
|
-
|
|
26119
|
-
|
|
25968
|
+
// Parse a valid domain.
|
|
25969
|
+
start = index
|
|
25970
|
+
dots = []
|
|
25971
|
+
|
|
25972
|
+
while (index < length) {
|
|
25973
|
+
code = value.charCodeAt(index)
|
|
25974
|
+
|
|
25975
|
+
if (code === dot) {
|
|
25976
|
+
// Dots may not appear after each other.
|
|
25977
|
+
if (previousDot === index - 1) {
|
|
25978
|
+
break
|
|
25979
|
+
}
|
|
25980
|
+
|
|
25981
|
+
dots.push(index)
|
|
25982
|
+
previousDot = index
|
|
25983
|
+
index++
|
|
25984
|
+
continue
|
|
25985
|
+
}
|
|
25986
|
+
|
|
25987
|
+
if (
|
|
25988
|
+
decimal(code) ||
|
|
25989
|
+
alphabetical(code) ||
|
|
25990
|
+
code === dash ||
|
|
25991
|
+
code === underscore
|
|
25992
|
+
) {
|
|
25993
|
+
index++
|
|
25994
|
+
continue
|
|
26120
25995
|
}
|
|
25996
|
+
|
|
25997
|
+
break
|
|
26121
25998
|
}
|
|
26122
25999
|
|
|
26123
|
-
|
|
26000
|
+
// Ignore a final dot:
|
|
26001
|
+
if (code === dot) {
|
|
26002
|
+
dots.pop()
|
|
26003
|
+
index--
|
|
26004
|
+
}
|
|
26005
|
+
|
|
26006
|
+
// If there are not dots, exit.
|
|
26007
|
+
if (dots[0] === undefined) {
|
|
26124
26008
|
return
|
|
26125
26009
|
}
|
|
26126
26010
|
|
|
26127
|
-
|
|
26128
|
-
|
|
26129
|
-
|
|
26130
|
-
|
|
26011
|
+
// If there is an underscore in the last two domain parts, exit:
|
|
26012
|
+
// `www.example.c_m` and `www.ex_ample.com` are not OK, but
|
|
26013
|
+
// `www.sub_domain.example.com` is.
|
|
26014
|
+
lastTwoPartsStart = dots.length < 2 ? start : dots[dots.length - 2] + 1
|
|
26015
|
+
|
|
26016
|
+
if (value.slice(lastTwoPartsStart, index).indexOf('_') !== -1) {
|
|
26017
|
+
return
|
|
26018
|
+
}
|
|
26131
26019
|
|
|
26020
|
+
/* istanbul ignore if - never used (yet) */
|
|
26021
|
+
if (silent) {
|
|
26022
|
+
return true
|
|
26023
|
+
}
|
|
26024
|
+
|
|
26025
|
+
end = index
|
|
26026
|
+
pathStart = index
|
|
26027
|
+
|
|
26028
|
+
// Parse a path.
|
|
26132
26029
|
while (index < length) {
|
|
26133
|
-
|
|
26030
|
+
code = value.charCodeAt(index)
|
|
26134
26031
|
|
|
26135
|
-
if (whitespace(
|
|
26032
|
+
if (whitespace(code) || code === lessThan) {
|
|
26136
26033
|
break
|
|
26137
26034
|
}
|
|
26138
26035
|
|
|
26036
|
+
index++
|
|
26037
|
+
|
|
26139
26038
|
if (
|
|
26140
|
-
|
|
26141
|
-
|
|
26142
|
-
|
|
26143
|
-
|
|
26144
|
-
|
|
26145
|
-
|
|
26146
|
-
|
|
26147
|
-
|
|
26039
|
+
code === exclamationMark ||
|
|
26040
|
+
code === asterisk ||
|
|
26041
|
+
code === comma ||
|
|
26042
|
+
code === dot ||
|
|
26043
|
+
code === colon ||
|
|
26044
|
+
code === questionMark ||
|
|
26045
|
+
code === underscore ||
|
|
26046
|
+
code === tilde
|
|
26148
26047
|
) {
|
|
26149
|
-
|
|
26150
|
-
|
|
26151
|
-
|
|
26152
|
-
break
|
|
26153
|
-
}
|
|
26048
|
+
// Empty
|
|
26049
|
+
} else {
|
|
26050
|
+
end = index
|
|
26154
26051
|
}
|
|
26052
|
+
}
|
|
26155
26053
|
|
|
26156
|
-
|
|
26157
|
-
parenCount++
|
|
26158
|
-
}
|
|
26054
|
+
index = end
|
|
26159
26055
|
|
|
26160
|
-
|
|
26161
|
-
|
|
26056
|
+
// If the path ends in a closing paren, and the count of closing parens is
|
|
26057
|
+
// higher than the opening count, then remove the supefluous closing parens.
|
|
26058
|
+
if (value.charCodeAt(index - 1) === rightParenthesis) {
|
|
26059
|
+
path = value.slice(pathStart, index)
|
|
26060
|
+
leftCount = ccount(path, leftParenthesisCharacter)
|
|
26061
|
+
rightCount = ccount(path, rightParenthesisCharacter)
|
|
26162
26062
|
|
|
26163
|
-
|
|
26164
|
-
|
|
26165
|
-
|
|
26063
|
+
while (rightCount > leftCount) {
|
|
26064
|
+
index = pathStart + path.lastIndexOf(rightParenthesisCharacter)
|
|
26065
|
+
path = value.slice(pathStart, index)
|
|
26066
|
+
rightCount--
|
|
26166
26067
|
}
|
|
26167
|
-
|
|
26168
|
-
queue += character
|
|
26169
|
-
index++
|
|
26170
26068
|
}
|
|
26171
26069
|
|
|
26172
|
-
if (
|
|
26173
|
-
|
|
26174
|
-
|
|
26070
|
+
if (value.charCodeAt(index - 1) === semicolon) {
|
|
26071
|
+
// GitHub doesn’t document this, but final semicolons aren’t paret of the
|
|
26072
|
+
// URL either.
|
|
26073
|
+
index--
|
|
26175
26074
|
|
|
26176
|
-
|
|
26177
|
-
|
|
26075
|
+
// // If the path ends in what looks like an entity, it’s not part of the path.
|
|
26076
|
+
if (alphabetical(value.charCodeAt(index - 1))) {
|
|
26077
|
+
end = index - 2
|
|
26178
26078
|
|
|
26179
|
-
|
|
26180
|
-
|
|
26079
|
+
while (alphabetical(value.charCodeAt(end))) {
|
|
26080
|
+
end--
|
|
26081
|
+
}
|
|
26181
26082
|
|
|
26182
|
-
|
|
26183
|
-
|
|
26083
|
+
if (value.charCodeAt(end) === ampersand) {
|
|
26084
|
+
index = end
|
|
26085
|
+
}
|
|
26184
26086
|
}
|
|
26185
|
-
|
|
26186
|
-
content = content.slice(mailto.length)
|
|
26187
26087
|
}
|
|
26188
26088
|
|
|
26189
|
-
|
|
26190
|
-
|
|
26191
|
-
|
|
26089
|
+
content = value.slice(0, index)
|
|
26090
|
+
url = decode(content, {nonTerminated: false})
|
|
26091
|
+
|
|
26092
|
+
if (protocolless) {
|
|
26093
|
+
url = 'http://' + url
|
|
26192
26094
|
}
|
|
26193
26095
|
|
|
26194
26096
|
exit = self.enterLink()
|
|
26195
26097
|
|
|
26196
26098
|
// Temporarily remove all tokenizers except text in url.
|
|
26197
|
-
tokenizers = self.inlineTokenizers
|
|
26198
26099
|
self.inlineTokenizers = {text: tokenizers.text}
|
|
26199
|
-
|
|
26200
|
-
content = self.tokenizeInline(content, eat.now())
|
|
26201
|
-
|
|
26100
|
+
children = self.tokenizeInline(content, eat.now())
|
|
26202
26101
|
self.inlineTokenizers = tokenizers
|
|
26102
|
+
|
|
26203
26103
|
exit()
|
|
26204
26104
|
|
|
26205
|
-
return eat(
|
|
26206
|
-
type: 'link',
|
|
26207
|
-
title: null,
|
|
26208
|
-
url: decode(subvalue, {nonTerminated: false}),
|
|
26209
|
-
children: content
|
|
26210
|
-
})
|
|
26105
|
+
return eat(content)({type: 'link', title: null, url: url, children: children})
|
|
26211
26106
|
}
|
|
26212
26107
|
|
|
26213
26108
|
|
|
@@ -26265,11 +26160,15 @@ function factory(type) {
|
|
|
26265
26160
|
name = methods[index]
|
|
26266
26161
|
method = tokenizers[name]
|
|
26267
26162
|
|
|
26163
|
+
// Previously, we had constructs such as footnotes and YAML that used
|
|
26164
|
+
// these properties.
|
|
26165
|
+
// Those are now external (plus there are userland extensions), that may
|
|
26166
|
+
// still use them.
|
|
26268
26167
|
if (
|
|
26269
26168
|
method &&
|
|
26270
26169
|
/* istanbul ignore next */ (!method.onlyAtStart || self.atStart) &&
|
|
26271
|
-
(!method.notInList || !self.inList) &&
|
|
26272
|
-
(!method.notInBlock || !self.inBlock) &&
|
|
26170
|
+
/* istanbul ignore next */ (!method.notInList || !self.inList) &&
|
|
26171
|
+
/* istanbul ignore next */ (!method.notInBlock || !self.inBlock) &&
|
|
26273
26172
|
(!method.notInLink || !self.inLink)
|
|
26274
26173
|
) {
|
|
26275
26174
|
valueLength = value.length
|
|
@@ -26328,7 +26227,7 @@ function factory(type) {
|
|
|
26328
26227
|
|
|
26329
26228
|
// Done. Called when the last character is eaten to retrieve the range’s
|
|
26330
26229
|
// offsets.
|
|
26331
|
-
return function() {
|
|
26230
|
+
return function () {
|
|
26332
26231
|
var last = line + 1
|
|
26333
26232
|
|
|
26334
26233
|
while (pos < last) {
|
|
@@ -26379,10 +26278,10 @@ function factory(type) {
|
|
|
26379
26278
|
|
|
26380
26279
|
// Add the position to a node.
|
|
26381
26280
|
function update(node, indent) {
|
|
26382
|
-
var
|
|
26383
|
-
var start =
|
|
26281
|
+
var previous = node.position
|
|
26282
|
+
var start = previous ? previous.start : before
|
|
26384
26283
|
var combined = []
|
|
26385
|
-
var n =
|
|
26284
|
+
var n = previous && previous.end.line
|
|
26386
26285
|
var l = before.line
|
|
26387
26286
|
|
|
26388
26287
|
node.position = new Position(start)
|
|
@@ -26392,8 +26291,8 @@ function factory(type) {
|
|
|
26392
26291
|
// because some information, the indent between `n` and `l` wasn’t
|
|
26393
26292
|
// tracked. Luckily, that space is (should be?) empty, so we can
|
|
26394
26293
|
// safely check for it now.
|
|
26395
|
-
if (
|
|
26396
|
-
combined =
|
|
26294
|
+
if (previous && indent && previous.indent) {
|
|
26295
|
+
combined = previous.indent
|
|
26397
26296
|
|
|
26398
26297
|
if (n < l) {
|
|
26399
26298
|
while (++n < l) {
|
|
@@ -26416,21 +26315,21 @@ function factory(type) {
|
|
|
26416
26315
|
// possible.
|
|
26417
26316
|
function add(node, parent) {
|
|
26418
26317
|
var children = parent ? parent.children : tokens
|
|
26419
|
-
var
|
|
26318
|
+
var previous = children[children.length - 1]
|
|
26420
26319
|
var fn
|
|
26421
26320
|
|
|
26422
26321
|
if (
|
|
26423
|
-
|
|
26424
|
-
node.type ===
|
|
26322
|
+
previous &&
|
|
26323
|
+
node.type === previous.type &&
|
|
26425
26324
|
(node.type === 'text' || node.type === 'blockquote') &&
|
|
26426
|
-
mergeable(
|
|
26325
|
+
mergeable(previous) &&
|
|
26427
26326
|
mergeable(node)
|
|
26428
26327
|
) {
|
|
26429
26328
|
fn = node.type === 'text' ? mergeText : mergeBlockquote
|
|
26430
|
-
node = fn.call(self,
|
|
26329
|
+
node = fn.call(self, previous, node)
|
|
26431
26330
|
}
|
|
26432
26331
|
|
|
26433
|
-
if (node !==
|
|
26332
|
+
if (node !== previous) {
|
|
26434
26333
|
children.push(node)
|
|
26435
26334
|
}
|
|
26436
26335
|
|
|
@@ -26515,21 +26414,21 @@ function mergeable(node) {
|
|
|
26515
26414
|
}
|
|
26516
26415
|
|
|
26517
26416
|
// Merge two text nodes: `node` into `prev`.
|
|
26518
|
-
function mergeText(
|
|
26519
|
-
|
|
26417
|
+
function mergeText(previous, node) {
|
|
26418
|
+
previous.value += node.value
|
|
26520
26419
|
|
|
26521
|
-
return
|
|
26420
|
+
return previous
|
|
26522
26421
|
}
|
|
26523
26422
|
|
|
26524
26423
|
// Merge two blockquotes: `node` into `prev`, unless in CommonMark or gfm modes.
|
|
26525
|
-
function mergeBlockquote(
|
|
26424
|
+
function mergeBlockquote(previous, node) {
|
|
26526
26425
|
if (this.options.commonmark || this.options.gfm) {
|
|
26527
26426
|
return node
|
|
26528
26427
|
}
|
|
26529
26428
|
|
|
26530
|
-
|
|
26429
|
+
previous.children = previous.children.concat(node.children)
|
|
26531
26430
|
|
|
26532
|
-
return
|
|
26431
|
+
return previous
|
|
26533
26432
|
}
|
|
26534
26433
|
|
|
26535
26434
|
|
|
@@ -26551,26 +26450,26 @@ function factory(ctx, key) {
|
|
|
26551
26450
|
|
|
26552
26451
|
// De-escape a string using the expression at `key` in `ctx`.
|
|
26553
26452
|
function unescape(value) {
|
|
26554
|
-
var
|
|
26453
|
+
var previous = 0
|
|
26555
26454
|
var index = value.indexOf(backslash)
|
|
26556
26455
|
var escape = ctx[key]
|
|
26557
26456
|
var queue = []
|
|
26558
26457
|
var character
|
|
26559
26458
|
|
|
26560
26459
|
while (index !== -1) {
|
|
26561
|
-
queue.push(value.slice(
|
|
26562
|
-
|
|
26563
|
-
character = value.charAt(
|
|
26460
|
+
queue.push(value.slice(previous, index))
|
|
26461
|
+
previous = index + 1
|
|
26462
|
+
character = value.charAt(previous)
|
|
26564
26463
|
|
|
26565
26464
|
// If the following character is not a valid escape, add the slash.
|
|
26566
26465
|
if (!character || escape.indexOf(character) === -1) {
|
|
26567
26466
|
queue.push(backslash)
|
|
26568
26467
|
}
|
|
26569
26468
|
|
|
26570
|
-
index = value.indexOf(backslash,
|
|
26469
|
+
index = value.indexOf(backslash, previous + 1)
|
|
26571
26470
|
}
|
|
26572
26471
|
|
|
26573
|
-
queue.push(value.slice(
|
|
26472
|
+
queue.push(value.slice(previous))
|
|
26574
26473
|
|
|
26575
26474
|
return queue.join('')
|
|
26576
26475
|
}
|
|
@@ -26600,6 +26499,7 @@ function indentation(value) {
|
|
|
26600
26499
|
var character = value.charAt(index)
|
|
26601
26500
|
var stops = {}
|
|
26602
26501
|
var size
|
|
26502
|
+
var lastIndent = 0
|
|
26603
26503
|
|
|
26604
26504
|
while (character === tab || character === space) {
|
|
26605
26505
|
size = character === tab ? tabSize : spaceSize
|
|
@@ -26610,7 +26510,10 @@ function indentation(value) {
|
|
|
26610
26510
|
indent = Math.floor(indent / size) * size
|
|
26611
26511
|
}
|
|
26612
26512
|
|
|
26613
|
-
|
|
26513
|
+
while (lastIndent < indent) {
|
|
26514
|
+
stops[++lastIndent] = index
|
|
26515
|
+
}
|
|
26516
|
+
|
|
26614
26517
|
character = value.charAt(++index)
|
|
26615
26518
|
}
|
|
26616
26519
|
|
|
@@ -26670,7 +26573,7 @@ exports._ = new RegExp(
|
|
|
26670
26573
|
|
|
26671
26574
|
module.exports = interrupt
|
|
26672
26575
|
|
|
26673
|
-
function interrupt(interruptors, tokenizers, ctx,
|
|
26576
|
+
function interrupt(interruptors, tokenizers, ctx, parameters) {
|
|
26674
26577
|
var length = interruptors.length
|
|
26675
26578
|
var index = -1
|
|
26676
26579
|
var interruptor
|
|
@@ -26694,7 +26597,7 @@ function interrupt(interruptors, tokenizers, ctx, params) {
|
|
|
26694
26597
|
continue
|
|
26695
26598
|
}
|
|
26696
26599
|
|
|
26697
|
-
if (tokenizers[interruptor[0]].apply(ctx,
|
|
26600
|
+
if (tokenizers[interruptor[0]].apply(ctx, parameters)) {
|
|
26698
26601
|
return true
|
|
26699
26602
|
}
|
|
26700
26603
|
}
|
|
@@ -26736,7 +26639,6 @@ var getIndent = __webpack_require__(2299)
|
|
|
26736
26639
|
|
|
26737
26640
|
module.exports = indentation
|
|
26738
26641
|
|
|
26739
|
-
var tab = '\t'
|
|
26740
26642
|
var lineFeed = '\n'
|
|
26741
26643
|
var space = ' '
|
|
26742
26644
|
var exclamationMark = '!'
|
|
@@ -26751,7 +26653,6 @@ function indentation(value, maximum) {
|
|
|
26751
26653
|
var index
|
|
26752
26654
|
var indentation
|
|
26753
26655
|
var stops
|
|
26754
|
-
var padding
|
|
26755
26656
|
|
|
26756
26657
|
values.unshift(repeat(space, maximum) + exclamationMark)
|
|
26757
26658
|
|
|
@@ -26786,18 +26687,7 @@ function indentation(value, maximum) {
|
|
|
26786
26687
|
index--
|
|
26787
26688
|
}
|
|
26788
26689
|
|
|
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)
|
|
26690
|
+
values[position] = values[position].slice(stops[index] + 1)
|
|
26801
26691
|
}
|
|
26802
26692
|
}
|
|
26803
26693
|
|
|
@@ -26862,8 +26752,8 @@ function bridge(destination, options) {
|
|
|
26862
26752
|
function transformer(node, file, next) {
|
|
26863
26753
|
destination.run(mdast2hast(node, options), file, done)
|
|
26864
26754
|
|
|
26865
|
-
function done(
|
|
26866
|
-
next(
|
|
26755
|
+
function done(error) {
|
|
26756
|
+
next(error)
|
|
26867
26757
|
}
|
|
26868
26758
|
}
|
|
26869
26759
|
}
|
|
@@ -28166,7 +28056,7 @@ function enter(compiler, node) {
|
|
|
28166
28056
|
"use strict";
|
|
28167
28057
|
|
|
28168
28058
|
|
|
28169
|
-
var decode = __webpack_require__(
|
|
28059
|
+
var decode = __webpack_require__(7574)
|
|
28170
28060
|
|
|
28171
28061
|
module.exports = length
|
|
28172
28062
|
|
|
@@ -28241,7 +28131,7 @@ function label(node) {
|
|
|
28241
28131
|
|
|
28242
28132
|
/***/ }),
|
|
28243
28133
|
|
|
28244
|
-
/***/
|
|
28134
|
+
/***/ 7468:
|
|
28245
28135
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
28246
28136
|
|
|
28247
28137
|
"use strict";
|
|
@@ -28335,7 +28225,7 @@ function lineBreak() {
|
|
|
28335
28225
|
|
|
28336
28226
|
var streak = __webpack_require__(2491)
|
|
28337
28227
|
var repeat = __webpack_require__(6464)
|
|
28338
|
-
var pad = __webpack_require__(
|
|
28228
|
+
var pad = __webpack_require__(7468)
|
|
28339
28229
|
|
|
28340
28230
|
module.exports = code
|
|
28341
28231
|
|
|
@@ -28879,7 +28769,7 @@ function link(node) {
|
|
|
28879
28769
|
|
|
28880
28770
|
|
|
28881
28771
|
var repeat = __webpack_require__(6464)
|
|
28882
|
-
var pad = __webpack_require__(
|
|
28772
|
+
var pad = __webpack_require__(7468)
|
|
28883
28773
|
|
|
28884
28774
|
module.exports = listItem
|
|
28885
28775
|
|
|
@@ -29175,503 +29065,6 @@ function thematic() {
|
|
|
29175
29065
|
}
|
|
29176
29066
|
|
|
29177
29067
|
|
|
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
29068
|
/***/ }),
|
|
29676
29069
|
|
|
29677
29070
|
/***/ 7089:
|
|
@@ -30232,24 +29625,6 @@ module.exports = function () {
|
|
|
30232
29625
|
};
|
|
30233
29626
|
|
|
30234
29627
|
|
|
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
29628
|
/***/ }),
|
|
30254
29629
|
|
|
30255
29630
|
/***/ 7257:
|
|
@@ -30519,11 +29894,12 @@ function unherit(Super) {
|
|
|
30519
29894
|
"use strict";
|
|
30520
29895
|
|
|
30521
29896
|
|
|
30522
|
-
var extend = __webpack_require__(4470)
|
|
30523
29897
|
var bail = __webpack_require__(8841)
|
|
30524
|
-
var
|
|
30525
|
-
var
|
|
29898
|
+
var buffer = __webpack_require__(8738)
|
|
29899
|
+
var extend = __webpack_require__(4470)
|
|
30526
29900
|
var plain = __webpack_require__(8980)
|
|
29901
|
+
var trough = __webpack_require__(8281)
|
|
29902
|
+
var vfile = __webpack_require__(939)
|
|
30527
29903
|
|
|
30528
29904
|
// Expose a frozen processor.
|
|
30529
29905
|
module.exports = unified().freeze()
|
|
@@ -30544,9 +29920,9 @@ function pipelineParse(p, ctx) {
|
|
|
30544
29920
|
function pipelineRun(p, ctx, next) {
|
|
30545
29921
|
p.run(ctx.tree, ctx.file, done)
|
|
30546
29922
|
|
|
30547
|
-
function done(
|
|
30548
|
-
if (
|
|
30549
|
-
next(
|
|
29923
|
+
function done(error, tree, file) {
|
|
29924
|
+
if (error) {
|
|
29925
|
+
next(error)
|
|
30550
29926
|
} else {
|
|
30551
29927
|
ctx.tree = tree
|
|
30552
29928
|
ctx.file = file
|
|
@@ -30556,7 +29932,19 @@ function pipelineRun(p, ctx, next) {
|
|
|
30556
29932
|
}
|
|
30557
29933
|
|
|
30558
29934
|
function pipelineStringify(p, ctx) {
|
|
30559
|
-
|
|
29935
|
+
var result = p.stringify(ctx.tree, ctx.file)
|
|
29936
|
+
|
|
29937
|
+
if (result === undefined || result === null) {
|
|
29938
|
+
// Empty.
|
|
29939
|
+
} else if (typeof result === 'string' || buffer(result)) {
|
|
29940
|
+
if ('value' in ctx.file) {
|
|
29941
|
+
ctx.file.value = result
|
|
29942
|
+
}
|
|
29943
|
+
|
|
29944
|
+
ctx.file.contents = result
|
|
29945
|
+
} else {
|
|
29946
|
+
ctx.file.result = result
|
|
29947
|
+
}
|
|
30560
29948
|
}
|
|
30561
29949
|
|
|
30562
29950
|
// Function to create the first processor.
|
|
@@ -30564,8 +29952,8 @@ function unified() {
|
|
|
30564
29952
|
var attachers = []
|
|
30565
29953
|
var transformers = trough()
|
|
30566
29954
|
var namespace = {}
|
|
30567
|
-
var frozen = false
|
|
30568
29955
|
var freezeIndex = -1
|
|
29956
|
+
var frozen
|
|
30569
29957
|
|
|
30570
29958
|
// Data management.
|
|
30571
29959
|
processor.data = data
|
|
@@ -30591,10 +29979,9 @@ function unified() {
|
|
|
30591
29979
|
// Create a new processor based on the processor in the current scope.
|
|
30592
29980
|
function processor() {
|
|
30593
29981
|
var destination = unified()
|
|
30594
|
-
var length = attachers.length
|
|
30595
29982
|
var index = -1
|
|
30596
29983
|
|
|
30597
|
-
while (++index < length) {
|
|
29984
|
+
while (++index < attachers.length) {
|
|
30598
29985
|
destination.use.apply(null, attachers[index])
|
|
30599
29986
|
}
|
|
30600
29987
|
|
|
@@ -30612,8 +29999,6 @@ function unified() {
|
|
|
30612
29999
|
// In essence, always invoke this when exporting a processor.
|
|
30613
30000
|
function freeze() {
|
|
30614
30001
|
var values
|
|
30615
|
-
var plugin
|
|
30616
|
-
var options
|
|
30617
30002
|
var transformer
|
|
30618
30003
|
|
|
30619
30004
|
if (frozen) {
|
|
@@ -30622,19 +30007,16 @@ function unified() {
|
|
|
30622
30007
|
|
|
30623
30008
|
while (++freezeIndex < attachers.length) {
|
|
30624
30009
|
values = attachers[freezeIndex]
|
|
30625
|
-
plugin = values[0]
|
|
30626
|
-
options = values[1]
|
|
30627
|
-
transformer = null
|
|
30628
30010
|
|
|
30629
|
-
if (
|
|
30011
|
+
if (values[1] === false) {
|
|
30630
30012
|
continue
|
|
30631
30013
|
}
|
|
30632
30014
|
|
|
30633
|
-
if (
|
|
30015
|
+
if (values[1] === true) {
|
|
30634
30016
|
values[1] = undefined
|
|
30635
30017
|
}
|
|
30636
30018
|
|
|
30637
|
-
transformer =
|
|
30019
|
+
transformer = values[0].apply(processor, values.slice(1))
|
|
30638
30020
|
|
|
30639
30021
|
if (typeof transformer === 'function') {
|
|
30640
30022
|
transformers.use(transformer)
|
|
@@ -30654,9 +30036,7 @@ function unified() {
|
|
|
30654
30036
|
// Set `key`.
|
|
30655
30037
|
if (arguments.length === 2) {
|
|
30656
30038
|
assertUnfrozen('data', frozen)
|
|
30657
|
-
|
|
30658
30039
|
namespace[key] = value
|
|
30659
|
-
|
|
30660
30040
|
return processor
|
|
30661
30041
|
}
|
|
30662
30042
|
|
|
@@ -30730,16 +30110,12 @@ function unified() {
|
|
|
30730
30110
|
}
|
|
30731
30111
|
|
|
30732
30112
|
function addList(plugins) {
|
|
30733
|
-
var
|
|
30734
|
-
var index
|
|
30113
|
+
var index = -1
|
|
30735
30114
|
|
|
30736
30115
|
if (plugins === null || plugins === undefined) {
|
|
30737
30116
|
// Empty.
|
|
30738
30117
|
} else if (typeof plugins === 'object' && 'length' in plugins) {
|
|
30739
|
-
|
|
30740
|
-
index = -1
|
|
30741
|
-
|
|
30742
|
-
while (++index < length) {
|
|
30118
|
+
while (++index < plugins.length) {
|
|
30743
30119
|
add(plugins[index])
|
|
30744
30120
|
}
|
|
30745
30121
|
} else {
|
|
@@ -30752,7 +30128,7 @@ function unified() {
|
|
|
30752
30128
|
|
|
30753
30129
|
if (entry) {
|
|
30754
30130
|
if (plain(entry[1]) && plain(value)) {
|
|
30755
|
-
value = extend(entry[1], value)
|
|
30131
|
+
value = extend(true, entry[1], value)
|
|
30756
30132
|
}
|
|
30757
30133
|
|
|
30758
30134
|
entry[1] = value
|
|
@@ -30763,15 +30139,11 @@ function unified() {
|
|
|
30763
30139
|
}
|
|
30764
30140
|
|
|
30765
30141
|
function find(plugin) {
|
|
30766
|
-
var length = attachers.length
|
|
30767
30142
|
var index = -1
|
|
30768
|
-
var entry
|
|
30769
30143
|
|
|
30770
|
-
while (++index < length) {
|
|
30771
|
-
|
|
30772
|
-
|
|
30773
|
-
if (entry[0] === plugin) {
|
|
30774
|
-
return entry
|
|
30144
|
+
while (++index < attachers.length) {
|
|
30145
|
+
if (attachers[index][0] === plugin) {
|
|
30146
|
+
return attachers[index]
|
|
30775
30147
|
}
|
|
30776
30148
|
}
|
|
30777
30149
|
}
|
|
@@ -30813,10 +30185,10 @@ function unified() {
|
|
|
30813
30185
|
function executor(resolve, reject) {
|
|
30814
30186
|
transformers.run(node, vfile(file), done)
|
|
30815
30187
|
|
|
30816
|
-
function done(
|
|
30188
|
+
function done(error, tree, file) {
|
|
30817
30189
|
tree = tree || node
|
|
30818
|
-
if (
|
|
30819
|
-
reject(
|
|
30190
|
+
if (error) {
|
|
30191
|
+
reject(error)
|
|
30820
30192
|
} else if (resolve) {
|
|
30821
30193
|
resolve(tree)
|
|
30822
30194
|
} else {
|
|
@@ -30829,8 +30201,8 @@ function unified() {
|
|
|
30829
30201
|
// Run transforms on a unist node representation of a file (in string or
|
|
30830
30202
|
// vfile representation), sync.
|
|
30831
30203
|
function runSync(node, file) {
|
|
30832
|
-
var complete = false
|
|
30833
30204
|
var result
|
|
30205
|
+
var complete
|
|
30834
30206
|
|
|
30835
30207
|
run(node, file, done)
|
|
30836
30208
|
|
|
@@ -30838,10 +30210,10 @@ function unified() {
|
|
|
30838
30210
|
|
|
30839
30211
|
return result
|
|
30840
30212
|
|
|
30841
|
-
function done(
|
|
30213
|
+
function done(error, tree) {
|
|
30842
30214
|
complete = true
|
|
30843
|
-
bail(err)
|
|
30844
30215
|
result = tree
|
|
30216
|
+
bail(error)
|
|
30845
30217
|
}
|
|
30846
30218
|
}
|
|
30847
30219
|
|
|
@@ -30883,9 +30255,9 @@ function unified() {
|
|
|
30883
30255
|
|
|
30884
30256
|
pipeline.run(processor, {file: file}, done)
|
|
30885
30257
|
|
|
30886
|
-
function done(
|
|
30887
|
-
if (
|
|
30888
|
-
reject(
|
|
30258
|
+
function done(error) {
|
|
30259
|
+
if (error) {
|
|
30260
|
+
reject(error)
|
|
30889
30261
|
} else if (resolve) {
|
|
30890
30262
|
resolve(file)
|
|
30891
30263
|
} else {
|
|
@@ -30897,8 +30269,8 @@ function unified() {
|
|
|
30897
30269
|
|
|
30898
30270
|
// Process the given document (in string or vfile representation), sync.
|
|
30899
30271
|
function processSync(doc) {
|
|
30900
|
-
var complete = false
|
|
30901
30272
|
var file
|
|
30273
|
+
var complete
|
|
30902
30274
|
|
|
30903
30275
|
freeze()
|
|
30904
30276
|
assertParser('processSync', processor.Parser)
|
|
@@ -30911,9 +30283,9 @@ function unified() {
|
|
|
30911
30283
|
|
|
30912
30284
|
return file
|
|
30913
30285
|
|
|
30914
|
-
function done(
|
|
30286
|
+
function done(error) {
|
|
30915
30287
|
complete = true
|
|
30916
|
-
bail(
|
|
30288
|
+
bail(error)
|
|
30917
30289
|
}
|
|
30918
30290
|
}
|
|
30919
30291
|
}
|
|
@@ -31055,15 +30427,16 @@ function flatMap(ast, fn) {
|
|
|
31055
30427
|
module.exports = generated
|
|
31056
30428
|
|
|
31057
30429
|
function generated(node) {
|
|
31058
|
-
|
|
31059
|
-
|
|
31060
|
-
|
|
31061
|
-
|
|
31062
|
-
|
|
31063
|
-
|
|
31064
|
-
|
|
31065
|
-
|
|
31066
|
-
|
|
30430
|
+
return (
|
|
30431
|
+
!node ||
|
|
30432
|
+
!node.position ||
|
|
30433
|
+
!node.position.start ||
|
|
30434
|
+
!node.position.start.line ||
|
|
30435
|
+
!node.position.start.column ||
|
|
30436
|
+
!node.position.end ||
|
|
30437
|
+
!node.position.end.line ||
|
|
30438
|
+
!node.position.end.column
|
|
30439
|
+
)
|
|
31067
30440
|
}
|
|
31068
30441
|
|
|
31069
30442
|
|
|
@@ -31225,6 +30598,203 @@ function soft(node) {
|
|
|
31225
30598
|
}
|
|
31226
30599
|
|
|
31227
30600
|
|
|
30601
|
+
/***/ }),
|
|
30602
|
+
|
|
30603
|
+
/***/ 7627:
|
|
30604
|
+
/***/ ((module) => {
|
|
30605
|
+
|
|
30606
|
+
"use strict";
|
|
30607
|
+
|
|
30608
|
+
|
|
30609
|
+
module.exports = convert
|
|
30610
|
+
|
|
30611
|
+
function convert(test) {
|
|
30612
|
+
if (test == null) {
|
|
30613
|
+
return ok
|
|
30614
|
+
}
|
|
30615
|
+
|
|
30616
|
+
if (typeof test === 'string') {
|
|
30617
|
+
return typeFactory(test)
|
|
30618
|
+
}
|
|
30619
|
+
|
|
30620
|
+
if (typeof test === 'object') {
|
|
30621
|
+
return 'length' in test ? anyFactory(test) : allFactory(test)
|
|
30622
|
+
}
|
|
30623
|
+
|
|
30624
|
+
if (typeof test === 'function') {
|
|
30625
|
+
return test
|
|
30626
|
+
}
|
|
30627
|
+
|
|
30628
|
+
throw new Error('Expected function, string, or object as test')
|
|
30629
|
+
}
|
|
30630
|
+
|
|
30631
|
+
// Utility assert each property in `test` is represented in `node`, and each
|
|
30632
|
+
// values are strictly equal.
|
|
30633
|
+
function allFactory(test) {
|
|
30634
|
+
return all
|
|
30635
|
+
|
|
30636
|
+
function all(node) {
|
|
30637
|
+
var key
|
|
30638
|
+
|
|
30639
|
+
for (key in test) {
|
|
30640
|
+
if (node[key] !== test[key]) return false
|
|
30641
|
+
}
|
|
30642
|
+
|
|
30643
|
+
return true
|
|
30644
|
+
}
|
|
30645
|
+
}
|
|
30646
|
+
|
|
30647
|
+
function anyFactory(tests) {
|
|
30648
|
+
var checks = []
|
|
30649
|
+
var index = -1
|
|
30650
|
+
|
|
30651
|
+
while (++index < tests.length) {
|
|
30652
|
+
checks[index] = convert(tests[index])
|
|
30653
|
+
}
|
|
30654
|
+
|
|
30655
|
+
return any
|
|
30656
|
+
|
|
30657
|
+
function any() {
|
|
30658
|
+
var index = -1
|
|
30659
|
+
|
|
30660
|
+
while (++index < checks.length) {
|
|
30661
|
+
if (checks[index].apply(this, arguments)) {
|
|
30662
|
+
return true
|
|
30663
|
+
}
|
|
30664
|
+
}
|
|
30665
|
+
|
|
30666
|
+
return false
|
|
30667
|
+
}
|
|
30668
|
+
}
|
|
30669
|
+
|
|
30670
|
+
// Utility to convert a string into a function which checks a given node’s type
|
|
30671
|
+
// for said string.
|
|
30672
|
+
function typeFactory(test) {
|
|
30673
|
+
return type
|
|
30674
|
+
|
|
30675
|
+
function type(node) {
|
|
30676
|
+
return Boolean(node && node.type === test)
|
|
30677
|
+
}
|
|
30678
|
+
}
|
|
30679
|
+
|
|
30680
|
+
// Utility to return true.
|
|
30681
|
+
function ok() {
|
|
30682
|
+
return true
|
|
30683
|
+
}
|
|
30684
|
+
|
|
30685
|
+
|
|
30686
|
+
/***/ }),
|
|
30687
|
+
|
|
30688
|
+
/***/ 1733:
|
|
30689
|
+
/***/ ((module) => {
|
|
30690
|
+
|
|
30691
|
+
module.exports = identity
|
|
30692
|
+
function identity(d) {
|
|
30693
|
+
return d
|
|
30694
|
+
}
|
|
30695
|
+
|
|
30696
|
+
|
|
30697
|
+
/***/ }),
|
|
30698
|
+
|
|
30699
|
+
/***/ 5195:
|
|
30700
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
30701
|
+
|
|
30702
|
+
"use strict";
|
|
30703
|
+
|
|
30704
|
+
|
|
30705
|
+
module.exports = visitParents
|
|
30706
|
+
|
|
30707
|
+
var convert = __webpack_require__(7627)
|
|
30708
|
+
var color = __webpack_require__(1733)
|
|
30709
|
+
|
|
30710
|
+
var CONTINUE = true
|
|
30711
|
+
var SKIP = 'skip'
|
|
30712
|
+
var EXIT = false
|
|
30713
|
+
|
|
30714
|
+
visitParents.CONTINUE = CONTINUE
|
|
30715
|
+
visitParents.SKIP = SKIP
|
|
30716
|
+
visitParents.EXIT = EXIT
|
|
30717
|
+
|
|
30718
|
+
function visitParents(tree, test, visitor, reverse) {
|
|
30719
|
+
var step
|
|
30720
|
+
var is
|
|
30721
|
+
|
|
30722
|
+
if (typeof test === 'function' && typeof visitor !== 'function') {
|
|
30723
|
+
reverse = visitor
|
|
30724
|
+
visitor = test
|
|
30725
|
+
test = null
|
|
30726
|
+
}
|
|
30727
|
+
|
|
30728
|
+
is = convert(test)
|
|
30729
|
+
step = reverse ? -1 : 1
|
|
30730
|
+
|
|
30731
|
+
factory(tree, null, [])()
|
|
30732
|
+
|
|
30733
|
+
function factory(node, index, parents) {
|
|
30734
|
+
var value = typeof node === 'object' && node !== null ? node : {}
|
|
30735
|
+
var name
|
|
30736
|
+
|
|
30737
|
+
if (typeof value.type === 'string') {
|
|
30738
|
+
name =
|
|
30739
|
+
typeof value.tagName === 'string'
|
|
30740
|
+
? value.tagName
|
|
30741
|
+
: typeof value.name === 'string'
|
|
30742
|
+
? value.name
|
|
30743
|
+
: undefined
|
|
30744
|
+
|
|
30745
|
+
visit.displayName =
|
|
30746
|
+
'node (' + color(value.type + (name ? '<' + name + '>' : '')) + ')'
|
|
30747
|
+
}
|
|
30748
|
+
|
|
30749
|
+
return visit
|
|
30750
|
+
|
|
30751
|
+
function visit() {
|
|
30752
|
+
var grandparents = parents.concat(node)
|
|
30753
|
+
var result = []
|
|
30754
|
+
var subresult
|
|
30755
|
+
var offset
|
|
30756
|
+
|
|
30757
|
+
if (!test || is(node, index, parents[parents.length - 1] || null)) {
|
|
30758
|
+
result = toResult(visitor(node, parents))
|
|
30759
|
+
|
|
30760
|
+
if (result[0] === EXIT) {
|
|
30761
|
+
return result
|
|
30762
|
+
}
|
|
30763
|
+
}
|
|
30764
|
+
|
|
30765
|
+
if (node.children && result[0] !== SKIP) {
|
|
30766
|
+
offset = (reverse ? node.children.length : -1) + step
|
|
30767
|
+
|
|
30768
|
+
while (offset > -1 && offset < node.children.length) {
|
|
30769
|
+
subresult = factory(node.children[offset], offset, grandparents)()
|
|
30770
|
+
|
|
30771
|
+
if (subresult[0] === EXIT) {
|
|
30772
|
+
return subresult
|
|
30773
|
+
}
|
|
30774
|
+
|
|
30775
|
+
offset =
|
|
30776
|
+
typeof subresult[1] === 'number' ? subresult[1] : offset + step
|
|
30777
|
+
}
|
|
30778
|
+
}
|
|
30779
|
+
|
|
30780
|
+
return result
|
|
30781
|
+
}
|
|
30782
|
+
}
|
|
30783
|
+
}
|
|
30784
|
+
|
|
30785
|
+
function toResult(value) {
|
|
30786
|
+
if (value !== null && typeof value === 'object' && 'length' in value) {
|
|
30787
|
+
return value
|
|
30788
|
+
}
|
|
30789
|
+
|
|
30790
|
+
if (typeof value === 'number') {
|
|
30791
|
+
return [CONTINUE, value]
|
|
30792
|
+
}
|
|
30793
|
+
|
|
30794
|
+
return [value]
|
|
30795
|
+
}
|
|
30796
|
+
|
|
30797
|
+
|
|
31228
30798
|
/***/ }),
|
|
31229
30799
|
|
|
31230
30800
|
/***/ 750:
|
|
@@ -31235,7 +30805,7 @@ function soft(node) {
|
|
|
31235
30805
|
|
|
31236
30806
|
module.exports = visit
|
|
31237
30807
|
|
|
31238
|
-
var visitParents = __webpack_require__(
|
|
30808
|
+
var visitParents = __webpack_require__(5195)
|
|
31239
30809
|
|
|
31240
30810
|
var CONTINUE = visitParents.CONTINUE
|
|
31241
30811
|
var SKIP = visitParents.SKIP
|
|
@@ -31417,74 +30987,54 @@ function toResult(value) {
|
|
|
31417
30987
|
module.exports = factory
|
|
31418
30988
|
|
|
31419
30989
|
function factory(file) {
|
|
31420
|
-
var
|
|
30990
|
+
var value = String(file)
|
|
30991
|
+
var indices = []
|
|
30992
|
+
var search = /\r?\n|\r/g
|
|
31421
30993
|
|
|
31422
|
-
|
|
31423
|
-
|
|
31424
|
-
toOffset: positionToOffsetFactory(contents)
|
|
30994
|
+
while (search.exec(value)) {
|
|
30995
|
+
indices.push(search.lastIndex)
|
|
31425
30996
|
}
|
|
31426
|
-
}
|
|
31427
30997
|
|
|
31428
|
-
|
|
31429
|
-
// indices.
|
|
31430
|
-
function offsetToPositionFactory(indices) {
|
|
31431
|
-
return offsetToPosition
|
|
30998
|
+
indices.push(value.length + 1)
|
|
31432
30999
|
|
|
31433
|
-
|
|
31434
|
-
|
|
31435
|
-
|
|
31436
|
-
|
|
31000
|
+
return {
|
|
31001
|
+
toPoint: offsetToPoint,
|
|
31002
|
+
toPosition: offsetToPoint,
|
|
31003
|
+
toOffset: pointToOffset
|
|
31004
|
+
}
|
|
31437
31005
|
|
|
31438
|
-
|
|
31439
|
-
|
|
31440
|
-
|
|
31006
|
+
// Get the line and column-based `point` for `offset` in the bound indices.
|
|
31007
|
+
function offsetToPoint(offset) {
|
|
31008
|
+
var index = -1
|
|
31441
31009
|
|
|
31442
|
-
|
|
31443
|
-
|
|
31444
|
-
|
|
31445
|
-
|
|
31446
|
-
|
|
31447
|
-
|
|
31010
|
+
if (offset > -1 && offset < indices[indices.length - 1]) {
|
|
31011
|
+
while (++index < indices.length) {
|
|
31012
|
+
if (indices[index] > offset) {
|
|
31013
|
+
return {
|
|
31014
|
+
line: index + 1,
|
|
31015
|
+
column: offset - (indices[index - 1] || 0) + 1,
|
|
31016
|
+
offset: offset
|
|
31017
|
+
}
|
|
31448
31018
|
}
|
|
31449
31019
|
}
|
|
31450
31020
|
}
|
|
31451
31021
|
|
|
31452
31022
|
return {}
|
|
31453
31023
|
}
|
|
31454
|
-
}
|
|
31455
31024
|
|
|
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
|
|
31025
|
+
// Get the `offset` for a line and column-based `point` in the bound
|
|
31462
31026
|
// indices.
|
|
31463
|
-
function
|
|
31464
|
-
var line =
|
|
31465
|
-
var column =
|
|
31027
|
+
function pointToOffset(point) {
|
|
31028
|
+
var line = point && point.line
|
|
31029
|
+
var column = point && point.column
|
|
31030
|
+
var offset
|
|
31466
31031
|
|
|
31467
31032
|
if (!isNaN(line) && !isNaN(column) && line - 1 in indices) {
|
|
31468
|
-
|
|
31033
|
+
offset = (indices[line - 2] || 0) + column - 1 || 0
|
|
31469
31034
|
}
|
|
31470
31035
|
|
|
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)
|
|
31036
|
+
return offset > -1 && offset < indices[indices.length - 1] ? offset : -1
|
|
31483
31037
|
}
|
|
31484
|
-
|
|
31485
|
-
result.push(value.length + 1)
|
|
31486
|
-
|
|
31487
|
-
return result
|
|
31488
31038
|
}
|
|
31489
31039
|
|
|
31490
31040
|
|
|
@@ -34976,11 +34526,12 @@ function plain(text) {
|
|
|
34976
34526
|
var _setup6 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(_setup5, 2);
|
|
34977
34527
|
text = _setup6[0];
|
|
34978
34528
|
opts = _setup6[1];
|
|
34979
|
-
|
|
34529
|
+
var proc = htmlProcessor(opts).use(rehypeReact, {
|
|
34980
34530
|
createElement: React.createElement,
|
|
34981
34531
|
Fragment: React.Fragment,
|
|
34982
34532
|
components: components
|
|
34983
|
-
})
|
|
34533
|
+
});
|
|
34534
|
+
return proc.processSync(text).result;
|
|
34984
34535
|
}
|
|
34985
34536
|
|
|
34986
34537
|
/**
|