@versini/sassysaint 8.24.6 → 8.24.8
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/dist/chunks/{AboutChangelog.Sdttp6iJ.js → AboutChangelog.DlLSjExD.js} +2 -2
- package/dist/chunks/AboutEntry.DNuypnSn.js +55 -0
- package/dist/chunks/{App.btNV6Bb7.js → App.CU8DPgBK.js} +3259 -5085
- package/dist/chunks/{Chart.ZrN7vgQM.js → Chart.CUrSaDT3.js} +2 -2
- package/dist/chunks/{ChatBubbleAssistant.C0edCL3e.js → ChatBubbleAssistant.2TUzypYP.js} +3 -3
- package/dist/chunks/HistoryEntry.DQcqMjle.js +432 -0
- package/dist/chunks/{I3HPI4QX.BVrWyuJO.js → I3HPI4QX.DlQpQsgt.js} +1 -1
- package/dist/chunks/ProfileEntry.Iwbm1rap.js +57 -0
- package/dist/chunks/SettingsEntry.D9S_YV-z.js +969 -0
- package/dist/chunks/UsageEntry.BRpaSd7j.js +96 -0
- package/dist/chunks/index.B8EJY2WR.js +389 -0
- package/dist/chunks/{index.BLgMVaNi.js → index.BmP4cAmg.js} +3 -3
- package/dist/chunks/{index.DQScQrxr.js → index.CRbaU3g8.js} +2591 -3715
- package/dist/chunks/{index.pVTwScuY.js → index.CRciMWyd.js} +654 -656
- package/dist/chunks/{index.y6D2u-fe.js → index.CkC1cqoG.js} +1 -1
- package/dist/chunks/{index.BmzMCoT_.js → index.CxVK8gmr.js} +1789 -1675
- package/dist/chunks/{index.hl9lMZjb.js → index.D4ynJuQN.js} +1 -1
- package/dist/chunks/{useMarkdown.D6UDdDU2.js → useMarkdown.BP64kEQI.js} +1275 -1231
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/dist/style.css +1 -1
- package/package.json +3 -3
@@ -1,102 +1,102 @@
|
|
1
|
-
import { convert as se, visitParents as
|
2
|
-
import { longestStreak as
|
1
|
+
import { convert as se, visitParents as Me, unicodeWhitespace as I, unicodePunctuation as N, normalizeIdentifier as _, classifyCharacter as W, visit as _e, toString as ce, EXIT as Oe, asciiAlphanumeric as Z, asciiAlpha as P, markdownLineEndingOrSpace as A, asciiControl as je, blankLine as Be, factorySpace as S, splice as q, resolveAll as We, markdownLineEnding as R, markdownSpace as T, combineExtensions as $e } from "./useMarkdown.BP64kEQI.js";
|
2
|
+
import { longestStreak as qe } from "./index.Cyw5OC0t.js";
|
3
3
|
function ne(e, n) {
|
4
4
|
const t = String(e);
|
5
5
|
if (typeof n != "string")
|
6
6
|
throw new TypeError("Expected character");
|
7
|
-
let i = 0,
|
8
|
-
for (;
|
9
|
-
i++,
|
7
|
+
let i = 0, o = t.indexOf(n);
|
8
|
+
for (; o !== -1; )
|
9
|
+
i++, o = t.indexOf(n, o + n.length);
|
10
10
|
return i;
|
11
11
|
}
|
12
|
-
function
|
12
|
+
function He(e) {
|
13
13
|
if (typeof e != "string")
|
14
14
|
throw new TypeError("Expected a string");
|
15
15
|
return e.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
|
16
16
|
}
|
17
|
-
function
|
18
|
-
const
|
17
|
+
function Ue(e, n, t) {
|
18
|
+
const o = se((t || {}).ignore || []), a = Ve(n);
|
19
19
|
let r = -1;
|
20
20
|
for (; ++r < a.length; )
|
21
|
-
|
22
|
-
function
|
23
|
-
let
|
24
|
-
for (; ++
|
25
|
-
const g =
|
26
|
-
if (
|
21
|
+
Me(e, "text", u);
|
22
|
+
function u(s, h) {
|
23
|
+
let c = -1, p;
|
24
|
+
for (; ++c < h.length; ) {
|
25
|
+
const g = h[c], m = p ? p.children : void 0;
|
26
|
+
if (o(
|
27
27
|
g,
|
28
|
-
|
28
|
+
m ? m.indexOf(g) : void 0,
|
29
29
|
p
|
30
30
|
))
|
31
31
|
return;
|
32
32
|
p = g;
|
33
33
|
}
|
34
34
|
if (p)
|
35
|
-
return
|
35
|
+
return l(s, h);
|
36
36
|
}
|
37
|
-
function
|
38
|
-
const
|
39
|
-
let
|
40
|
-
const x =
|
37
|
+
function l(s, h) {
|
38
|
+
const c = h[h.length - 1], p = a[r][0], g = a[r][1];
|
39
|
+
let m = 0;
|
40
|
+
const x = c.children.indexOf(s);
|
41
41
|
let k = !1, w = [];
|
42
42
|
p.lastIndex = 0;
|
43
|
-
let d = p.exec(
|
43
|
+
let d = p.exec(s.value);
|
44
44
|
for (; d; ) {
|
45
45
|
const v = d.index, y = {
|
46
46
|
index: d.index,
|
47
47
|
input: d.input,
|
48
|
-
stack: [...
|
48
|
+
stack: [...h, s]
|
49
49
|
};
|
50
50
|
let C = g(...d, y);
|
51
|
-
if (typeof C == "string" && (C = C.length > 0 ? { type: "text", value: C } : void 0), C === !1 ? p.lastIndex = v + 1 : (
|
51
|
+
if (typeof C == "string" && (C = C.length > 0 ? { type: "text", value: C } : void 0), C === !1 ? p.lastIndex = v + 1 : (m !== v && w.push({
|
52
52
|
type: "text",
|
53
|
-
value:
|
54
|
-
}), Array.isArray(C) ? w.push(...C) : C && w.push(C),
|
53
|
+
value: s.value.slice(m, v)
|
54
|
+
}), Array.isArray(C) ? w.push(...C) : C && w.push(C), m = v + d[0].length, k = !0), !p.global)
|
55
55
|
break;
|
56
|
-
d = p.exec(
|
56
|
+
d = p.exec(s.value);
|
57
57
|
}
|
58
|
-
return k ? (
|
58
|
+
return k ? (m < s.value.length && w.push({ type: "text", value: s.value.slice(m) }), c.children.splice(x, 1, ...w)) : w = [s], x + w.length;
|
59
59
|
}
|
60
60
|
}
|
61
|
-
function
|
61
|
+
function Ve(e) {
|
62
62
|
const n = [];
|
63
63
|
if (!Array.isArray(e))
|
64
64
|
throw new TypeError("Expected find and replace tuple or list of tuples");
|
65
65
|
const t = !e[0] || Array.isArray(e[0]) ? e : [e];
|
66
66
|
let i = -1;
|
67
67
|
for (; ++i < t.length; ) {
|
68
|
-
const
|
69
|
-
n.push([
|
68
|
+
const o = t[i];
|
69
|
+
n.push([Ge(o[0]), Qe(o[1])]);
|
70
70
|
}
|
71
71
|
return n;
|
72
72
|
}
|
73
|
-
function Ve(e) {
|
74
|
-
return typeof e == "string" ? new RegExp(qe(e), "g") : e;
|
75
|
-
}
|
76
73
|
function Ge(e) {
|
74
|
+
return typeof e == "string" ? new RegExp(He(e), "g") : e;
|
75
|
+
}
|
76
|
+
function Qe(e) {
|
77
77
|
return typeof e == "function" ? e : function() {
|
78
78
|
return e;
|
79
79
|
};
|
80
80
|
}
|
81
81
|
const H = "phrasing", U = ["autolink", "link", "image", "label"];
|
82
|
-
function
|
82
|
+
function Ne() {
|
83
83
|
return {
|
84
|
-
transforms: [
|
84
|
+
transforms: [tt],
|
85
85
|
enter: {
|
86
|
-
literalAutolink:
|
86
|
+
literalAutolink: Je,
|
87
87
|
literalAutolinkEmail: V,
|
88
88
|
literalAutolinkHttp: V,
|
89
89
|
literalAutolinkWww: V
|
90
90
|
},
|
91
91
|
exit: {
|
92
|
-
literalAutolink:
|
93
|
-
literalAutolinkEmail:
|
94
|
-
literalAutolinkHttp:
|
95
|
-
literalAutolinkWww:
|
92
|
+
literalAutolink: et,
|
93
|
+
literalAutolinkEmail: Ye,
|
94
|
+
literalAutolinkHttp: Ke,
|
95
|
+
literalAutolinkWww: Xe
|
96
96
|
}
|
97
97
|
};
|
98
98
|
}
|
99
|
-
function
|
99
|
+
function Ze() {
|
100
100
|
return {
|
101
101
|
unsafe: [
|
102
102
|
{
|
@@ -123,51 +123,51 @@ function Ne() {
|
|
123
123
|
]
|
124
124
|
};
|
125
125
|
}
|
126
|
-
function
|
126
|
+
function Je(e) {
|
127
127
|
this.enter({ type: "link", title: null, url: "", children: [] }, e);
|
128
128
|
}
|
129
129
|
function V(e) {
|
130
130
|
this.config.enter.autolinkProtocol.call(this, e);
|
131
131
|
}
|
132
|
-
function
|
132
|
+
function Ke(e) {
|
133
133
|
this.config.exit.autolinkProtocol.call(this, e);
|
134
134
|
}
|
135
|
-
function
|
135
|
+
function Xe(e) {
|
136
136
|
this.config.exit.data.call(this, e);
|
137
137
|
const n = this.stack[this.stack.length - 1];
|
138
138
|
n.url = "http://" + this.sliceSerialize(e);
|
139
139
|
}
|
140
|
-
function
|
140
|
+
function Ye(e) {
|
141
141
|
this.config.exit.autolinkEmail.call(this, e);
|
142
142
|
}
|
143
|
-
function
|
143
|
+
function et(e) {
|
144
144
|
this.exit(e);
|
145
145
|
}
|
146
|
-
function
|
147
|
-
|
146
|
+
function tt(e) {
|
147
|
+
Ue(
|
148
148
|
e,
|
149
149
|
[
|
150
|
-
[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,
|
151
|
-
[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)", "gu"),
|
150
|
+
[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi, nt],
|
151
|
+
[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)", "gu"), rt]
|
152
152
|
],
|
153
153
|
{ ignore: ["link", "linkReference"] }
|
154
154
|
);
|
155
155
|
}
|
156
|
-
function
|
156
|
+
function nt(e, n, t, i, o) {
|
157
157
|
let a = "";
|
158
|
-
if (!fe(
|
158
|
+
if (!fe(o) || (/^w/i.test(n) && (t = n + t, n = "", a = "http://"), !it(t)))
|
159
159
|
return !1;
|
160
|
-
const r =
|
160
|
+
const r = lt(t + i);
|
161
161
|
if (!r[0]) return !1;
|
162
|
-
const
|
162
|
+
const u = {
|
163
163
|
type: "link",
|
164
164
|
title: null,
|
165
165
|
url: a + n + r[0],
|
166
166
|
children: [{ type: "text", value: n + r[0] }]
|
167
167
|
};
|
168
|
-
return r[1] ? [
|
168
|
+
return r[1] ? [u, { type: "text", value: r[1] }] : u;
|
169
169
|
}
|
170
|
-
function
|
170
|
+
function rt(e, n, t, i) {
|
171
171
|
return (
|
172
172
|
// Not an expected previous character.
|
173
173
|
!fe(i, !0) || // Label ends in not allowed character.
|
@@ -179,19 +179,19 @@ function nt(e, n, t, i) {
|
|
179
179
|
}
|
180
180
|
);
|
181
181
|
}
|
182
|
-
function
|
182
|
+
function it(e) {
|
183
183
|
const n = e.split(".");
|
184
184
|
return !(n.length < 2 || n[n.length - 1] && (/_/.test(n[n.length - 1]) || !/[a-zA-Z\d]/.test(n[n.length - 1])) || n[n.length - 2] && (/_/.test(n[n.length - 2]) || !/[a-zA-Z\d]/.test(n[n.length - 2])));
|
185
185
|
}
|
186
|
-
function
|
186
|
+
function lt(e) {
|
187
187
|
const n = /[!"&'),.:;<>?\]}]+$/.exec(e);
|
188
188
|
if (!n)
|
189
189
|
return [e, void 0];
|
190
190
|
e = e.slice(0, n.index);
|
191
191
|
let t = n[0], i = t.indexOf(")");
|
192
|
-
const
|
192
|
+
const o = ne(e, "(");
|
193
193
|
let a = ne(e, ")");
|
194
|
-
for (; i !== -1 &&
|
194
|
+
for (; i !== -1 && o > a; )
|
195
195
|
e += t.slice(0, i + 1), t = t.slice(i + 1), i = t.indexOf(")"), a++;
|
196
196
|
return [e, t];
|
197
197
|
}
|
@@ -200,96 +200,94 @@ function fe(e, n) {
|
|
200
200
|
return (e.index === 0 || I(t) || N(t)) && // If it’s an email, the previous character should not be a slash.
|
201
201
|
(!n || t !== 47);
|
202
202
|
}
|
203
|
-
he.peek =
|
204
|
-
function lt() {
|
205
|
-
return {
|
206
|
-
enter: {
|
207
|
-
gfmFootnoteDefinition: at,
|
208
|
-
gfmFootnoteDefinitionLabelString: ut,
|
209
|
-
gfmFootnoteCall: ft,
|
210
|
-
gfmFootnoteCallString: ht
|
211
|
-
},
|
212
|
-
exit: {
|
213
|
-
gfmFootnoteDefinition: ct,
|
214
|
-
gfmFootnoteDefinitionLabelString: st,
|
215
|
-
gfmFootnoteCall: pt,
|
216
|
-
gfmFootnoteCallString: mt
|
217
|
-
}
|
218
|
-
};
|
219
|
-
}
|
203
|
+
he.peek = pt;
|
220
204
|
function ot() {
|
221
|
-
|
222
|
-
// This is on by default already.
|
223
|
-
unsafe: [{ character: "[", inConstruct: ["phrasing", "label", "reference"] }],
|
224
|
-
handlers: { footnoteDefinition: kt, footnoteReference: he }
|
225
|
-
};
|
205
|
+
this.buffer();
|
226
206
|
}
|
227
207
|
function at(e) {
|
228
|
-
this.enter(
|
229
|
-
{ type: "footnoteDefinition", identifier: "", label: "", children: [] },
|
230
|
-
e
|
231
|
-
);
|
208
|
+
this.enter({ type: "footnoteReference", identifier: "", label: "" }, e);
|
232
209
|
}
|
233
210
|
function ut() {
|
234
211
|
this.buffer();
|
235
212
|
}
|
236
213
|
function st(e) {
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
)
|
214
|
+
this.enter(
|
215
|
+
{ type: "footnoteDefinition", identifier: "", label: "", children: [] },
|
216
|
+
e
|
217
|
+
);
|
241
218
|
}
|
242
219
|
function ct(e) {
|
243
|
-
this.
|
220
|
+
const n = this.resume(), t = this.stack[this.stack.length - 1];
|
221
|
+
t.identifier = _(
|
222
|
+
this.sliceSerialize(e)
|
223
|
+
).toLowerCase(), t.label = n;
|
244
224
|
}
|
245
225
|
function ft(e) {
|
246
|
-
this.
|
247
|
-
}
|
248
|
-
function ht() {
|
249
|
-
this.buffer();
|
226
|
+
this.exit(e);
|
250
227
|
}
|
251
|
-
function
|
228
|
+
function ht(e) {
|
252
229
|
const n = this.resume(), t = this.stack[this.stack.length - 1];
|
253
|
-
t.
|
230
|
+
t.identifier = _(
|
254
231
|
this.sliceSerialize(e)
|
255
|
-
).toLowerCase();
|
232
|
+
).toLowerCase(), t.label = n;
|
256
233
|
}
|
257
|
-
function
|
234
|
+
function mt(e) {
|
258
235
|
this.exit(e);
|
259
236
|
}
|
237
|
+
function pt() {
|
238
|
+
return "[";
|
239
|
+
}
|
260
240
|
function he(e, n, t, i) {
|
261
|
-
const
|
262
|
-
let a =
|
263
|
-
const r = t.enter("footnoteReference"),
|
264
|
-
return a +=
|
265
|
-
t.safe(t.associationId(e), {
|
266
|
-
|
267
|
-
before: a,
|
268
|
-
after: "]"
|
269
|
-
})
|
270
|
-
), c(), r(), a += l.move("]"), a;
|
241
|
+
const o = t.createTracker(i);
|
242
|
+
let a = o.move("[^");
|
243
|
+
const r = t.enter("footnoteReference"), u = t.enter("reference");
|
244
|
+
return a += o.move(
|
245
|
+
t.safe(t.associationId(e), { after: "]", before: a })
|
246
|
+
), u(), r(), a += o.move("]"), a;
|
271
247
|
}
|
272
248
|
function gt() {
|
273
|
-
return
|
249
|
+
return {
|
250
|
+
enter: {
|
251
|
+
gfmFootnoteCallString: ot,
|
252
|
+
gfmFootnoteCall: at,
|
253
|
+
gfmFootnoteDefinitionLabelString: ut,
|
254
|
+
gfmFootnoteDefinition: st
|
255
|
+
},
|
256
|
+
exit: {
|
257
|
+
gfmFootnoteCallString: ct,
|
258
|
+
gfmFootnoteCall: ft,
|
259
|
+
gfmFootnoteDefinitionLabelString: ht,
|
260
|
+
gfmFootnoteDefinition: mt
|
261
|
+
}
|
262
|
+
};
|
274
263
|
}
|
275
|
-
function kt(e
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
264
|
+
function kt(e) {
|
265
|
+
let n = !1;
|
266
|
+
return e && e.firstLineBlank && (n = !0), {
|
267
|
+
handlers: { footnoteDefinition: t, footnoteReference: he },
|
268
|
+
// This is on by default already.
|
269
|
+
unsafe: [{ character: "[", inConstruct: ["label", "phrasing", "reference"] }]
|
270
|
+
};
|
271
|
+
function t(i, o, a, r) {
|
272
|
+
const u = a.createTracker(r);
|
273
|
+
let l = u.move("[^");
|
274
|
+
const s = a.enter("footnoteDefinition"), h = a.enter("label");
|
275
|
+
return l += u.move(
|
276
|
+
a.safe(a.associationId(i), { before: l, after: "]" })
|
277
|
+
), h(), l += u.move("]:"), i.children && i.children.length > 0 && (u.shift(4), l += u.move(
|
278
|
+
(n ? `
|
279
|
+
` : " ") + a.indentLines(
|
280
|
+
a.containerFlow(i, u.current()),
|
281
|
+
n ? me : bt
|
282
|
+
)
|
283
|
+
)), s(), l;
|
284
|
+
}
|
290
285
|
}
|
291
286
|
function bt(e, n, t) {
|
292
|
-
return n === 0 ? e : (
|
287
|
+
return n === 0 ? e : me(e, n, t);
|
288
|
+
}
|
289
|
+
function me(e, n, t) {
|
290
|
+
return (t ? "" : " ") + e;
|
293
291
|
}
|
294
292
|
const xt = [
|
295
293
|
"autolink",
|
@@ -299,7 +297,7 @@ const xt = [
|
|
299
297
|
"titleQuote",
|
300
298
|
"titleApostrophe"
|
301
299
|
];
|
302
|
-
|
300
|
+
pe.peek = vt;
|
303
301
|
function wt() {
|
304
302
|
return {
|
305
303
|
canContainEols: ["delete"],
|
@@ -316,7 +314,7 @@ function dt() {
|
|
316
314
|
notInConstruct: xt
|
317
315
|
}
|
318
316
|
],
|
319
|
-
handlers: { delete:
|
317
|
+
handlers: { delete: pe }
|
320
318
|
};
|
321
319
|
}
|
322
320
|
function Ct(e) {
|
@@ -325,14 +323,14 @@ function Ct(e) {
|
|
325
323
|
function yt(e) {
|
326
324
|
this.exit(e);
|
327
325
|
}
|
328
|
-
function
|
329
|
-
const
|
330
|
-
let r =
|
326
|
+
function pe(e, n, t, i) {
|
327
|
+
const o = t.createTracker(i), a = t.enter("strikethrough");
|
328
|
+
let r = o.move("~~");
|
331
329
|
return r += t.containerPhrasing(e, {
|
332
|
-
...
|
330
|
+
...o.current(),
|
333
331
|
before: r,
|
334
332
|
after: "~"
|
335
|
-
}), r +=
|
333
|
+
}), r += o.move("~~"), a(), r;
|
336
334
|
}
|
337
335
|
function vt() {
|
338
336
|
return "~";
|
@@ -341,65 +339,65 @@ function At(e) {
|
|
341
339
|
return e.length;
|
342
340
|
}
|
343
341
|
function Dt(e, n) {
|
344
|
-
const t = n || {}, i = (t.align || []).concat(),
|
345
|
-
let
|
346
|
-
for (; ++
|
342
|
+
const t = n || {}, i = (t.align || []).concat(), o = t.stringLength || At, a = [], r = [], u = [], l = [];
|
343
|
+
let s = 0, h = -1;
|
344
|
+
for (; ++h < e.length; ) {
|
347
345
|
const b = [], x = [];
|
348
346
|
let k = -1;
|
349
|
-
for (e[
|
350
|
-
const w = Ft(e[
|
347
|
+
for (e[h].length > s && (s = e[h].length); ++k < e[h].length; ) {
|
348
|
+
const w = Ft(e[h][k]);
|
351
349
|
if (t.alignDelimiters !== !1) {
|
352
|
-
const d =
|
353
|
-
x[k] = d, (
|
350
|
+
const d = o(w);
|
351
|
+
x[k] = d, (l[k] === void 0 || d > l[k]) && (l[k] = d);
|
354
352
|
}
|
355
353
|
b.push(w);
|
356
354
|
}
|
357
|
-
r[
|
355
|
+
r[h] = b, u[h] = x;
|
358
356
|
}
|
359
|
-
let
|
357
|
+
let c = -1;
|
360
358
|
if (typeof i == "object" && "length" in i)
|
361
|
-
for (; ++
|
362
|
-
a[
|
359
|
+
for (; ++c < s; )
|
360
|
+
a[c] = re(i[c]);
|
363
361
|
else {
|
364
362
|
const b = re(i);
|
365
|
-
for (; ++
|
366
|
-
a[
|
363
|
+
for (; ++c < s; )
|
364
|
+
a[c] = b;
|
367
365
|
}
|
368
|
-
|
366
|
+
c = -1;
|
369
367
|
const p = [], g = [];
|
370
|
-
for (; ++
|
371
|
-
const b = a[
|
368
|
+
for (; ++c < s; ) {
|
369
|
+
const b = a[c];
|
372
370
|
let x = "", k = "";
|
373
371
|
b === 99 ? (x = ":", k = ":") : b === 108 ? x = ":" : b === 114 && (k = ":");
|
374
372
|
let w = t.alignDelimiters === !1 ? 1 : Math.max(
|
375
373
|
1,
|
376
|
-
|
374
|
+
l[c] - x.length - k.length
|
377
375
|
);
|
378
376
|
const d = x + "-".repeat(w) + k;
|
379
|
-
t.alignDelimiters !== !1 && (w = x.length + w + k.length, w >
|
377
|
+
t.alignDelimiters !== !1 && (w = x.length + w + k.length, w > l[c] && (l[c] = w), g[c] = w), p[c] = d;
|
380
378
|
}
|
381
|
-
r.splice(1, 0, p),
|
382
|
-
const
|
383
|
-
for (; ++
|
384
|
-
const b = r[
|
385
|
-
|
379
|
+
r.splice(1, 0, p), u.splice(1, 0, g), h = -1;
|
380
|
+
const m = [];
|
381
|
+
for (; ++h < r.length; ) {
|
382
|
+
const b = r[h], x = u[h];
|
383
|
+
c = -1;
|
386
384
|
const k = [];
|
387
|
-
for (; ++
|
388
|
-
const w = b[
|
385
|
+
for (; ++c < s; ) {
|
386
|
+
const w = b[c] || "";
|
389
387
|
let d = "", v = "";
|
390
388
|
if (t.alignDelimiters !== !1) {
|
391
|
-
const y =
|
389
|
+
const y = l[c] - (x[c] || 0), C = a[c];
|
392
390
|
C === 114 ? d = " ".repeat(y) : C === 99 ? y % 2 ? (d = " ".repeat(y / 2 + 0.5), v = " ".repeat(y / 2 - 0.5)) : (d = " ".repeat(y / 2), v = d) : v = " ".repeat(y);
|
393
391
|
}
|
394
|
-
t.delimiterStart !== !1 && !
|
392
|
+
t.delimiterStart !== !1 && !c && k.push("|"), t.padding !== !1 && // Don’t add the opening space if we’re not aligning and the cell is
|
395
393
|
// empty: there will be a closing space.
|
396
|
-
!(t.alignDelimiters === !1 && w === "") && (t.delimiterStart !== !1 ||
|
394
|
+
!(t.alignDelimiters === !1 && w === "") && (t.delimiterStart !== !1 || c) && k.push(" "), t.alignDelimiters !== !1 && k.push(d), k.push(w), t.alignDelimiters !== !1 && k.push(v), t.padding !== !1 && k.push(" "), (t.delimiterEnd !== !1 || c !== s - 1) && k.push("|");
|
397
395
|
}
|
398
|
-
|
396
|
+
m.push(
|
399
397
|
t.delimiterEnd === !1 ? k.join("").replace(/ +$/, "") : k.join("")
|
400
398
|
);
|
401
399
|
}
|
402
|
-
return
|
400
|
+
return m.join(`
|
403
401
|
`);
|
404
402
|
}
|
405
403
|
function Ft(e) {
|
@@ -410,18 +408,18 @@ function re(e) {
|
|
410
408
|
return n === 67 || n === 99 ? 99 : n === 76 || n === 108 ? 108 : n === 82 || n === 114 ? 114 : 0;
|
411
409
|
}
|
412
410
|
function St(e, n, t, i) {
|
413
|
-
const
|
411
|
+
const o = t.enter("blockquote"), a = t.createTracker(i);
|
414
412
|
a.move("> "), a.shift(2);
|
415
413
|
const r = t.indentLines(
|
416
414
|
t.containerFlow(e, a.current()),
|
417
|
-
|
415
|
+
Lt
|
418
416
|
);
|
419
|
-
return
|
417
|
+
return o(), r;
|
420
418
|
}
|
421
|
-
function
|
419
|
+
function Lt(e, n, t) {
|
422
420
|
return ">" + (t ? "" : " ") + e;
|
423
421
|
}
|
424
|
-
function
|
422
|
+
function Tt(e, n) {
|
425
423
|
return ie(e, n.inConstruct, !0) && !ie(e, n.notInConstruct, !1);
|
426
424
|
}
|
427
425
|
function ie(e, n, t) {
|
@@ -434,10 +432,10 @@ function ie(e, n, t) {
|
|
434
432
|
return !1;
|
435
433
|
}
|
436
434
|
function le(e, n, t, i) {
|
437
|
-
let
|
438
|
-
for (; ++
|
439
|
-
if (t.unsafe[
|
440
|
-
` &&
|
435
|
+
let o = -1;
|
436
|
+
for (; ++o < t.unsafe.length; )
|
437
|
+
if (t.unsafe[o].character === `
|
438
|
+
` && Tt(t.stack, t.unsafe[o]))
|
441
439
|
return /[ \t]/.test(i.before) ? "" : " ";
|
442
440
|
return `\\
|
443
441
|
`;
|
@@ -457,39 +455,39 @@ function It(e) {
|
|
457
455
|
return n;
|
458
456
|
}
|
459
457
|
function Et(e, n, t, i) {
|
460
|
-
const
|
458
|
+
const o = It(t), a = e.value || "", r = o === "`" ? "GraveAccent" : "Tilde";
|
461
459
|
if (zt(e, t)) {
|
462
|
-
const
|
463
|
-
return
|
460
|
+
const c = t.enter("codeIndented"), p = t.indentLines(a, Rt);
|
461
|
+
return c(), p;
|
464
462
|
}
|
465
|
-
const
|
466
|
-
let
|
463
|
+
const u = t.createTracker(i), l = o.repeat(Math.max(qe(a, o) + 1, 3)), s = t.enter("codeFenced");
|
464
|
+
let h = u.move(l);
|
467
465
|
if (e.lang) {
|
468
|
-
const
|
469
|
-
|
466
|
+
const c = t.enter(`codeFencedLang${r}`);
|
467
|
+
h += u.move(
|
470
468
|
t.safe(e.lang, {
|
471
|
-
before:
|
469
|
+
before: h,
|
472
470
|
after: " ",
|
473
471
|
encode: ["`"],
|
474
|
-
...
|
472
|
+
...u.current()
|
475
473
|
})
|
476
|
-
),
|
474
|
+
), c();
|
477
475
|
}
|
478
476
|
if (e.lang && e.meta) {
|
479
|
-
const
|
480
|
-
|
477
|
+
const c = t.enter(`codeFencedMeta${r}`);
|
478
|
+
h += u.move(" "), h += u.move(
|
481
479
|
t.safe(e.meta, {
|
482
|
-
before:
|
480
|
+
before: h,
|
483
481
|
after: `
|
484
482
|
`,
|
485
483
|
encode: ["`"],
|
486
|
-
...
|
484
|
+
...u.current()
|
487
485
|
})
|
488
|
-
),
|
486
|
+
), c();
|
489
487
|
}
|
490
|
-
return
|
491
|
-
`), a && (
|
492
|
-
`)),
|
488
|
+
return h += u.move(`
|
489
|
+
`), a && (h += u.move(a + `
|
490
|
+
`)), h += u.move(l), s(), h;
|
493
491
|
}
|
494
492
|
function Rt(e, n, t) {
|
495
493
|
return (t ? "" : " ") + e;
|
@@ -503,34 +501,34 @@ function J(e) {
|
|
503
501
|
return n;
|
504
502
|
}
|
505
503
|
function Pt(e, n, t, i) {
|
506
|
-
const
|
507
|
-
let
|
508
|
-
const
|
509
|
-
let
|
510
|
-
return
|
504
|
+
const o = J(t), a = o === '"' ? "Quote" : "Apostrophe", r = t.enter("definition");
|
505
|
+
let u = t.enter("label");
|
506
|
+
const l = t.createTracker(i);
|
507
|
+
let s = l.move("[");
|
508
|
+
return s += l.move(
|
511
509
|
t.safe(t.associationId(e), {
|
512
|
-
before:
|
510
|
+
before: s,
|
513
511
|
after: "]",
|
514
|
-
...
|
512
|
+
...l.current()
|
515
513
|
})
|
516
|
-
),
|
514
|
+
), s += l.move("]: "), u(), // If there’s no url, or…
|
517
515
|
!e.url || // If there are control characters or whitespace.
|
518
|
-
/[\0- \u007F]/.test(e.url) ? (
|
519
|
-
t.safe(e.url, { before:
|
520
|
-
),
|
516
|
+
/[\0- \u007F]/.test(e.url) ? (u = t.enter("destinationLiteral"), s += l.move("<"), s += l.move(
|
517
|
+
t.safe(e.url, { before: s, after: ">", ...l.current() })
|
518
|
+
), s += l.move(">")) : (u = t.enter("destinationRaw"), s += l.move(
|
521
519
|
t.safe(e.url, {
|
522
|
-
before:
|
520
|
+
before: s,
|
523
521
|
after: e.title ? " " : `
|
524
522
|
`,
|
525
|
-
...
|
523
|
+
...l.current()
|
526
524
|
})
|
527
|
-
)),
|
525
|
+
)), u(), e.title && (u = t.enter(`title${a}`), s += l.move(" " + o), s += l.move(
|
528
526
|
t.safe(e.title, {
|
529
|
-
before:
|
530
|
-
after:
|
531
|
-
...
|
527
|
+
before: s,
|
528
|
+
after: o,
|
529
|
+
...l.current()
|
532
530
|
})
|
533
|
-
),
|
531
|
+
), s += l.move(o), u()), r(), s;
|
534
532
|
}
|
535
533
|
function Mt(e) {
|
536
534
|
const n = e.options.emphasis || "*";
|
@@ -543,32 +541,32 @@ function Mt(e) {
|
|
543
541
|
function M(e) {
|
544
542
|
return "&#x" + e.toString(16).toUpperCase() + ";";
|
545
543
|
}
|
546
|
-
function
|
547
|
-
const i =
|
548
|
-
return i === void 0 ?
|
544
|
+
function $(e, n, t) {
|
545
|
+
const i = W(e), o = W(n);
|
546
|
+
return i === void 0 ? o === void 0 ? (
|
549
547
|
// Letter inside:
|
550
548
|
// we have to encode *both* letters for `_` as it is looser.
|
551
549
|
// it already forms for `*` (and GFMs `~`).
|
552
550
|
t === "_" ? { inside: !0, outside: !0 } : { inside: !1, outside: !1 }
|
553
|
-
) :
|
551
|
+
) : o === 1 ? (
|
554
552
|
// Whitespace inside: encode both (letter, whitespace).
|
555
553
|
{ inside: !0, outside: !0 }
|
556
554
|
) : (
|
557
555
|
// Punctuation inside: encode outer (letter)
|
558
556
|
{ inside: !1, outside: !0 }
|
559
|
-
) : i === 1 ?
|
557
|
+
) : i === 1 ? o === void 0 ? (
|
560
558
|
// Letter inside: already forms.
|
561
559
|
{ inside: !1, outside: !1 }
|
562
|
-
) :
|
560
|
+
) : o === 1 ? (
|
563
561
|
// Whitespace inside: encode both (whitespace).
|
564
562
|
{ inside: !0, outside: !0 }
|
565
563
|
) : (
|
566
564
|
// Punctuation inside: already forms.
|
567
565
|
{ inside: !1, outside: !1 }
|
568
|
-
) :
|
566
|
+
) : o === void 0 ? (
|
569
567
|
// Letter inside: already forms.
|
570
568
|
{ inside: !1, outside: !1 }
|
571
|
-
) :
|
569
|
+
) : o === 1 ? (
|
572
570
|
// Whitespace inside: encode inner (whitespace).
|
573
571
|
{ inside: !0, outside: !1 }
|
574
572
|
) : (
|
@@ -576,52 +574,52 @@ function W(e, n, t) {
|
|
576
574
|
{ inside: !1, outside: !1 }
|
577
575
|
);
|
578
576
|
}
|
579
|
-
|
580
|
-
function
|
581
|
-
const
|
582
|
-
let
|
577
|
+
ge.peek = _t;
|
578
|
+
function ge(e, n, t, i) {
|
579
|
+
const o = Mt(t), a = t.enter("emphasis"), r = t.createTracker(i), u = r.move(o);
|
580
|
+
let l = r.move(
|
583
581
|
t.containerPhrasing(e, {
|
584
|
-
after:
|
585
|
-
before:
|
582
|
+
after: o,
|
583
|
+
before: u,
|
586
584
|
...r.current()
|
587
585
|
})
|
588
586
|
);
|
589
|
-
const
|
587
|
+
const s = l.charCodeAt(0), h = $(
|
590
588
|
i.before.charCodeAt(i.before.length - 1),
|
591
|
-
|
592
|
-
|
589
|
+
s,
|
590
|
+
o
|
593
591
|
);
|
594
|
-
|
595
|
-
const
|
596
|
-
p.inside && (
|
597
|
-
const g = r.move(
|
592
|
+
h.inside && (l = M(s) + l.slice(1));
|
593
|
+
const c = l.charCodeAt(l.length - 1), p = $(i.after.charCodeAt(0), c, o);
|
594
|
+
p.inside && (l = l.slice(0, -1) + M(c));
|
595
|
+
const g = r.move(o);
|
598
596
|
return a(), t.attentionEncodeSurroundingInfo = {
|
599
597
|
after: p.outside,
|
600
|
-
before:
|
601
|
-
},
|
598
|
+
before: h.outside
|
599
|
+
}, u + l + g;
|
602
600
|
}
|
603
601
|
function _t(e, n, t) {
|
604
602
|
return t.options.emphasis || "*";
|
605
603
|
}
|
606
604
|
function Ot(e, n) {
|
607
605
|
let t = !1;
|
608
|
-
return
|
606
|
+
return _e(e, function(i) {
|
609
607
|
if ("value" in i && /\r?\n|\r/.test(i.value) || i.type === "break")
|
610
|
-
return t = !0,
|
608
|
+
return t = !0, Oe;
|
611
609
|
}), !!((!e.depth || e.depth < 3) && ce(e) && (n.options.setext || t));
|
612
610
|
}
|
613
611
|
function jt(e, n, t, i) {
|
614
|
-
const
|
612
|
+
const o = Math.max(Math.min(6, e.depth || 1), 1), a = t.createTracker(i);
|
615
613
|
if (Ot(e, t)) {
|
616
|
-
const
|
614
|
+
const h = t.enter("headingSetext"), c = t.enter("phrasing"), p = t.containerPhrasing(e, {
|
617
615
|
...a.current(),
|
618
616
|
before: `
|
619
617
|
`,
|
620
618
|
after: `
|
621
619
|
`
|
622
620
|
});
|
623
|
-
return
|
624
|
-
` + (
|
621
|
+
return c(), h(), p + `
|
622
|
+
` + (o === 1 ? "=" : "-").repeat(
|
625
623
|
// The whole size…
|
626
624
|
p.length - // Minus the position of the character after the last EOL (or
|
627
625
|
// 0 if there is none)…
|
@@ -629,96 +627,96 @@ function jt(e, n, t, i) {
|
|
629
627
|
`)) + 1)
|
630
628
|
);
|
631
629
|
}
|
632
|
-
const r = "#".repeat(
|
630
|
+
const r = "#".repeat(o), u = t.enter("headingAtx"), l = t.enter("phrasing");
|
633
631
|
a.move(r + " ");
|
634
|
-
let
|
632
|
+
let s = t.containerPhrasing(e, {
|
635
633
|
before: "# ",
|
636
634
|
after: `
|
637
635
|
`,
|
638
636
|
...a.current()
|
639
637
|
});
|
640
|
-
return /^[\t ]/.test(
|
638
|
+
return /^[\t ]/.test(s) && (s = M(s.charCodeAt(0)) + s.slice(1)), s = s ? r + " " + s : r, t.options.closeAtx && (s += " " + r), l(), u(), s;
|
641
639
|
}
|
642
|
-
|
643
|
-
function
|
640
|
+
ke.peek = Bt;
|
641
|
+
function ke(e) {
|
644
642
|
return e.value || "";
|
645
643
|
}
|
646
644
|
function Bt() {
|
647
645
|
return "<";
|
648
646
|
}
|
649
|
-
|
650
|
-
function
|
651
|
-
const
|
652
|
-
let
|
653
|
-
const
|
654
|
-
let
|
655
|
-
return
|
656
|
-
t.safe(e.alt, { before:
|
657
|
-
),
|
647
|
+
be.peek = Wt;
|
648
|
+
function be(e, n, t, i) {
|
649
|
+
const o = J(t), a = o === '"' ? "Quote" : "Apostrophe", r = t.enter("image");
|
650
|
+
let u = t.enter("label");
|
651
|
+
const l = t.createTracker(i);
|
652
|
+
let s = l.move("![");
|
653
|
+
return s += l.move(
|
654
|
+
t.safe(e.alt, { before: s, after: "]", ...l.current() })
|
655
|
+
), s += l.move("]("), u(), // If there’s no url but there is a title…
|
658
656
|
!e.url && e.title || // If there are control characters or whitespace.
|
659
|
-
/[\0- \u007F]/.test(e.url) ? (
|
660
|
-
t.safe(e.url, { before:
|
661
|
-
),
|
657
|
+
/[\0- \u007F]/.test(e.url) ? (u = t.enter("destinationLiteral"), s += l.move("<"), s += l.move(
|
658
|
+
t.safe(e.url, { before: s, after: ">", ...l.current() })
|
659
|
+
), s += l.move(">")) : (u = t.enter("destinationRaw"), s += l.move(
|
662
660
|
t.safe(e.url, {
|
663
|
-
before:
|
661
|
+
before: s,
|
664
662
|
after: e.title ? " " : ")",
|
665
|
-
...
|
663
|
+
...l.current()
|
666
664
|
})
|
667
|
-
)),
|
665
|
+
)), u(), e.title && (u = t.enter(`title${a}`), s += l.move(" " + o), s += l.move(
|
668
666
|
t.safe(e.title, {
|
669
|
-
before:
|
670
|
-
after:
|
671
|
-
...
|
667
|
+
before: s,
|
668
|
+
after: o,
|
669
|
+
...l.current()
|
672
670
|
})
|
673
|
-
),
|
671
|
+
), s += l.move(o), u()), s += l.move(")"), r(), s;
|
674
672
|
}
|
675
|
-
function
|
673
|
+
function Wt() {
|
676
674
|
return "!";
|
677
675
|
}
|
678
|
-
|
679
|
-
function
|
680
|
-
const
|
676
|
+
xe.peek = $t;
|
677
|
+
function xe(e, n, t, i) {
|
678
|
+
const o = e.referenceType, a = t.enter("imageReference");
|
681
679
|
let r = t.enter("label");
|
682
|
-
const
|
683
|
-
let
|
684
|
-
const
|
685
|
-
before:
|
680
|
+
const u = t.createTracker(i);
|
681
|
+
let l = u.move("![");
|
682
|
+
const s = t.safe(e.alt, {
|
683
|
+
before: l,
|
686
684
|
after: "]",
|
687
|
-
...
|
685
|
+
...u.current()
|
688
686
|
});
|
689
|
-
|
690
|
-
const
|
687
|
+
l += u.move(s + "]["), r();
|
688
|
+
const h = t.stack;
|
691
689
|
t.stack = [], r = t.enter("reference");
|
692
|
-
const
|
693
|
-
before:
|
690
|
+
const c = t.safe(t.associationId(e), {
|
691
|
+
before: l,
|
694
692
|
after: "]",
|
695
|
-
...
|
693
|
+
...u.current()
|
696
694
|
});
|
697
|
-
return r(), t.stack =
|
695
|
+
return r(), t.stack = h, a(), o === "full" || !s || s !== c ? l += u.move(c + "]") : o === "shortcut" ? l = l.slice(0, -1) : l += u.move("]"), l;
|
698
696
|
}
|
699
|
-
function
|
697
|
+
function $t() {
|
700
698
|
return "!";
|
701
699
|
}
|
702
|
-
|
703
|
-
function
|
704
|
-
let i = e.value || "",
|
705
|
-
for (; new RegExp("(^|[^`])" +
|
706
|
-
|
700
|
+
we.peek = qt;
|
701
|
+
function we(e, n, t) {
|
702
|
+
let i = e.value || "", o = "`", a = -1;
|
703
|
+
for (; new RegExp("(^|[^`])" + o + "([^`]|$)").test(i); )
|
704
|
+
o += "`";
|
707
705
|
for (/[^ \r\n]/.test(i) && (/^[ \r\n]/.test(i) && /[ \r\n]$/.test(i) || /^`|`$/.test(i)) && (i = " " + i + " "); ++a < t.unsafe.length; ) {
|
708
|
-
const r = t.unsafe[a],
|
709
|
-
let
|
706
|
+
const r = t.unsafe[a], u = t.compilePattern(r);
|
707
|
+
let l;
|
710
708
|
if (r.atBreak)
|
711
|
-
for (;
|
712
|
-
let
|
713
|
-
i.charCodeAt(
|
709
|
+
for (; l = u.exec(i); ) {
|
710
|
+
let s = l.index;
|
711
|
+
i.charCodeAt(s) === 10 && i.charCodeAt(s - 1) === 13 && s--, i = i.slice(0, s) + " " + i.slice(l.index + 1);
|
714
712
|
}
|
715
713
|
}
|
716
|
-
return
|
714
|
+
return o + i + o;
|
717
715
|
}
|
718
716
|
function qt() {
|
719
717
|
return "`";
|
720
718
|
}
|
721
|
-
function
|
719
|
+
function de(e, n) {
|
722
720
|
const t = ce(e);
|
723
721
|
return !!(!n.options.resourceLink && // If there’s a url…
|
724
722
|
e.url && // And there’s a no title…
|
@@ -729,71 +727,71 @@ function we(e, n) {
|
|
729
727
|
// references don’t work), space, or angle brackets…
|
730
728
|
!/[\0- <>\u007F]/.test(e.url));
|
731
729
|
}
|
732
|
-
|
733
|
-
function
|
734
|
-
const
|
735
|
-
let
|
736
|
-
if (
|
737
|
-
const
|
738
|
-
t.stack = [],
|
739
|
-
let
|
740
|
-
return
|
730
|
+
Ce.peek = Ht;
|
731
|
+
function Ce(e, n, t, i) {
|
732
|
+
const o = J(t), a = o === '"' ? "Quote" : "Apostrophe", r = t.createTracker(i);
|
733
|
+
let u, l;
|
734
|
+
if (de(e, t)) {
|
735
|
+
const h = t.stack;
|
736
|
+
t.stack = [], u = t.enter("autolink");
|
737
|
+
let c = r.move("<");
|
738
|
+
return c += r.move(
|
741
739
|
t.containerPhrasing(e, {
|
742
|
-
before:
|
740
|
+
before: c,
|
743
741
|
after: ">",
|
744
742
|
...r.current()
|
745
743
|
})
|
746
|
-
),
|
744
|
+
), c += r.move(">"), u(), t.stack = h, c;
|
747
745
|
}
|
748
|
-
|
749
|
-
let
|
750
|
-
return
|
746
|
+
u = t.enter("link"), l = t.enter("label");
|
747
|
+
let s = r.move("[");
|
748
|
+
return s += r.move(
|
751
749
|
t.containerPhrasing(e, {
|
752
|
-
before:
|
750
|
+
before: s,
|
753
751
|
after: "](",
|
754
752
|
...r.current()
|
755
753
|
})
|
756
|
-
),
|
754
|
+
), s += r.move("]("), l(), // If there’s no url but there is a title…
|
757
755
|
!e.url && e.title || // If there are control characters or whitespace.
|
758
|
-
/[\0- \u007F]/.test(e.url) ? (
|
759
|
-
t.safe(e.url, { before:
|
760
|
-
),
|
756
|
+
/[\0- \u007F]/.test(e.url) ? (l = t.enter("destinationLiteral"), s += r.move("<"), s += r.move(
|
757
|
+
t.safe(e.url, { before: s, after: ">", ...r.current() })
|
758
|
+
), s += r.move(">")) : (l = t.enter("destinationRaw"), s += r.move(
|
761
759
|
t.safe(e.url, {
|
762
|
-
before:
|
760
|
+
before: s,
|
763
761
|
after: e.title ? " " : ")",
|
764
762
|
...r.current()
|
765
763
|
})
|
766
|
-
)),
|
764
|
+
)), l(), e.title && (l = t.enter(`title${a}`), s += r.move(" " + o), s += r.move(
|
767
765
|
t.safe(e.title, {
|
768
|
-
before:
|
769
|
-
after:
|
766
|
+
before: s,
|
767
|
+
after: o,
|
770
768
|
...r.current()
|
771
769
|
})
|
772
|
-
),
|
770
|
+
), s += r.move(o), l()), s += r.move(")"), u(), s;
|
773
771
|
}
|
774
772
|
function Ht(e, n, t) {
|
775
|
-
return
|
773
|
+
return de(e, t) ? "<" : "[";
|
776
774
|
}
|
777
|
-
|
778
|
-
function
|
779
|
-
const
|
775
|
+
ye.peek = Ut;
|
776
|
+
function ye(e, n, t, i) {
|
777
|
+
const o = e.referenceType, a = t.enter("linkReference");
|
780
778
|
let r = t.enter("label");
|
781
|
-
const
|
782
|
-
let
|
783
|
-
const
|
784
|
-
before:
|
779
|
+
const u = t.createTracker(i);
|
780
|
+
let l = u.move("[");
|
781
|
+
const s = t.containerPhrasing(e, {
|
782
|
+
before: l,
|
785
783
|
after: "]",
|
786
|
-
...
|
784
|
+
...u.current()
|
787
785
|
});
|
788
|
-
|
789
|
-
const
|
786
|
+
l += u.move(s + "]["), r();
|
787
|
+
const h = t.stack;
|
790
788
|
t.stack = [], r = t.enter("reference");
|
791
|
-
const
|
792
|
-
before:
|
789
|
+
const c = t.safe(t.associationId(e), {
|
790
|
+
before: l,
|
793
791
|
after: "]",
|
794
|
-
...
|
792
|
+
...u.current()
|
795
793
|
});
|
796
|
-
return r(), t.stack =
|
794
|
+
return r(), t.stack = h, a(), o === "full" || !s || s !== c ? l += u.move(c + "]") : o === "shortcut" ? l = l.slice(0, -1) : l += u.move("]"), l;
|
797
795
|
}
|
798
796
|
function Ut() {
|
799
797
|
return "[";
|
@@ -828,7 +826,7 @@ function Gt(e) {
|
|
828
826
|
);
|
829
827
|
return n;
|
830
828
|
}
|
831
|
-
function
|
829
|
+
function ve(e) {
|
832
830
|
const n = e.options.rule || "*";
|
833
831
|
if (n !== "*" && n !== "-" && n !== "_")
|
834
832
|
throw new Error(
|
@@ -837,32 +835,32 @@ function ye(e) {
|
|
837
835
|
return n;
|
838
836
|
}
|
839
837
|
function Qt(e, n, t, i) {
|
840
|
-
const
|
838
|
+
const o = t.enter("list"), a = t.bulletCurrent;
|
841
839
|
let r = e.ordered ? Gt(t) : K(t);
|
842
|
-
const
|
843
|
-
let
|
840
|
+
const u = e.ordered ? r === "." ? ")" : "." : Vt(t);
|
841
|
+
let l = n && t.bulletLastUsed ? r === t.bulletLastUsed : !1;
|
844
842
|
if (!e.ordered) {
|
845
|
-
const
|
843
|
+
const h = e.children ? e.children[0] : void 0;
|
846
844
|
if (
|
847
845
|
// Bullet could be used as a thematic break marker:
|
848
846
|
(r === "*" || r === "-") && // Empty first list item:
|
849
|
-
|
847
|
+
h && (!h.children || !h.children[0]) && // Directly in two other list items:
|
850
848
|
t.stack[t.stack.length - 1] === "list" && t.stack[t.stack.length - 2] === "listItem" && t.stack[t.stack.length - 3] === "list" && t.stack[t.stack.length - 4] === "listItem" && // That are each the first child.
|
851
|
-
t.indexStack[t.indexStack.length - 1] === 0 && t.indexStack[t.indexStack.length - 2] === 0 && t.indexStack[t.indexStack.length - 3] === 0 && (
|
849
|
+
t.indexStack[t.indexStack.length - 1] === 0 && t.indexStack[t.indexStack.length - 2] === 0 && t.indexStack[t.indexStack.length - 3] === 0 && (l = !0), ve(t) === r && h
|
852
850
|
) {
|
853
|
-
let
|
854
|
-
for (; ++
|
855
|
-
const p = e.children[
|
851
|
+
let c = -1;
|
852
|
+
for (; ++c < e.children.length; ) {
|
853
|
+
const p = e.children[c];
|
856
854
|
if (p && p.type === "listItem" && p.children && p.children[0] && p.children[0].type === "thematicBreak") {
|
857
|
-
|
855
|
+
l = !0;
|
858
856
|
break;
|
859
857
|
}
|
860
858
|
}
|
861
859
|
}
|
862
860
|
}
|
863
|
-
|
864
|
-
const
|
865
|
-
return t.bulletLastUsed = r, t.bulletCurrent = a,
|
861
|
+
l && (r = u), t.bulletCurrent = r;
|
862
|
+
const s = t.containerFlow(e, i);
|
863
|
+
return t.bulletLastUsed = r, t.bulletCurrent = a, o(), s;
|
866
864
|
}
|
867
865
|
function Nt(e) {
|
868
866
|
const n = e.options.listItemIndent || "one";
|
@@ -873,25 +871,25 @@ function Nt(e) {
|
|
873
871
|
return n;
|
874
872
|
}
|
875
873
|
function Zt(e, n, t, i) {
|
876
|
-
const
|
874
|
+
const o = Nt(t);
|
877
875
|
let a = t.bulletCurrent || K(t);
|
878
876
|
n && n.type === "list" && n.ordered && (a = (typeof n.start == "number" && n.start > -1 ? n.start : 1) + (t.options.incrementListMarker === !1 ? 0 : n.children.indexOf(e)) + a);
|
879
877
|
let r = a.length + 1;
|
880
|
-
(
|
881
|
-
const
|
882
|
-
|
883
|
-
const
|
884
|
-
t.containerFlow(e,
|
885
|
-
|
878
|
+
(o === "tab" || o === "mixed" && (n && n.type === "list" && n.spread || e.spread)) && (r = Math.ceil(r / 4) * 4);
|
879
|
+
const u = t.createTracker(i);
|
880
|
+
u.move(a + " ".repeat(r - a.length)), u.shift(r);
|
881
|
+
const l = t.enter("listItem"), s = t.indentLines(
|
882
|
+
t.containerFlow(e, u.current()),
|
883
|
+
h
|
886
884
|
);
|
887
|
-
return
|
888
|
-
function
|
889
|
-
return p ? (g ? "" : " ".repeat(r)) +
|
885
|
+
return l(), s;
|
886
|
+
function h(c, p, g) {
|
887
|
+
return p ? (g ? "" : " ".repeat(r)) + c : (g ? a : a + " ".repeat(r - a.length)) + c;
|
890
888
|
}
|
891
889
|
}
|
892
890
|
function Jt(e, n, t, i) {
|
893
|
-
const
|
894
|
-
return a(),
|
891
|
+
const o = t.enter("paragraph"), a = t.enter("phrasing"), r = t.containerPhrasing(e, i);
|
892
|
+
return a(), o(), r;
|
895
893
|
}
|
896
894
|
const Kt = (
|
897
895
|
/** @type {(node?: unknown) => node is Exclude<PhrasingContent, Html>} */
|
@@ -932,29 +930,29 @@ function Yt(e) {
|
|
932
930
|
);
|
933
931
|
return n;
|
934
932
|
}
|
935
|
-
|
936
|
-
function
|
937
|
-
const
|
938
|
-
let
|
933
|
+
Ae.peek = en;
|
934
|
+
function Ae(e, n, t, i) {
|
935
|
+
const o = Yt(t), a = t.enter("strong"), r = t.createTracker(i), u = r.move(o + o);
|
936
|
+
let l = r.move(
|
939
937
|
t.containerPhrasing(e, {
|
940
|
-
after:
|
941
|
-
before:
|
938
|
+
after: o,
|
939
|
+
before: u,
|
942
940
|
...r.current()
|
943
941
|
})
|
944
942
|
);
|
945
|
-
const
|
943
|
+
const s = l.charCodeAt(0), h = $(
|
946
944
|
i.before.charCodeAt(i.before.length - 1),
|
947
|
-
|
948
|
-
|
945
|
+
s,
|
946
|
+
o
|
949
947
|
);
|
950
|
-
|
951
|
-
const
|
952
|
-
p.inside && (
|
953
|
-
const g = r.move(
|
948
|
+
h.inside && (l = M(s) + l.slice(1));
|
949
|
+
const c = l.charCodeAt(l.length - 1), p = $(i.after.charCodeAt(0), c, o);
|
950
|
+
p.inside && (l = l.slice(0, -1) + M(c));
|
951
|
+
const g = r.move(o + o);
|
954
952
|
return a(), t.attentionEncodeSurroundingInfo = {
|
955
953
|
after: p.outside,
|
956
|
-
before:
|
957
|
-
},
|
954
|
+
before: h.outside
|
955
|
+
}, u + l + g;
|
958
956
|
}
|
959
957
|
function en(e, n, t) {
|
960
958
|
return t.options.strong || "*";
|
@@ -971,28 +969,28 @@ function nn(e) {
|
|
971
969
|
return n;
|
972
970
|
}
|
973
971
|
function rn(e, n, t) {
|
974
|
-
const i = (
|
972
|
+
const i = (ve(t) + (t.options.ruleSpaces ? " " : "")).repeat(nn(t));
|
975
973
|
return t.options.ruleSpaces ? i.slice(0, -1) : i;
|
976
974
|
}
|
977
|
-
const
|
975
|
+
const De = {
|
978
976
|
blockquote: St,
|
979
977
|
break: le,
|
980
978
|
code: Et,
|
981
979
|
definition: Pt,
|
982
|
-
emphasis:
|
980
|
+
emphasis: ge,
|
983
981
|
hardBreak: le,
|
984
982
|
heading: jt,
|
985
|
-
html:
|
986
|
-
image:
|
987
|
-
imageReference:
|
988
|
-
inlineCode:
|
989
|
-
link:
|
990
|
-
linkReference:
|
983
|
+
html: ke,
|
984
|
+
image: be,
|
985
|
+
imageReference: xe,
|
986
|
+
inlineCode: we,
|
987
|
+
link: Ce,
|
988
|
+
linkReference: ye,
|
991
989
|
list: Qt,
|
992
990
|
listItem: Zt,
|
993
991
|
paragraph: Jt,
|
994
992
|
root: Xt,
|
995
|
-
strong:
|
993
|
+
strong: Ae,
|
996
994
|
text: tn,
|
997
995
|
thematicBreak: rn
|
998
996
|
};
|
@@ -1048,7 +1046,7 @@ function cn(e, n) {
|
|
1048
1046
|
return n === "|" ? n : e;
|
1049
1047
|
}
|
1050
1048
|
function fn(e) {
|
1051
|
-
const n = e || {}, t = n.tableCellPadding, i = n.tablePipeAlign,
|
1049
|
+
const n = e || {}, t = n.tableCellPadding, i = n.tablePipeAlign, o = n.stringLength, a = t ? " " : "|";
|
1052
1050
|
return {
|
1053
1051
|
unsafe: [
|
1054
1052
|
{ character: "\r", inConstruct: "tableCell" },
|
@@ -1072,19 +1070,19 @@ function fn(e) {
|
|
1072
1070
|
handlers: {
|
1073
1071
|
inlineCode: p,
|
1074
1072
|
table: r,
|
1075
|
-
tableCell:
|
1076
|
-
tableRow:
|
1073
|
+
tableCell: l,
|
1074
|
+
tableRow: u
|
1077
1075
|
}
|
1078
1076
|
};
|
1079
|
-
function r(g,
|
1080
|
-
return
|
1077
|
+
function r(g, m, b, x) {
|
1078
|
+
return s(h(g, b, x), g.align);
|
1081
1079
|
}
|
1082
|
-
function
|
1083
|
-
const k =
|
1080
|
+
function u(g, m, b, x) {
|
1081
|
+
const k = c(g, b, x), w = s([k]);
|
1084
1082
|
return w.slice(0, w.indexOf(`
|
1085
1083
|
`));
|
1086
1084
|
}
|
1087
|
-
function
|
1085
|
+
function l(g, m, b, x) {
|
1088
1086
|
const k = b.enter("tableCell"), w = b.enter("phrasing"), d = b.containerPhrasing(g, {
|
1089
1087
|
...x,
|
1090
1088
|
before: a,
|
@@ -1092,35 +1090,35 @@ function fn(e) {
|
|
1092
1090
|
});
|
1093
1091
|
return w(), k(), d;
|
1094
1092
|
}
|
1095
|
-
function
|
1093
|
+
function s(g, m) {
|
1096
1094
|
return Dt(g, {
|
1097
|
-
align:
|
1095
|
+
align: m,
|
1098
1096
|
// @ts-expect-error: `markdown-table` types should support `null`.
|
1099
1097
|
alignDelimiters: i,
|
1100
1098
|
// @ts-expect-error: `markdown-table` types should support `null`.
|
1101
1099
|
padding: t,
|
1102
1100
|
// @ts-expect-error: `markdown-table` types should support `null`.
|
1103
|
-
stringLength:
|
1101
|
+
stringLength: o
|
1104
1102
|
});
|
1105
1103
|
}
|
1106
|
-
function
|
1104
|
+
function h(g, m, b) {
|
1107
1105
|
const x = g.children;
|
1108
1106
|
let k = -1;
|
1109
|
-
const w = [], d =
|
1107
|
+
const w = [], d = m.enter("table");
|
1110
1108
|
for (; ++k < x.length; )
|
1111
|
-
w[k] =
|
1109
|
+
w[k] = c(x[k], m, b);
|
1112
1110
|
return d(), w;
|
1113
1111
|
}
|
1114
|
-
function
|
1112
|
+
function c(g, m, b) {
|
1115
1113
|
const x = g.children;
|
1116
1114
|
let k = -1;
|
1117
|
-
const w = [], d =
|
1115
|
+
const w = [], d = m.enter("tableRow");
|
1118
1116
|
for (; ++k < x.length; )
|
1119
|
-
w[k] =
|
1117
|
+
w[k] = l(x[k], g, m, b);
|
1120
1118
|
return d(), w;
|
1121
1119
|
}
|
1122
|
-
function p(g,
|
1123
|
-
let x =
|
1120
|
+
function p(g, m, b) {
|
1121
|
+
let x = De.inlineCode(g, m, b);
|
1124
1122
|
return b.stack.includes("tableCell") && (x = x.replace(/\|/g, "\\$&")), x;
|
1125
1123
|
}
|
1126
1124
|
}
|
@@ -1148,12 +1146,12 @@ function pn(e) {
|
|
1148
1146
|
if (n && n.type === "listItem" && typeof n.checked == "boolean") {
|
1149
1147
|
const t = this.stack[this.stack.length - 1], i = t.children[0];
|
1150
1148
|
if (i && i.type === "text") {
|
1151
|
-
const
|
1149
|
+
const o = n.children;
|
1152
1150
|
let a = -1, r;
|
1153
|
-
for (; ++a <
|
1154
|
-
const
|
1155
|
-
if (
|
1156
|
-
r =
|
1151
|
+
for (; ++a < o.length; ) {
|
1152
|
+
const u = o[a];
|
1153
|
+
if (u.type === "paragraph") {
|
1154
|
+
r = u;
|
1157
1155
|
break;
|
1158
1156
|
}
|
1159
1157
|
}
|
@@ -1163,21 +1161,21 @@ function pn(e) {
|
|
1163
1161
|
this.exit(e);
|
1164
1162
|
}
|
1165
1163
|
function gn(e, n, t, i) {
|
1166
|
-
const
|
1167
|
-
a &&
|
1168
|
-
let
|
1164
|
+
const o = e.children[0], a = typeof e.checked == "boolean" && o && o.type === "paragraph", r = "[" + (e.checked ? "x" : " ") + "] ", u = t.createTracker(i);
|
1165
|
+
a && u.move(r);
|
1166
|
+
let l = De.listItem(e, n, t, {
|
1169
1167
|
...i,
|
1170
|
-
...
|
1168
|
+
...u.current()
|
1171
1169
|
});
|
1172
|
-
return a && (
|
1173
|
-
function
|
1174
|
-
return
|
1170
|
+
return a && (l = l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/, s)), l;
|
1171
|
+
function s(h) {
|
1172
|
+
return h + r;
|
1175
1173
|
}
|
1176
1174
|
}
|
1177
1175
|
function kn() {
|
1178
1176
|
return [
|
1179
|
-
|
1180
|
-
|
1177
|
+
Ne(),
|
1178
|
+
gt(),
|
1181
1179
|
wt(),
|
1182
1180
|
ln(),
|
1183
1181
|
hn()
|
@@ -1186,8 +1184,8 @@ function kn() {
|
|
1186
1184
|
function bn(e) {
|
1187
1185
|
return {
|
1188
1186
|
extensions: [
|
1189
|
-
|
1190
|
-
|
1187
|
+
Ze(),
|
1188
|
+
kt(e),
|
1191
1189
|
dt(),
|
1192
1190
|
fn(e),
|
1193
1191
|
mn()
|
@@ -1197,72 +1195,72 @@ function bn(e) {
|
|
1197
1195
|
const xn = {
|
1198
1196
|
tokenize: An,
|
1199
1197
|
partial: !0
|
1200
|
-
},
|
1198
|
+
}, Fe = {
|
1201
1199
|
tokenize: Dn,
|
1202
1200
|
partial: !0
|
1203
|
-
},
|
1201
|
+
}, Se = {
|
1204
1202
|
tokenize: Fn,
|
1205
1203
|
partial: !0
|
1206
|
-
},
|
1204
|
+
}, Le = {
|
1207
1205
|
tokenize: Sn,
|
1208
1206
|
partial: !0
|
1209
1207
|
}, wn = {
|
1210
|
-
tokenize:
|
1208
|
+
tokenize: Ln,
|
1211
1209
|
partial: !0
|
1212
1210
|
}, Te = {
|
1213
1211
|
name: "wwwAutolink",
|
1214
1212
|
tokenize: yn,
|
1215
|
-
previous:
|
1216
|
-
},
|
1213
|
+
previous: Ie
|
1214
|
+
}, ze = {
|
1217
1215
|
name: "protocolAutolink",
|
1218
1216
|
tokenize: vn,
|
1219
|
-
previous:
|
1217
|
+
previous: Ee
|
1220
1218
|
}, F = {
|
1221
1219
|
name: "emailAutolink",
|
1222
1220
|
tokenize: Cn,
|
1223
|
-
previous:
|
1221
|
+
previous: Re
|
1224
1222
|
}, D = {};
|
1225
1223
|
function dn() {
|
1226
1224
|
return {
|
1227
1225
|
text: D
|
1228
1226
|
};
|
1229
1227
|
}
|
1230
|
-
let
|
1231
|
-
for (;
|
1232
|
-
D[
|
1228
|
+
let L = 48;
|
1229
|
+
for (; L < 123; )
|
1230
|
+
D[L] = F, L++, L === 58 ? L = 65 : L === 91 && (L = 97);
|
1233
1231
|
D[43] = F;
|
1234
1232
|
D[45] = F;
|
1235
1233
|
D[46] = F;
|
1236
1234
|
D[95] = F;
|
1237
|
-
D[72] = [F,
|
1238
|
-
D[104] = [F,
|
1235
|
+
D[72] = [F, ze];
|
1236
|
+
D[104] = [F, ze];
|
1239
1237
|
D[87] = [F, Te];
|
1240
1238
|
D[119] = [F, Te];
|
1241
1239
|
function Cn(e, n, t) {
|
1242
1240
|
const i = this;
|
1243
|
-
let
|
1241
|
+
let o, a;
|
1244
1242
|
return r;
|
1245
|
-
function r(
|
1246
|
-
return !Q(
|
1243
|
+
function r(c) {
|
1244
|
+
return !Q(c) || !Re.call(i, i.previous) || X(i.events) ? t(c) : (e.enter("literalAutolink"), e.enter("literalAutolinkEmail"), u(c));
|
1247
1245
|
}
|
1248
|
-
function c
|
1249
|
-
return Q(
|
1246
|
+
function u(c) {
|
1247
|
+
return Q(c) ? (e.consume(c), u) : c === 64 ? (e.consume(c), l) : t(c);
|
1250
1248
|
}
|
1251
|
-
function
|
1252
|
-
return
|
1249
|
+
function l(c) {
|
1250
|
+
return c === 46 ? e.check(wn, h, s)(c) : c === 45 || c === 95 || Z(c) ? (a = !0, e.consume(c), l) : h(c);
|
1253
1251
|
}
|
1254
|
-
function
|
1255
|
-
return e.consume(
|
1252
|
+
function s(c) {
|
1253
|
+
return e.consume(c), o = !0, l;
|
1256
1254
|
}
|
1257
|
-
function
|
1258
|
-
return a &&
|
1255
|
+
function h(c) {
|
1256
|
+
return a && o && P(i.previous) ? (e.exit("literalAutolinkEmail"), e.exit("literalAutolink"), n(c)) : t(c);
|
1259
1257
|
}
|
1260
1258
|
}
|
1261
1259
|
function yn(e, n, t) {
|
1262
1260
|
const i = this;
|
1263
|
-
return
|
1264
|
-
function
|
1265
|
-
return r !== 87 && r !== 119 || !
|
1261
|
+
return o;
|
1262
|
+
function o(r) {
|
1263
|
+
return r !== 87 && r !== 119 || !Ie.call(i, i.previous) || X(i.events) ? t(r) : (e.enter("literalAutolink"), e.enter("literalAutolinkWww"), e.check(xn, e.attempt(Fe, e.attempt(Se, a), t), t)(r));
|
1266
1264
|
}
|
1267
1265
|
function a(r) {
|
1268
1266
|
return e.exit("literalAutolinkWww"), e.exit("literalAutolink"), n(r);
|
@@ -1270,99 +1268,99 @@ function yn(e, n, t) {
|
|
1270
1268
|
}
|
1271
1269
|
function vn(e, n, t) {
|
1272
1270
|
const i = this;
|
1273
|
-
let
|
1271
|
+
let o = "", a = !1;
|
1274
1272
|
return r;
|
1275
|
-
function r(
|
1276
|
-
return (
|
1273
|
+
function r(c) {
|
1274
|
+
return (c === 72 || c === 104) && Ee.call(i, i.previous) && !X(i.events) ? (e.enter("literalAutolink"), e.enter("literalAutolinkHttp"), o += String.fromCodePoint(c), e.consume(c), u) : t(c);
|
1277
1275
|
}
|
1278
|
-
function c
|
1279
|
-
if (P(
|
1280
|
-
return
|
1281
|
-
if (
|
1282
|
-
const p =
|
1276
|
+
function u(c) {
|
1277
|
+
if (P(c) && o.length < 5)
|
1278
|
+
return o += String.fromCodePoint(c), e.consume(c), u;
|
1279
|
+
if (c === 58) {
|
1280
|
+
const p = o.toLowerCase();
|
1283
1281
|
if (p === "http" || p === "https")
|
1284
|
-
return e.consume(
|
1282
|
+
return e.consume(c), l;
|
1285
1283
|
}
|
1286
|
-
return t(
|
1284
|
+
return t(c);
|
1287
1285
|
}
|
1288
|
-
function
|
1289
|
-
return
|
1286
|
+
function l(c) {
|
1287
|
+
return c === 47 ? (e.consume(c), a ? s : (a = !0, l)) : t(c);
|
1290
1288
|
}
|
1291
|
-
function
|
1292
|
-
return
|
1289
|
+
function s(c) {
|
1290
|
+
return c === null || je(c) || A(c) || I(c) || N(c) ? t(c) : e.attempt(Fe, e.attempt(Se, h), t)(c);
|
1293
1291
|
}
|
1294
|
-
function
|
1295
|
-
return e.exit("literalAutolinkHttp"), e.exit("literalAutolink"), n(
|
1292
|
+
function h(c) {
|
1293
|
+
return e.exit("literalAutolinkHttp"), e.exit("literalAutolink"), n(c);
|
1296
1294
|
}
|
1297
1295
|
}
|
1298
1296
|
function An(e, n, t) {
|
1299
1297
|
let i = 0;
|
1300
|
-
return
|
1301
|
-
function
|
1302
|
-
return (r === 87 || r === 119) && i < 3 ? (i++, e.consume(r),
|
1298
|
+
return o;
|
1299
|
+
function o(r) {
|
1300
|
+
return (r === 87 || r === 119) && i < 3 ? (i++, e.consume(r), o) : r === 46 && i === 3 ? (e.consume(r), a) : t(r);
|
1303
1301
|
}
|
1304
1302
|
function a(r) {
|
1305
1303
|
return r === null ? t(r) : n(r);
|
1306
1304
|
}
|
1307
1305
|
}
|
1308
1306
|
function Dn(e, n, t) {
|
1309
|
-
let i,
|
1307
|
+
let i, o, a;
|
1310
1308
|
return r;
|
1311
|
-
function r(
|
1312
|
-
return
|
1309
|
+
function r(s) {
|
1310
|
+
return s === 46 || s === 95 ? e.check(Le, l, u)(s) : s === null || A(s) || I(s) || s !== 45 && N(s) ? l(s) : (a = !0, e.consume(s), r);
|
1313
1311
|
}
|
1314
|
-
function
|
1315
|
-
return
|
1312
|
+
function u(s) {
|
1313
|
+
return s === 95 ? i = !0 : (o = i, i = void 0), e.consume(s), r;
|
1316
1314
|
}
|
1317
|
-
function
|
1318
|
-
return
|
1315
|
+
function l(s) {
|
1316
|
+
return o || i || !a ? t(s) : n(s);
|
1319
1317
|
}
|
1320
1318
|
}
|
1321
1319
|
function Fn(e, n) {
|
1322
1320
|
let t = 0, i = 0;
|
1323
|
-
return
|
1324
|
-
function
|
1325
|
-
return r === 40 ? (t++, e.consume(r),
|
1321
|
+
return o;
|
1322
|
+
function o(r) {
|
1323
|
+
return r === 40 ? (t++, e.consume(r), o) : r === 41 && i < t ? a(r) : r === 33 || r === 34 || r === 38 || r === 39 || r === 41 || r === 42 || r === 44 || r === 46 || r === 58 || r === 59 || r === 60 || r === 63 || r === 93 || r === 95 || r === 126 ? e.check(Le, n, a)(r) : r === null || A(r) || I(r) ? n(r) : (e.consume(r), o);
|
1326
1324
|
}
|
1327
1325
|
function a(r) {
|
1328
|
-
return r === 41 && i++, e.consume(r),
|
1326
|
+
return r === 41 && i++, e.consume(r), o;
|
1329
1327
|
}
|
1330
1328
|
}
|
1331
1329
|
function Sn(e, n, t) {
|
1332
1330
|
return i;
|
1333
|
-
function i(
|
1334
|
-
return
|
1331
|
+
function i(u) {
|
1332
|
+
return u === 33 || u === 34 || u === 39 || u === 41 || u === 42 || u === 44 || u === 46 || u === 58 || u === 59 || u === 63 || u === 95 || u === 126 ? (e.consume(u), i) : u === 38 ? (e.consume(u), a) : u === 93 ? (e.consume(u), o) : (
|
1335
1333
|
// `<` is an end.
|
1336
|
-
|
1337
|
-
|
1334
|
+
u === 60 || // So is whitespace.
|
1335
|
+
u === null || A(u) || I(u) ? n(u) : t(u)
|
1338
1336
|
);
|
1339
1337
|
}
|
1340
|
-
function
|
1341
|
-
return
|
1338
|
+
function o(u) {
|
1339
|
+
return u === null || u === 40 || u === 91 || A(u) || I(u) ? n(u) : i(u);
|
1342
1340
|
}
|
1343
|
-
function a(
|
1344
|
-
return P(
|
1341
|
+
function a(u) {
|
1342
|
+
return P(u) ? r(u) : t(u);
|
1345
1343
|
}
|
1346
|
-
function r(
|
1347
|
-
return
|
1344
|
+
function r(u) {
|
1345
|
+
return u === 59 ? (e.consume(u), i) : P(u) ? (e.consume(u), r) : t(u);
|
1348
1346
|
}
|
1349
1347
|
}
|
1350
|
-
function
|
1348
|
+
function Ln(e, n, t) {
|
1351
1349
|
return i;
|
1352
1350
|
function i(a) {
|
1353
|
-
return e.consume(a),
|
1351
|
+
return e.consume(a), o;
|
1354
1352
|
}
|
1355
|
-
function
|
1353
|
+
function o(a) {
|
1356
1354
|
return Z(a) ? t(a) : n(a);
|
1357
1355
|
}
|
1358
1356
|
}
|
1359
|
-
function
|
1357
|
+
function Ie(e) {
|
1360
1358
|
return e === null || e === 40 || e === 42 || e === 95 || e === 91 || e === 93 || e === 126 || A(e);
|
1361
1359
|
}
|
1362
|
-
function
|
1360
|
+
function Ee(e) {
|
1363
1361
|
return !P(e);
|
1364
1362
|
}
|
1365
|
-
function
|
1363
|
+
function Re(e) {
|
1366
1364
|
return !(e === 47 || Q(e));
|
1367
1365
|
}
|
1368
1366
|
function Q(e) {
|
@@ -1383,7 +1381,7 @@ function X(e) {
|
|
1383
1381
|
}
|
1384
1382
|
return e.length > 0 && !t && (e[e.length - 1][1]._gfmAutolinkLiteralWalkedInto = !0), t;
|
1385
1383
|
}
|
1386
|
-
const
|
1384
|
+
const Tn = {
|
1387
1385
|
tokenize: On,
|
1388
1386
|
partial: !0
|
1389
1387
|
};
|
@@ -1415,27 +1413,27 @@ function zn() {
|
|
1415
1413
|
}
|
1416
1414
|
function In(e, n, t) {
|
1417
1415
|
const i = this;
|
1418
|
-
let
|
1416
|
+
let o = i.events.length;
|
1419
1417
|
const a = i.parser.gfmFootnotes || (i.parser.gfmFootnotes = []);
|
1420
1418
|
let r;
|
1421
|
-
for (;
|
1422
|
-
const
|
1423
|
-
if (
|
1424
|
-
r =
|
1419
|
+
for (; o--; ) {
|
1420
|
+
const l = i.events[o][1];
|
1421
|
+
if (l.type === "labelImage") {
|
1422
|
+
r = l;
|
1425
1423
|
break;
|
1426
1424
|
}
|
1427
|
-
if (
|
1425
|
+
if (l.type === "gfmFootnoteCall" || l.type === "labelLink" || l.type === "label" || l.type === "image" || l.type === "link")
|
1428
1426
|
break;
|
1429
1427
|
}
|
1430
|
-
return
|
1431
|
-
function
|
1428
|
+
return u;
|
1429
|
+
function u(l) {
|
1432
1430
|
if (!r || !r._balanced)
|
1433
|
-
return t(
|
1434
|
-
const
|
1431
|
+
return t(l);
|
1432
|
+
const s = _(i.sliceSerialize({
|
1435
1433
|
start: r.end,
|
1436
1434
|
end: i.now()
|
1437
1435
|
}));
|
1438
|
-
return
|
1436
|
+
return s.codePointAt(0) !== 94 || !a.includes(s.slice(1)) ? t(l) : (e.enter("gfmFootnoteCallLabelMarker"), e.consume(l), e.exit("gfmFootnoteCallLabelMarker"), n(l));
|
1439
1437
|
}
|
1440
1438
|
}
|
1441
1439
|
function En(e, n) {
|
@@ -1447,22 +1445,22 @@ function En(e, n) {
|
|
1447
1445
|
type: "gfmFootnoteCall",
|
1448
1446
|
start: Object.assign({}, e[t + 3][1].start),
|
1449
1447
|
end: Object.assign({}, e[e.length - 1][1].end)
|
1450
|
-
},
|
1448
|
+
}, o = {
|
1451
1449
|
type: "gfmFootnoteCallMarker",
|
1452
1450
|
start: Object.assign({}, e[t + 3][1].end),
|
1453
1451
|
end: Object.assign({}, e[t + 3][1].end)
|
1454
1452
|
};
|
1455
|
-
|
1453
|
+
o.end.column++, o.end.offset++, o.end._bufferIndex++;
|
1456
1454
|
const a = {
|
1457
1455
|
type: "gfmFootnoteCallString",
|
1458
|
-
start: Object.assign({},
|
1456
|
+
start: Object.assign({}, o.end),
|
1459
1457
|
end: Object.assign({}, e[e.length - 1][1].start)
|
1460
1458
|
}, r = {
|
1461
1459
|
type: "chunkString",
|
1462
1460
|
contentType: "string",
|
1463
1461
|
start: Object.assign({}, a.start),
|
1464
1462
|
end: Object.assign({}, a.end)
|
1465
|
-
},
|
1463
|
+
}, u = [
|
1466
1464
|
// Take the `labelImageMarker` (now `data`, the `!`)
|
1467
1465
|
e[t + 1],
|
1468
1466
|
e[t + 2],
|
@@ -1471,8 +1469,8 @@ function En(e, n) {
|
|
1471
1469
|
e[t + 3],
|
1472
1470
|
e[t + 4],
|
1473
1471
|
// The `^`.
|
1474
|
-
["enter",
|
1475
|
-
["exit",
|
1472
|
+
["enter", o, n],
|
1473
|
+
["exit", o, n],
|
1476
1474
|
// Everything in between.
|
1477
1475
|
["enter", a, n],
|
1478
1476
|
["enter", r, n],
|
@@ -1483,84 +1481,84 @@ function En(e, n) {
|
|
1483
1481
|
e[e.length - 1],
|
1484
1482
|
["exit", i, n]
|
1485
1483
|
];
|
1486
|
-
return e.splice(t, e.length - t + 1, ...
|
1484
|
+
return e.splice(t, e.length - t + 1, ...u), e;
|
1487
1485
|
}
|
1488
1486
|
function Rn(e, n, t) {
|
1489
|
-
const i = this,
|
1487
|
+
const i = this, o = i.parser.gfmFootnotes || (i.parser.gfmFootnotes = []);
|
1490
1488
|
let a = 0, r;
|
1491
|
-
return
|
1492
|
-
function c
|
1493
|
-
return e.enter("gfmFootnoteCall"), e.enter("gfmFootnoteCallLabelMarker"), e.consume(
|
1489
|
+
return u;
|
1490
|
+
function u(c) {
|
1491
|
+
return e.enter("gfmFootnoteCall"), e.enter("gfmFootnoteCallLabelMarker"), e.consume(c), e.exit("gfmFootnoteCallLabelMarker"), l;
|
1494
1492
|
}
|
1495
|
-
function
|
1496
|
-
return
|
1493
|
+
function l(c) {
|
1494
|
+
return c !== 94 ? t(c) : (e.enter("gfmFootnoteCallMarker"), e.consume(c), e.exit("gfmFootnoteCallMarker"), e.enter("gfmFootnoteCallString"), e.enter("chunkString").contentType = "string", s);
|
1497
1495
|
}
|
1498
|
-
function
|
1496
|
+
function s(c) {
|
1499
1497
|
if (
|
1500
1498
|
// Too long.
|
1501
1499
|
a > 999 || // Closing brace with nothing.
|
1502
|
-
|
1500
|
+
c === 93 && !r || // Space or tab is not supported by GFM for some reason.
|
1503
1501
|
// `\n` and `[` not being supported makes sense.
|
1504
|
-
|
1502
|
+
c === null || c === 91 || A(c)
|
1505
1503
|
)
|
1506
|
-
return t(
|
1507
|
-
if (
|
1504
|
+
return t(c);
|
1505
|
+
if (c === 93) {
|
1508
1506
|
e.exit("chunkString");
|
1509
1507
|
const p = e.exit("gfmFootnoteCallString");
|
1510
|
-
return
|
1508
|
+
return o.includes(_(i.sliceSerialize(p))) ? (e.enter("gfmFootnoteCallLabelMarker"), e.consume(c), e.exit("gfmFootnoteCallLabelMarker"), e.exit("gfmFootnoteCall"), n) : t(c);
|
1511
1509
|
}
|
1512
|
-
return A(
|
1510
|
+
return A(c) || (r = !0), a++, e.consume(c), c === 92 ? h : s;
|
1513
1511
|
}
|
1514
|
-
function
|
1515
|
-
return
|
1512
|
+
function h(c) {
|
1513
|
+
return c === 91 || c === 92 || c === 93 ? (e.consume(c), a++, s) : s(c);
|
1516
1514
|
}
|
1517
1515
|
}
|
1518
1516
|
function Pn(e, n, t) {
|
1519
|
-
const i = this,
|
1520
|
-
let a, r = 0,
|
1521
|
-
return
|
1522
|
-
function
|
1523
|
-
return e.enter("gfmFootnoteDefinition")._container = !0, e.enter("gfmFootnoteDefinitionLabel"), e.enter("gfmFootnoteDefinitionLabelMarker"), e.consume(
|
1517
|
+
const i = this, o = i.parser.gfmFootnotes || (i.parser.gfmFootnotes = []);
|
1518
|
+
let a, r = 0, u;
|
1519
|
+
return l;
|
1520
|
+
function l(m) {
|
1521
|
+
return e.enter("gfmFootnoteDefinition")._container = !0, e.enter("gfmFootnoteDefinitionLabel"), e.enter("gfmFootnoteDefinitionLabelMarker"), e.consume(m), e.exit("gfmFootnoteDefinitionLabelMarker"), s;
|
1524
1522
|
}
|
1525
|
-
function
|
1526
|
-
return
|
1523
|
+
function s(m) {
|
1524
|
+
return m === 94 ? (e.enter("gfmFootnoteDefinitionMarker"), e.consume(m), e.exit("gfmFootnoteDefinitionMarker"), e.enter("gfmFootnoteDefinitionLabelString"), e.enter("chunkString").contentType = "string", h) : t(m);
|
1527
1525
|
}
|
1528
|
-
function m
|
1526
|
+
function h(m) {
|
1529
1527
|
if (
|
1530
1528
|
// Too long.
|
1531
1529
|
r > 999 || // Closing brace with nothing.
|
1532
|
-
|
1530
|
+
m === 93 && !u || // Space or tab is not supported by GFM for some reason.
|
1533
1531
|
// `\n` and `[` not being supported makes sense.
|
1534
|
-
|
1532
|
+
m === null || m === 91 || A(m)
|
1535
1533
|
)
|
1536
|
-
return t(
|
1537
|
-
if (
|
1534
|
+
return t(m);
|
1535
|
+
if (m === 93) {
|
1538
1536
|
e.exit("chunkString");
|
1539
1537
|
const b = e.exit("gfmFootnoteDefinitionLabelString");
|
1540
|
-
return a = _(i.sliceSerialize(b)), e.enter("gfmFootnoteDefinitionLabelMarker"), e.consume(
|
1538
|
+
return a = _(i.sliceSerialize(b)), e.enter("gfmFootnoteDefinitionLabelMarker"), e.consume(m), e.exit("gfmFootnoteDefinitionLabelMarker"), e.exit("gfmFootnoteDefinitionLabel"), p;
|
1541
1539
|
}
|
1542
|
-
return A(
|
1540
|
+
return A(m) || (u = !0), r++, e.consume(m), m === 92 ? c : h;
|
1543
1541
|
}
|
1544
|
-
function
|
1545
|
-
return
|
1542
|
+
function c(m) {
|
1543
|
+
return m === 91 || m === 92 || m === 93 ? (e.consume(m), r++, h) : h(m);
|
1546
1544
|
}
|
1547
|
-
function p(
|
1548
|
-
return
|
1545
|
+
function p(m) {
|
1546
|
+
return m === 58 ? (e.enter("definitionMarker"), e.consume(m), e.exit("definitionMarker"), o.includes(a) || o.push(a), S(e, g, "gfmFootnoteDefinitionWhitespace")) : t(m);
|
1549
1547
|
}
|
1550
|
-
function g(
|
1551
|
-
return n(
|
1548
|
+
function g(m) {
|
1549
|
+
return n(m);
|
1552
1550
|
}
|
1553
1551
|
}
|
1554
1552
|
function Mn(e, n, t) {
|
1555
|
-
return e.check(
|
1553
|
+
return e.check(Be, n, e.attempt(Tn, n, t));
|
1556
1554
|
}
|
1557
1555
|
function _n(e) {
|
1558
1556
|
e.exit("gfmFootnoteDefinition");
|
1559
1557
|
}
|
1560
1558
|
function On(e, n, t) {
|
1561
1559
|
const i = this;
|
1562
|
-
return S(e,
|
1563
|
-
function
|
1560
|
+
return S(e, o, "gfmFootnoteDefinitionIndent", 5);
|
1561
|
+
function o(a) {
|
1564
1562
|
const r = i.events[i.events.length - 1];
|
1565
1563
|
return r && r[1].type === "gfmFootnoteDefinitionIndent" && r[2].sliceSerialize(r[1], !0).length === 4 ? n(a) : t(a);
|
1566
1564
|
}
|
@@ -1570,7 +1568,7 @@ function jn(e) {
|
|
1570
1568
|
const i = {
|
1571
1569
|
name: "strikethrough",
|
1572
1570
|
tokenize: a,
|
1573
|
-
resolveAll:
|
1571
|
+
resolveAll: o
|
1574
1572
|
};
|
1575
1573
|
return t == null && (t = !0), {
|
1576
1574
|
text: {
|
@@ -1583,46 +1581,46 @@ function jn(e) {
|
|
1583
1581
|
null: [126]
|
1584
1582
|
}
|
1585
1583
|
};
|
1586
|
-
function
|
1587
|
-
let
|
1588
|
-
for (; ++
|
1589
|
-
if (r[
|
1590
|
-
let
|
1591
|
-
for (;
|
1592
|
-
if (r[
|
1593
|
-
r[
|
1594
|
-
r[
|
1595
|
-
const
|
1584
|
+
function o(r, u) {
|
1585
|
+
let l = -1;
|
1586
|
+
for (; ++l < r.length; )
|
1587
|
+
if (r[l][0] === "enter" && r[l][1].type === "strikethroughSequenceTemporary" && r[l][1]._close) {
|
1588
|
+
let s = l;
|
1589
|
+
for (; s--; )
|
1590
|
+
if (r[s][0] === "exit" && r[s][1].type === "strikethroughSequenceTemporary" && r[s][1]._open && // If the sizes are the same:
|
1591
|
+
r[l][1].end.offset - r[l][1].start.offset === r[s][1].end.offset - r[s][1].start.offset) {
|
1592
|
+
r[l][1].type = "strikethroughSequence", r[s][1].type = "strikethroughSequence";
|
1593
|
+
const h = {
|
1596
1594
|
type: "strikethrough",
|
1597
|
-
start: Object.assign({}, r[
|
1598
|
-
end: Object.assign({}, r[
|
1599
|
-
},
|
1595
|
+
start: Object.assign({}, r[s][1].start),
|
1596
|
+
end: Object.assign({}, r[l][1].end)
|
1597
|
+
}, c = {
|
1600
1598
|
type: "strikethroughText",
|
1601
|
-
start: Object.assign({}, r[
|
1602
|
-
end: Object.assign({}, r[
|
1603
|
-
}, p = [["enter",
|
1604
|
-
g && q(p, p.length, 0,
|
1599
|
+
start: Object.assign({}, r[s][1].end),
|
1600
|
+
end: Object.assign({}, r[l][1].start)
|
1601
|
+
}, p = [["enter", h, u], ["enter", r[s][1], u], ["exit", r[s][1], u], ["enter", c, u]], g = u.parser.constructs.insideSpan.null;
|
1602
|
+
g && q(p, p.length, 0, We(g, r.slice(s + 1, l), u)), q(p, p.length, 0, [["exit", c, u], ["enter", r[l][1], u], ["exit", r[l][1], u], ["exit", h, u]]), q(r, s - 1, l - s + 3, p), l = s + p.length - 2;
|
1605
1603
|
break;
|
1606
1604
|
}
|
1607
1605
|
}
|
1608
|
-
for (
|
1609
|
-
r[
|
1606
|
+
for (l = -1; ++l < r.length; )
|
1607
|
+
r[l][1].type === "strikethroughSequenceTemporary" && (r[l][1].type = "data");
|
1610
1608
|
return r;
|
1611
1609
|
}
|
1612
|
-
function a(r,
|
1613
|
-
const
|
1614
|
-
let
|
1610
|
+
function a(r, u, l) {
|
1611
|
+
const s = this.previous, h = this.events;
|
1612
|
+
let c = 0;
|
1615
1613
|
return p;
|
1616
|
-
function p(
|
1617
|
-
return
|
1614
|
+
function p(m) {
|
1615
|
+
return s === 126 && h[h.length - 1][1].type !== "characterEscape" ? l(m) : (r.enter("strikethroughSequenceTemporary"), g(m));
|
1618
1616
|
}
|
1619
|
-
function g(
|
1620
|
-
const b =
|
1621
|
-
if (
|
1622
|
-
return
|
1623
|
-
if (
|
1624
|
-
const x = r.exit("strikethroughSequenceTemporary"), k =
|
1625
|
-
return x._open = !k || k === 2 && !!b, x._close = !b || b === 2 && !!k,
|
1617
|
+
function g(m) {
|
1618
|
+
const b = W(s);
|
1619
|
+
if (m === 126)
|
1620
|
+
return c > 1 ? l(m) : (r.consume(m), c++, g);
|
1621
|
+
if (c < 2 && !t) return l(m);
|
1622
|
+
const x = r.exit("strikethroughSequenceTemporary"), k = W(m);
|
1623
|
+
return x._open = !k || k === 2 && !!b, x._close = !b || b === 2 && !!k, u(m);
|
1626
1624
|
}
|
1627
1625
|
}
|
1628
1626
|
}
|
@@ -1642,7 +1640,7 @@ class Bn {
|
|
1642
1640
|
* @returns {undefined}
|
1643
1641
|
*/
|
1644
1642
|
add(n, t, i) {
|
1645
|
-
|
1643
|
+
Wn(this, n, t, i);
|
1646
1644
|
}
|
1647
1645
|
// To do: add this when moving to `micromark`.
|
1648
1646
|
// /**
|
@@ -1672,44 +1670,44 @@ class Bn {
|
|
1672
1670
|
for (; t > 0; )
|
1673
1671
|
t -= 1, i.push(n.slice(this.map[t][0] + this.map[t][1]), this.map[t][2]), n.length = this.map[t][0];
|
1674
1672
|
i.push(n.slice()), n.length = 0;
|
1675
|
-
let
|
1676
|
-
for (;
|
1677
|
-
for (const a of
|
1673
|
+
let o = i.pop();
|
1674
|
+
for (; o; ) {
|
1675
|
+
for (const a of o)
|
1678
1676
|
n.push(a);
|
1679
|
-
|
1677
|
+
o = i.pop();
|
1680
1678
|
}
|
1681
1679
|
this.map.length = 0;
|
1682
1680
|
}
|
1683
1681
|
}
|
1684
|
-
function
|
1685
|
-
let
|
1682
|
+
function Wn(e, n, t, i) {
|
1683
|
+
let o = 0;
|
1686
1684
|
if (!(t === 0 && i.length === 0)) {
|
1687
|
-
for (;
|
1688
|
-
if (e.map[
|
1689
|
-
e.map[
|
1685
|
+
for (; o < e.map.length; ) {
|
1686
|
+
if (e.map[o][0] === n) {
|
1687
|
+
e.map[o][1] += t, e.map[o][2].push(...i);
|
1690
1688
|
return;
|
1691
1689
|
}
|
1692
|
-
|
1690
|
+
o += 1;
|
1693
1691
|
}
|
1694
1692
|
e.map.push([n, t, i]);
|
1695
1693
|
}
|
1696
1694
|
}
|
1697
|
-
function
|
1695
|
+
function $n(e, n) {
|
1698
1696
|
let t = !1;
|
1699
1697
|
const i = [];
|
1700
1698
|
for (; n < e.length; ) {
|
1701
|
-
const
|
1699
|
+
const o = e[n];
|
1702
1700
|
if (t) {
|
1703
|
-
if (
|
1704
|
-
|
1705
|
-
else if (
|
1701
|
+
if (o[0] === "enter")
|
1702
|
+
o[1].type === "tableContent" && i.push(e[n + 1][1].type === "tableDelimiterMarker" ? "left" : "none");
|
1703
|
+
else if (o[1].type === "tableContent") {
|
1706
1704
|
if (e[n - 1][1].type === "tableDelimiterMarker") {
|
1707
1705
|
const a = i.length - 1;
|
1708
1706
|
i[a] = i[a] === "left" ? "center" : "right";
|
1709
1707
|
}
|
1710
|
-
} else if (
|
1708
|
+
} else if (o[1].type === "tableDelimiterRow")
|
1711
1709
|
break;
|
1712
|
-
} else
|
1710
|
+
} else o[0] === "enter" && o[1].type === "tableDelimiterRow" && (t = !0);
|
1713
1711
|
n += 1;
|
1714
1712
|
}
|
1715
1713
|
return i;
|
@@ -1727,9 +1725,9 @@ function qn() {
|
|
1727
1725
|
}
|
1728
1726
|
function Hn(e, n, t) {
|
1729
1727
|
const i = this;
|
1730
|
-
let
|
1731
|
-
return
|
1732
|
-
function
|
1728
|
+
let o = 0, a = 0, r;
|
1729
|
+
return u;
|
1730
|
+
function u(f) {
|
1733
1731
|
let E = i.events.length - 1;
|
1734
1732
|
for (; E > -1; ) {
|
1735
1733
|
const te = i.events[E][1].type;
|
@@ -1737,32 +1735,32 @@ function Hn(e, n, t) {
|
|
1737
1735
|
te === "linePrefix") E--;
|
1738
1736
|
else break;
|
1739
1737
|
}
|
1740
|
-
const Y = E > -1 ? i.events[E][1].type : null, ee = Y === "tableHead" || Y === "tableRow" ? C :
|
1738
|
+
const Y = E > -1 ? i.events[E][1].type : null, ee = Y === "tableHead" || Y === "tableRow" ? C : l;
|
1741
1739
|
return ee === C && i.parser.lazy[i.now().line] ? t(f) : ee(f);
|
1742
1740
|
}
|
1743
|
-
function
|
1744
|
-
return e.enter("tableHead"), e.enter("tableRow"),
|
1741
|
+
function l(f) {
|
1742
|
+
return e.enter("tableHead"), e.enter("tableRow"), s(f);
|
1745
1743
|
}
|
1746
|
-
function
|
1747
|
-
return f === 124 || (r = !0, a += 1),
|
1744
|
+
function s(f) {
|
1745
|
+
return f === 124 || (r = !0, a += 1), h(f);
|
1748
1746
|
}
|
1749
|
-
function
|
1750
|
-
return f === null ? t(f) : R(f) ? a > 1 ? (a = 0, i.interrupt = !0, e.exit("tableRow"), e.enter("lineEnding"), e.consume(f), e.exit("lineEnding"), g) : t(f) :
|
1747
|
+
function h(f) {
|
1748
|
+
return f === null ? t(f) : R(f) ? a > 1 ? (a = 0, i.interrupt = !0, e.exit("tableRow"), e.enter("lineEnding"), e.consume(f), e.exit("lineEnding"), g) : t(f) : T(f) ? S(e, h, "whitespace")(f) : (a += 1, r && (r = !1, o += 1), f === 124 ? (e.enter("tableCellDivider"), e.consume(f), e.exit("tableCellDivider"), r = !0, h) : (e.enter("data"), c(f)));
|
1751
1749
|
}
|
1752
|
-
function
|
1753
|
-
return f === null || f === 124 || A(f) ? (e.exit("data"),
|
1750
|
+
function c(f) {
|
1751
|
+
return f === null || f === 124 || A(f) ? (e.exit("data"), h(f)) : (e.consume(f), f === 92 ? p : c);
|
1754
1752
|
}
|
1755
1753
|
function p(f) {
|
1756
|
-
return f === 92 || f === 124 ? (e.consume(f),
|
1754
|
+
return f === 92 || f === 124 ? (e.consume(f), c) : c(f);
|
1757
1755
|
}
|
1758
1756
|
function g(f) {
|
1759
|
-
return i.interrupt = !1, i.parser.lazy[i.now().line] ? t(f) : (e.enter("tableDelimiterRow"), r = !1,
|
1757
|
+
return i.interrupt = !1, i.parser.lazy[i.now().line] ? t(f) : (e.enter("tableDelimiterRow"), r = !1, T(f) ? S(e, m, "linePrefix", i.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(f) : m(f));
|
1760
1758
|
}
|
1761
|
-
function
|
1759
|
+
function m(f) {
|
1762
1760
|
return f === 45 || f === 58 ? x(f) : f === 124 ? (r = !0, e.enter("tableCellDivider"), e.consume(f), e.exit("tableCellDivider"), b) : y(f);
|
1763
1761
|
}
|
1764
1762
|
function b(f) {
|
1765
|
-
return
|
1763
|
+
return T(f) ? S(e, x, "whitespace")(f) : x(f);
|
1766
1764
|
}
|
1767
1765
|
function x(f) {
|
1768
1766
|
return f === 58 ? (a += 1, r = !0, e.enter("tableDelimiterMarker"), e.consume(f), e.exit("tableDelimiterMarker"), k) : f === 45 ? (a += 1, k(f)) : f === null || R(f) ? v(f) : y(f);
|
@@ -1774,10 +1772,10 @@ function Hn(e, n, t) {
|
|
1774
1772
|
return f === 45 ? (e.consume(f), w) : f === 58 ? (r = !0, e.exit("tableDelimiterFiller"), e.enter("tableDelimiterMarker"), e.consume(f), e.exit("tableDelimiterMarker"), d) : (e.exit("tableDelimiterFiller"), d(f));
|
1775
1773
|
}
|
1776
1774
|
function d(f) {
|
1777
|
-
return
|
1775
|
+
return T(f) ? S(e, v, "whitespace")(f) : v(f);
|
1778
1776
|
}
|
1779
1777
|
function v(f) {
|
1780
|
-
return f === 124 ?
|
1778
|
+
return f === 124 ? m(f) : f === null || R(f) ? !r || o !== a ? y(f) : (e.exit("tableDelimiterRow"), e.exit("tableHead"), n(f)) : y(f);
|
1781
1779
|
}
|
1782
1780
|
function y(f) {
|
1783
1781
|
return t(f);
|
@@ -1786,67 +1784,67 @@ function Hn(e, n, t) {
|
|
1786
1784
|
return e.enter("tableRow"), O(f);
|
1787
1785
|
}
|
1788
1786
|
function O(f) {
|
1789
|
-
return f === 124 ? (e.enter("tableCellDivider"), e.consume(f), e.exit("tableCellDivider"), O) : f === null || R(f) ? (e.exit("tableRow"), n(f)) :
|
1787
|
+
return f === 124 ? (e.enter("tableCellDivider"), e.consume(f), e.exit("tableCellDivider"), O) : f === null || R(f) ? (e.exit("tableRow"), n(f)) : T(f) ? S(e, O, "whitespace")(f) : (e.enter("data"), j(f));
|
1790
1788
|
}
|
1791
1789
|
function j(f) {
|
1792
|
-
return f === null || f === 124 || A(f) ? (e.exit("data"), O(f)) : (e.consume(f), f === 92 ?
|
1790
|
+
return f === null || f === 124 || A(f) ? (e.exit("data"), O(f)) : (e.consume(f), f === 92 ? Pe : j);
|
1793
1791
|
}
|
1794
|
-
function
|
1792
|
+
function Pe(f) {
|
1795
1793
|
return f === 92 || f === 124 ? (e.consume(f), j) : j(f);
|
1796
1794
|
}
|
1797
1795
|
}
|
1798
1796
|
function Un(e, n) {
|
1799
|
-
let t = -1, i = !0,
|
1797
|
+
let t = -1, i = !0, o = 0, a = [0, 0, 0, 0], r = [0, 0, 0, 0], u = !1, l = 0, s, h, c;
|
1800
1798
|
const p = new Bn();
|
1801
1799
|
for (; ++t < e.length; ) {
|
1802
|
-
const g = e[t],
|
1803
|
-
g[0] === "enter" ?
|
1800
|
+
const g = e[t], m = g[1];
|
1801
|
+
g[0] === "enter" ? m.type === "tableHead" ? (u = !1, l !== 0 && (ue(p, n, l, s, h), h = void 0, l = 0), s = {
|
1804
1802
|
type: "table",
|
1805
|
-
start: Object.assign({},
|
1803
|
+
start: Object.assign({}, m.start),
|
1806
1804
|
// Note: correct end is set later.
|
1807
|
-
end: Object.assign({},
|
1808
|
-
}, p.add(t, 0, [["enter",
|
1805
|
+
end: Object.assign({}, m.end)
|
1806
|
+
}, p.add(t, 0, [["enter", s, n]])) : m.type === "tableRow" || m.type === "tableDelimiterRow" ? (i = !0, c = void 0, a = [0, 0, 0, 0], r = [0, t + 1, 0, 0], u && (u = !1, h = {
|
1809
1807
|
type: "tableBody",
|
1810
|
-
start: Object.assign({},
|
1808
|
+
start: Object.assign({}, m.start),
|
1811
1809
|
// Note: correct end is set later.
|
1812
|
-
end: Object.assign({},
|
1813
|
-
}, p.add(t, 0, [["enter",
|
1810
|
+
end: Object.assign({}, m.end)
|
1811
|
+
}, p.add(t, 0, [["enter", h, n]])), o = m.type === "tableDelimiterRow" ? 2 : h ? 3 : 1) : o && (m.type === "data" || m.type === "tableDelimiterMarker" || m.type === "tableDelimiterFiller") ? (i = !1, r[2] === 0 && (a[1] !== 0 && (r[0] = r[1], c = B(p, n, a, o, void 0, c), a = [0, 0, 0, 0]), r[2] = t)) : m.type === "tableCellDivider" && (i ? i = !1 : (a[1] !== 0 && (r[0] = r[1], c = B(p, n, a, o, void 0, c)), a = r, r = [a[1], t, 0, 0])) : m.type === "tableHead" ? (u = !0, l = t) : m.type === "tableRow" || m.type === "tableDelimiterRow" ? (l = t, a[1] !== 0 ? (r[0] = r[1], c = B(p, n, a, o, t, c)) : r[1] !== 0 && (c = B(p, n, r, o, t, c)), o = 0) : o && (m.type === "data" || m.type === "tableDelimiterMarker" || m.type === "tableDelimiterFiller") && (r[3] = t);
|
1814
1812
|
}
|
1815
|
-
for (
|
1813
|
+
for (l !== 0 && ue(p, n, l, s, h), p.consume(n.events), t = -1; ++t < n.events.length; ) {
|
1816
1814
|
const g = n.events[t];
|
1817
|
-
g[0] === "enter" && g[1].type === "table" && (g[1]._align =
|
1815
|
+
g[0] === "enter" && g[1].type === "table" && (g[1]._align = $n(n.events, t));
|
1818
1816
|
}
|
1819
1817
|
return e;
|
1820
1818
|
}
|
1821
|
-
function B(e, n, t, i,
|
1822
|
-
const r = i === 1 ? "tableHeader" : i === 2 ? "tableDelimiter" : "tableData",
|
1819
|
+
function B(e, n, t, i, o, a) {
|
1820
|
+
const r = i === 1 ? "tableHeader" : i === 2 ? "tableDelimiter" : "tableData", u = "tableContent";
|
1823
1821
|
t[0] !== 0 && (a.end = Object.assign({}, z(n.events, t[0])), e.add(t[0], 0, [["exit", a, n]]));
|
1824
|
-
const
|
1822
|
+
const l = z(n.events, t[1]);
|
1825
1823
|
if (a = {
|
1826
1824
|
type: r,
|
1827
|
-
start: Object.assign({},
|
1825
|
+
start: Object.assign({}, l),
|
1828
1826
|
// Note: correct end is set later.
|
1829
|
-
end: Object.assign({},
|
1827
|
+
end: Object.assign({}, l)
|
1830
1828
|
}, e.add(t[1], 0, [["enter", a, n]]), t[2] !== 0) {
|
1831
|
-
const
|
1832
|
-
type:
|
1833
|
-
start: Object.assign({},
|
1834
|
-
end: Object.assign({},
|
1829
|
+
const s = z(n.events, t[2]), h = z(n.events, t[3]), c = {
|
1830
|
+
type: u,
|
1831
|
+
start: Object.assign({}, s),
|
1832
|
+
end: Object.assign({}, h)
|
1835
1833
|
};
|
1836
|
-
if (e.add(t[2], 0, [["enter",
|
1834
|
+
if (e.add(t[2], 0, [["enter", c, n]]), i !== 2) {
|
1837
1835
|
const p = n.events[t[2]], g = n.events[t[3]];
|
1838
1836
|
if (p[1].end = Object.assign({}, g[1].end), p[1].type = "chunkText", p[1].contentType = "text", t[3] > t[2] + 1) {
|
1839
|
-
const
|
1840
|
-
e.add(
|
1837
|
+
const m = t[2] + 1, b = t[3] - t[2] - 1;
|
1838
|
+
e.add(m, b, []);
|
1841
1839
|
}
|
1842
1840
|
}
|
1843
|
-
e.add(t[3] + 1, 0, [["exit",
|
1841
|
+
e.add(t[3] + 1, 0, [["exit", c, n]]);
|
1844
1842
|
}
|
1845
|
-
return
|
1843
|
+
return o !== void 0 && (a.end = Object.assign({}, z(n.events, o)), e.add(o, 0, [["exit", a, n]]), a = void 0), a;
|
1846
1844
|
}
|
1847
|
-
function ue(e, n, t, i,
|
1845
|
+
function ue(e, n, t, i, o) {
|
1848
1846
|
const a = [], r = z(n.events, t);
|
1849
|
-
|
1847
|
+
o && (o.end = Object.assign({}, r), a.push(["exit", o, n])), i.end = Object.assign({}, r), a.push(["exit", i, n]), e.add(t + 1, 0, a);
|
1850
1848
|
}
|
1851
1849
|
function z(e, n) {
|
1852
1850
|
const t = e[n], i = t[0] === "enter" ? "start" : "end";
|
@@ -1865,31 +1863,31 @@ function Gn() {
|
|
1865
1863
|
}
|
1866
1864
|
function Qn(e, n, t) {
|
1867
1865
|
const i = this;
|
1868
|
-
return
|
1869
|
-
function l
|
1866
|
+
return o;
|
1867
|
+
function o(l) {
|
1870
1868
|
return (
|
1871
1869
|
// Exit if there’s stuff before.
|
1872
1870
|
i.previous !== null || // Exit if not in the first content that is the first child of a list
|
1873
1871
|
// item.
|
1874
|
-
!i._gfmTasklistFirstContentOfListItem ? t(
|
1872
|
+
!i._gfmTasklistFirstContentOfListItem ? t(l) : (e.enter("taskListCheck"), e.enter("taskListCheckMarker"), e.consume(l), e.exit("taskListCheckMarker"), a)
|
1875
1873
|
);
|
1876
1874
|
}
|
1877
|
-
function a(
|
1878
|
-
return A(
|
1875
|
+
function a(l) {
|
1876
|
+
return A(l) ? (e.enter("taskListCheckValueUnchecked"), e.consume(l), e.exit("taskListCheckValueUnchecked"), r) : l === 88 || l === 120 ? (e.enter("taskListCheckValueChecked"), e.consume(l), e.exit("taskListCheckValueChecked"), r) : t(l);
|
1879
1877
|
}
|
1880
|
-
function r(
|
1881
|
-
return
|
1878
|
+
function r(l) {
|
1879
|
+
return l === 93 ? (e.enter("taskListCheckMarker"), e.consume(l), e.exit("taskListCheckMarker"), e.exit("taskListCheck"), u) : t(l);
|
1882
1880
|
}
|
1883
|
-
function
|
1884
|
-
return R(
|
1881
|
+
function u(l) {
|
1882
|
+
return R(l) ? n(l) : T(l) ? e.check({
|
1885
1883
|
tokenize: Nn
|
1886
|
-
}, n, t)(
|
1884
|
+
}, n, t)(l) : t(l);
|
1887
1885
|
}
|
1888
1886
|
}
|
1889
1887
|
function Nn(e, n, t) {
|
1890
1888
|
return S(e, i, "whitespace");
|
1891
|
-
function i(
|
1892
|
-
return
|
1889
|
+
function i(o) {
|
1890
|
+
return o === null ? t(o) : n(o);
|
1893
1891
|
}
|
1894
1892
|
}
|
1895
1893
|
function Zn(e) {
|
@@ -1906,8 +1904,8 @@ function Yn(e) {
|
|
1906
1904
|
const n = (
|
1907
1905
|
/** @type {Processor<Root>} */
|
1908
1906
|
this
|
1909
|
-
), t = e || Jn, i = n.data(),
|
1910
|
-
|
1907
|
+
), t = e || Jn, i = n.data(), o = i.micromarkExtensions || (i.micromarkExtensions = []), a = i.fromMarkdownExtensions || (i.fromMarkdownExtensions = []), r = i.toMarkdownExtensions || (i.toMarkdownExtensions = []);
|
1908
|
+
o.push(Zn(t)), a.push(kn()), r.push(bn(t));
|
1911
1909
|
}
|
1912
1910
|
export {
|
1913
1911
|
Yn as default
|