@kernelift/markdown 1.1.8 → 1.2.1
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/README.md +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +683 -668
- package/dist/markdown.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -153,14 +153,14 @@ on.prototype.parse = function(e, t) {
|
|
|
153
153
|
if (!p) {
|
|
154
154
|
const d = this.hostname.split(/\./);
|
|
155
155
|
for (let g = 0, S = d.length; g < S; g++) {
|
|
156
|
-
const
|
|
157
|
-
if (
|
|
156
|
+
const b = d[g];
|
|
157
|
+
if (b && !b.match(es)) {
|
|
158
158
|
let f = "";
|
|
159
|
-
for (let
|
|
160
|
-
|
|
159
|
+
for (let T = 0, C = b.length; T < C; T++)
|
|
160
|
+
b.charCodeAt(T) > 127 ? f += "x" : f += b[T];
|
|
161
161
|
if (!f.match(es)) {
|
|
162
|
-
const
|
|
163
|
-
N && (
|
|
162
|
+
const T = d.slice(0, g), C = d.slice(g + 1), N = b.match(pd);
|
|
163
|
+
N && (T.push(N[1]), C.unshift(N[2])), C.length && (i = C.join(".") + i), this.hostname = T.join(".");
|
|
164
164
|
break;
|
|
165
165
|
}
|
|
166
166
|
}
|
|
@@ -1060,15 +1060,15 @@ function np(e) {
|
|
|
1060
1060
|
continue;
|
|
1061
1061
|
let S = l[p].text;
|
|
1062
1062
|
l[p].schema ? l[p].schema === "mailto:" && !/^mailto:/i.test(S) ? S = e.md.normalizeLinkText("mailto:" + S).replace(/^mailto:/, "") : S = e.md.normalizeLinkText(S) : S = e.md.normalizeLinkText("http://" + S).replace(/^http:\/\//, "");
|
|
1063
|
-
const
|
|
1064
|
-
if (
|
|
1063
|
+
const b = l[p].index;
|
|
1064
|
+
if (b > m) {
|
|
1065
1065
|
const N = new e.Token("text", "", 0);
|
|
1066
|
-
N.content = c.slice(m,
|
|
1066
|
+
N.content = c.slice(m, b), N.level = _, u.push(N);
|
|
1067
1067
|
}
|
|
1068
1068
|
const f = new e.Token("link_open", "a", 1);
|
|
1069
1069
|
f.attrs = [["href", g]], f.level = _++, f.markup = "linkify", f.info = "auto", u.push(f);
|
|
1070
|
-
const
|
|
1071
|
-
|
|
1070
|
+
const T = new e.Token("text", "", 0);
|
|
1071
|
+
T.content = S, T.level = _, u.push(T);
|
|
1072
1072
|
const C = new e.Token("link_close", "a", -1);
|
|
1073
1073
|
C.level = --_, C.markup = "linkify", C.info = "auto", u.push(C), m = l[p].lastIndex;
|
|
1074
1074
|
}
|
|
@@ -1150,8 +1150,8 @@ function _p(e, t) {
|
|
|
1150
1150
|
g = e[n].content.charCodeAt(0);
|
|
1151
1151
|
break;
|
|
1152
1152
|
}
|
|
1153
|
-
const S = Ft(d) || kt(String.fromCharCode(d)),
|
|
1154
|
-
if (
|
|
1153
|
+
const S = Ft(d) || kt(String.fromCharCode(d)), b = Ft(g) || kt(String.fromCharCode(g)), f = Pt(d), T = Pt(g);
|
|
1154
|
+
if (T ? _ = !1 : b && (f || S || (_ = !1)), f ? m = !1 : S && (T || b || (m = !1)), g === 34 && u[0] === '"' && d >= 48 && d <= 57 && (m = _ = !1), _ && m && (_ = S, m = b), !_ && !m) {
|
|
1155
1155
|
p && (i.content = rn(i.content, u.index, as));
|
|
1156
1156
|
continue;
|
|
1157
1157
|
}
|
|
@@ -1359,8 +1359,8 @@ function Ep(e, t, n, r) {
|
|
|
1359
1359
|
d.map = g;
|
|
1360
1360
|
const S = e.push("thead_open", "thead", 1);
|
|
1361
1361
|
S.map = [t, t + 1];
|
|
1362
|
-
const
|
|
1363
|
-
|
|
1362
|
+
const b = e.push("tr_open", "tr", 1);
|
|
1363
|
+
b.map = [t, t + 1];
|
|
1364
1364
|
for (let C = 0; C < l.length; C++) {
|
|
1365
1365
|
const N = e.push("th_open", "th", 1);
|
|
1366
1366
|
u[C] && (N.attrs = [["style", "text-align:" + u[C]]]);
|
|
@@ -1368,7 +1368,7 @@ function Ep(e, t, n, r) {
|
|
|
1368
1368
|
R.content = l[C].trim(), R.children = [], e.push("th_close", "th", -1);
|
|
1369
1369
|
}
|
|
1370
1370
|
e.push("tr_close", "tr", -1), e.push("thead_close", "thead", -1);
|
|
1371
|
-
let f,
|
|
1371
|
+
let f, T = 0;
|
|
1372
1372
|
for (a = t + 2; a < n && !(e.sCount[a] < e.blkIndent); a++) {
|
|
1373
1373
|
let C = !1;
|
|
1374
1374
|
for (let R = 0, y = p.length; R < y; R++)
|
|
@@ -1376,7 +1376,7 @@ function Ep(e, t, n, r) {
|
|
|
1376
1376
|
C = !0;
|
|
1377
1377
|
break;
|
|
1378
1378
|
}
|
|
1379
|
-
if (C || (c = vn(e, a).trim(), !c) || e.sCount[a] - e.blkIndent >= 4 || (l = is(c), l.length && l[0] === "" && l.shift(), l.length && l[l.length - 1] === "" && l.pop(),
|
|
1379
|
+
if (C || (c = vn(e, a).trim(), !c) || e.sCount[a] - e.blkIndent >= 4 || (l = is(c), l.length && l[0] === "" && l.shift(), l.length && l[l.length - 1] === "" && l.pop(), T += _ - l.length, T > mp))
|
|
1380
1380
|
break;
|
|
1381
1381
|
if (a === t + 2) {
|
|
1382
1382
|
const R = e.push("tbody_open", "tbody", 1);
|
|
@@ -1452,17 +1452,17 @@ function fp(e, t, n, r) {
|
|
|
1452
1452
|
e.parentType = "blockquote";
|
|
1453
1453
|
let p = !1, d;
|
|
1454
1454
|
for (d = t; d < n; d++) {
|
|
1455
|
-
const
|
|
1455
|
+
const T = e.sCount[d] < e.blkIndent;
|
|
1456
1456
|
if (a = e.bMarks[d] + e.tShift[d], i = e.eMarks[d], a >= i)
|
|
1457
1457
|
break;
|
|
1458
|
-
if (e.src.charCodeAt(a++) === 62 && !
|
|
1458
|
+
if (e.src.charCodeAt(a++) === 62 && !T) {
|
|
1459
1459
|
let N = e.sCount[d] + 1, R, y;
|
|
1460
1460
|
e.src.charCodeAt(a) === 32 ? (a++, N++, y = !1, R = !0) : e.src.charCodeAt(a) === 9 ? (R = !0, (e.bsCount[d] + N) % 4 === 3 ? (a++, N++, y = !1) : y = !0) : R = !1;
|
|
1461
1461
|
let v = N;
|
|
1462
1462
|
for (o.push(e.bMarks[d]), e.bMarks[d] = a; a < i; ) {
|
|
1463
|
-
const
|
|
1464
|
-
if (ne(
|
|
1465
|
-
|
|
1463
|
+
const U = e.src.charCodeAt(a);
|
|
1464
|
+
if (ne(U))
|
|
1465
|
+
U === 9 ? v += 4 - (v + e.bsCount[d] + (y ? 1 : 0)) % 4 : v++;
|
|
1466
1466
|
else
|
|
1467
1467
|
break;
|
|
1468
1468
|
a++;
|
|
@@ -1488,12 +1488,12 @@ function fp(e, t, n, r) {
|
|
|
1488
1488
|
e.blkIndent = 0;
|
|
1489
1489
|
const S = e.push("blockquote_open", "blockquote", 1);
|
|
1490
1490
|
S.markup = ">";
|
|
1491
|
-
const
|
|
1492
|
-
S.map =
|
|
1491
|
+
const b = [t, 0];
|
|
1492
|
+
S.map = b, e.md.block.tokenize(e, t, d);
|
|
1493
1493
|
const f = e.push("blockquote_close", "blockquote", -1);
|
|
1494
|
-
f.markup = ">", e.lineMax = s, e.parentType = m,
|
|
1495
|
-
for (let
|
|
1496
|
-
e.bMarks[
|
|
1494
|
+
f.markup = ">", e.lineMax = s, e.parentType = m, b[1] = e.line;
|
|
1495
|
+
for (let T = 0; T < u.length; T++)
|
|
1496
|
+
e.bMarks[T + t] = o[T], e.tShift[T + t] = u[T], e.sCount[T + t] = l[T], e.bsCount[T + t] = c[T];
|
|
1497
1497
|
return e.blkIndent = g, !0;
|
|
1498
1498
|
}
|
|
1499
1499
|
function bp(e, t, n, r) {
|
|
@@ -1580,17 +1580,17 @@ function Rp(e, t, n, r) {
|
|
|
1580
1580
|
_ ? (o = e.push("ordered_list_open", "ol", 1), m !== 1 && (o.attrs = [["start", m]])) : o = e.push("bullet_list_open", "ul", 1);
|
|
1581
1581
|
const S = [c, 0];
|
|
1582
1582
|
o.map = S, o.markup = String.fromCharCode(d);
|
|
1583
|
-
let
|
|
1584
|
-
const f = e.md.block.ruler.getRules("list"),
|
|
1583
|
+
let b = !1;
|
|
1584
|
+
const f = e.md.block.ruler.getRules("list"), T = e.parentType;
|
|
1585
1585
|
for (e.parentType = "list"; c < n; ) {
|
|
1586
1586
|
i = p, a = e.eMarks[c];
|
|
1587
1587
|
const C = e.sCount[c] + p - (e.bMarks[c] + e.tShift[c]);
|
|
1588
1588
|
let N = C;
|
|
1589
1589
|
for (; i < a; ) {
|
|
1590
|
-
const
|
|
1591
|
-
if (
|
|
1590
|
+
const w = e.src.charCodeAt(i);
|
|
1591
|
+
if (w === 9)
|
|
1592
1592
|
N += 4 - (N + e.bsCount[c]) % 4;
|
|
1593
|
-
else if (
|
|
1593
|
+
else if (w === 32)
|
|
1594
1594
|
N++;
|
|
1595
1595
|
else
|
|
1596
1596
|
break;
|
|
@@ -1601,18 +1601,18 @@ function Rp(e, t, n, r) {
|
|
|
1601
1601
|
R >= a ? y = 1 : y = N - C, y > 4 && (y = 1);
|
|
1602
1602
|
const v = C + y;
|
|
1603
1603
|
o = e.push("list_item_open", "li", 1), o.markup = String.fromCharCode(d);
|
|
1604
|
-
const
|
|
1605
|
-
o.map =
|
|
1606
|
-
const A = e.tight,
|
|
1607
|
-
if (e.listIndent = e.blkIndent, e.blkIndent = v, e.tight = !0, e.tShift[c] = R - e.bMarks[c], e.sCount[c] = N, R >= a && e.isEmpty(c + 1) ? e.line = Math.min(e.line + 2, n) : e.md.block.tokenize(e, c, n, !0), (!e.tight ||
|
|
1604
|
+
const U = [c, 0];
|
|
1605
|
+
o.map = U, _ && (o.info = e.src.slice(s, p - 1));
|
|
1606
|
+
const A = e.tight, O = e.tShift[c], M = e.sCount[c], P = e.listIndent;
|
|
1607
|
+
if (e.listIndent = e.blkIndent, e.blkIndent = v, e.tight = !0, e.tShift[c] = R - e.bMarks[c], e.sCount[c] = N, R >= a && e.isEmpty(c + 1) ? e.line = Math.min(e.line + 2, n) : e.md.block.tokenize(e, c, n, !0), (!e.tight || b) && (l = !1), b = e.line - c > 1 && e.isEmpty(e.line - 1), e.blkIndent = e.listIndent, e.listIndent = P, e.tShift[c] = O, e.sCount[c] = M, e.tight = A, o = e.push("list_item_close", "li", -1), o.markup = String.fromCharCode(d), c = e.line, U[1] = c, c >= n || e.sCount[c] < e.blkIndent || e.sCount[c] - e.blkIndent >= 4)
|
|
1608
1608
|
break;
|
|
1609
|
-
let
|
|
1610
|
-
for (let
|
|
1611
|
-
if (f[
|
|
1612
|
-
|
|
1609
|
+
let L = !1;
|
|
1610
|
+
for (let w = 0, F = f.length; w < F; w++)
|
|
1611
|
+
if (f[w](e, c, n, !0)) {
|
|
1612
|
+
L = !0;
|
|
1613
1613
|
break;
|
|
1614
1614
|
}
|
|
1615
|
-
if (
|
|
1615
|
+
if (L)
|
|
1616
1616
|
break;
|
|
1617
1617
|
if (_) {
|
|
1618
1618
|
if (p = ss(e, c), p < 0)
|
|
@@ -1623,27 +1623,27 @@ function Rp(e, t, n, r) {
|
|
|
1623
1623
|
if (d !== e.src.charCodeAt(p - 1))
|
|
1624
1624
|
break;
|
|
1625
1625
|
}
|
|
1626
|
-
return _ ? o = e.push("ordered_list_close", "ol", -1) : o = e.push("bullet_list_close", "ul", -1), o.markup = String.fromCharCode(d), S[1] = c, e.line = c, e.parentType =
|
|
1626
|
+
return _ ? o = e.push("ordered_list_close", "ol", -1) : o = e.push("bullet_list_close", "ul", -1), o.markup = String.fromCharCode(d), S[1] = c, e.line = c, e.parentType = T, l && Tp(e, g), !0;
|
|
1627
1627
|
}
|
|
1628
1628
|
function Cp(e, t, n, r) {
|
|
1629
1629
|
let a = e.bMarks[t] + e.tShift[t], i = e.eMarks[t], s = t + 1;
|
|
1630
1630
|
if (e.sCount[t] - e.blkIndent >= 4 || e.src.charCodeAt(a) !== 91)
|
|
1631
1631
|
return !1;
|
|
1632
1632
|
function o(f) {
|
|
1633
|
-
const
|
|
1634
|
-
if (f >=
|
|
1633
|
+
const T = e.lineMax;
|
|
1634
|
+
if (f >= T || e.isEmpty(f))
|
|
1635
1635
|
return null;
|
|
1636
1636
|
let C = !1;
|
|
1637
1637
|
if (e.sCount[f] - e.blkIndent > 3 && (C = !0), e.sCount[f] < 0 && (C = !0), !C) {
|
|
1638
1638
|
const y = e.md.block.ruler.getRules("reference"), v = e.parentType;
|
|
1639
1639
|
e.parentType = "reference";
|
|
1640
|
-
let
|
|
1641
|
-
for (let A = 0,
|
|
1642
|
-
if (y[A](e, f,
|
|
1643
|
-
|
|
1640
|
+
let U = !1;
|
|
1641
|
+
for (let A = 0, O = y.length; A < O; A++)
|
|
1642
|
+
if (y[A](e, f, T, !0)) {
|
|
1643
|
+
U = !0;
|
|
1644
1644
|
break;
|
|
1645
1645
|
}
|
|
1646
|
-
if (e.parentType = v,
|
|
1646
|
+
if (e.parentType = v, U)
|
|
1647
1647
|
return null;
|
|
1648
1648
|
}
|
|
1649
1649
|
const N = e.bMarks[f] + e.tShift[f], R = e.eMarks[f];
|
|
@@ -1660,11 +1660,11 @@ function Cp(e, t, n, r) {
|
|
|
1660
1660
|
l = a;
|
|
1661
1661
|
break;
|
|
1662
1662
|
} else if (f === 10) {
|
|
1663
|
-
const
|
|
1664
|
-
|
|
1663
|
+
const T = o(s);
|
|
1664
|
+
T !== null && (c += T, i = c.length, s++);
|
|
1665
1665
|
} else if (f === 92 && (a++, a < i && c.charCodeAt(a) === 10)) {
|
|
1666
|
-
const
|
|
1667
|
-
|
|
1666
|
+
const T = o(s);
|
|
1667
|
+
T !== null && (c += T, i = c.length, s++);
|
|
1668
1668
|
}
|
|
1669
1669
|
}
|
|
1670
1670
|
if (l < 0 || c.charCodeAt(l + 1) !== 58)
|
|
@@ -1672,8 +1672,8 @@ function Cp(e, t, n, r) {
|
|
|
1672
1672
|
for (a = l + 2; a < i; a++) {
|
|
1673
1673
|
const f = c.charCodeAt(a);
|
|
1674
1674
|
if (f === 10) {
|
|
1675
|
-
const
|
|
1676
|
-
|
|
1675
|
+
const T = o(s);
|
|
1676
|
+
T !== null && (c += T, i = c.length, s++);
|
|
1677
1677
|
} else if (!ne(f)) break;
|
|
1678
1678
|
}
|
|
1679
1679
|
const u = e.md.helpers.parseLinkDestination(c, a, i);
|
|
@@ -1687,8 +1687,8 @@ function Cp(e, t, n, r) {
|
|
|
1687
1687
|
for (; a < i; a++) {
|
|
1688
1688
|
const f = c.charCodeAt(a);
|
|
1689
1689
|
if (f === 10) {
|
|
1690
|
-
const
|
|
1691
|
-
|
|
1690
|
+
const T = o(s);
|
|
1691
|
+
T !== null && (c += T, i = c.length, s++);
|
|
1692
1692
|
} else if (!ne(f)) break;
|
|
1693
1693
|
}
|
|
1694
1694
|
let g = e.md.helpers.parseLinkTitle(c, a, i);
|
|
@@ -1713,8 +1713,8 @@ function Cp(e, t, n, r) {
|
|
|
1713
1713
|
}
|
|
1714
1714
|
if (a < i && c.charCodeAt(a) !== 10)
|
|
1715
1715
|
return !1;
|
|
1716
|
-
const
|
|
1717
|
-
return
|
|
1716
|
+
const b = dn(c.slice(1, l));
|
|
1717
|
+
return b ? (r || (typeof e.env.references > "u" && (e.env.references = {}), typeof e.env.references[b] > "u" && (e.env.references[b] = { title: S, href: _ }), e.line = s), !0) : !1;
|
|
1718
1718
|
}
|
|
1719
1719
|
const Np = [
|
|
1720
1720
|
"address",
|
|
@@ -2282,8 +2282,8 @@ function Jp(e, t) {
|
|
|
2282
2282
|
e.env,
|
|
2283
2283
|
g
|
|
2284
2284
|
);
|
|
2285
|
-
const S = e.push("image", "img", 0),
|
|
2286
|
-
S.attrs =
|
|
2285
|
+
const S = e.push("image", "img", 0), b = [["src", u], ["alt", ""]];
|
|
2286
|
+
S.attrs = b, S.children = g, S.content = r, c && b.push(["title", c]);
|
|
2287
2287
|
}
|
|
2288
2288
|
return e.pos = i, e.posMax = m, !0;
|
|
2289
2289
|
}
|
|
@@ -3095,8 +3095,8 @@ function Vm() {
|
|
|
3095
3095
|
throw new Error("map is read-only");
|
|
3096
3096
|
} : E instanceof Set && (E.add = E.clear = E.delete = function() {
|
|
3097
3097
|
throw new Error("set is read-only");
|
|
3098
|
-
}), Object.freeze(E), Object.getOwnPropertyNames(E).forEach((
|
|
3099
|
-
const D = E[
|
|
3098
|
+
}), Object.freeze(E), Object.getOwnPropertyNames(E).forEach((h) => {
|
|
3099
|
+
const D = E[h], H = typeof D;
|
|
3100
3100
|
(H === "object" || H === "function") && !Object.isFrozen(D) && e(D);
|
|
3101
3101
|
}), E;
|
|
3102
3102
|
}
|
|
@@ -3104,8 +3104,8 @@ function Vm() {
|
|
|
3104
3104
|
/**
|
|
3105
3105
|
* @param {CompiledMode} mode
|
|
3106
3106
|
*/
|
|
3107
|
-
constructor(
|
|
3108
|
-
|
|
3107
|
+
constructor(h) {
|
|
3108
|
+
h.data === void 0 && (h.data = {}), this.data = h.data, this.isMatchIgnored = !1;
|
|
3109
3109
|
}
|
|
3110
3110
|
ignoreMatch() {
|
|
3111
3111
|
this.isMatchIgnored = !0;
|
|
@@ -3114,27 +3114,27 @@ function Vm() {
|
|
|
3114
3114
|
function n(E) {
|
|
3115
3115
|
return E.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
3116
3116
|
}
|
|
3117
|
-
function r(E, ...
|
|
3117
|
+
function r(E, ...h) {
|
|
3118
3118
|
const D = /* @__PURE__ */ Object.create(null);
|
|
3119
3119
|
for (const H in E)
|
|
3120
3120
|
D[H] = E[H];
|
|
3121
|
-
return
|
|
3121
|
+
return h.forEach(function(H) {
|
|
3122
3122
|
for (const se in H)
|
|
3123
3123
|
D[se] = H[se];
|
|
3124
3124
|
}), /** @type {T} */
|
|
3125
3125
|
D;
|
|
3126
3126
|
}
|
|
3127
|
-
const a = "</span>", i = (E) => !!E.scope, s = (E, { prefix:
|
|
3127
|
+
const a = "</span>", i = (E) => !!E.scope, s = (E, { prefix: h }) => {
|
|
3128
3128
|
if (E.startsWith("language:"))
|
|
3129
3129
|
return E.replace("language:", "language-");
|
|
3130
3130
|
if (E.includes(".")) {
|
|
3131
3131
|
const D = E.split(".");
|
|
3132
3132
|
return [
|
|
3133
|
-
`${
|
|
3133
|
+
`${h}${D.shift()}`,
|
|
3134
3134
|
...D.map((H, se) => `${H}${"_".repeat(se + 1)}`)
|
|
3135
3135
|
].join(" ");
|
|
3136
3136
|
}
|
|
3137
|
-
return `${
|
|
3137
|
+
return `${h}${E}`;
|
|
3138
3138
|
};
|
|
3139
3139
|
class o {
|
|
3140
3140
|
/**
|
|
@@ -3143,24 +3143,24 @@ function Vm() {
|
|
|
3143
3143
|
* @param {Tree} parseTree - the parse tree (must support `walk` API)
|
|
3144
3144
|
* @param {{classPrefix: string}} options
|
|
3145
3145
|
*/
|
|
3146
|
-
constructor(
|
|
3147
|
-
this.buffer = "", this.classPrefix = D.classPrefix,
|
|
3146
|
+
constructor(h, D) {
|
|
3147
|
+
this.buffer = "", this.classPrefix = D.classPrefix, h.walk(this);
|
|
3148
3148
|
}
|
|
3149
3149
|
/**
|
|
3150
3150
|
* Adds texts to the output stream
|
|
3151
3151
|
*
|
|
3152
3152
|
* @param {string} text */
|
|
3153
|
-
addText(
|
|
3154
|
-
this.buffer += n(
|
|
3153
|
+
addText(h) {
|
|
3154
|
+
this.buffer += n(h);
|
|
3155
3155
|
}
|
|
3156
3156
|
/**
|
|
3157
3157
|
* Adds a node open to the output stream (if needed)
|
|
3158
3158
|
*
|
|
3159
3159
|
* @param {Node} node */
|
|
3160
|
-
openNode(
|
|
3161
|
-
if (!i(
|
|
3160
|
+
openNode(h) {
|
|
3161
|
+
if (!i(h)) return;
|
|
3162
3162
|
const D = s(
|
|
3163
|
-
|
|
3163
|
+
h.scope,
|
|
3164
3164
|
{ prefix: this.classPrefix }
|
|
3165
3165
|
);
|
|
3166
3166
|
this.span(D);
|
|
@@ -3169,8 +3169,8 @@ function Vm() {
|
|
|
3169
3169
|
* Adds a node close to the output stream (if needed)
|
|
3170
3170
|
*
|
|
3171
3171
|
* @param {Node} node */
|
|
3172
|
-
closeNode(
|
|
3173
|
-
i(
|
|
3172
|
+
closeNode(h) {
|
|
3173
|
+
i(h) && (this.buffer += a);
|
|
3174
3174
|
}
|
|
3175
3175
|
/**
|
|
3176
3176
|
* returns the accumulated buffer
|
|
@@ -3183,13 +3183,13 @@ function Vm() {
|
|
|
3183
3183
|
* Builds a span element
|
|
3184
3184
|
*
|
|
3185
3185
|
* @param {string} className */
|
|
3186
|
-
span(
|
|
3187
|
-
this.buffer += `<span class="${
|
|
3186
|
+
span(h) {
|
|
3187
|
+
this.buffer += `<span class="${h}">`;
|
|
3188
3188
|
}
|
|
3189
3189
|
}
|
|
3190
3190
|
const c = (E = {}) => {
|
|
3191
|
-
const
|
|
3192
|
-
return Object.assign(
|
|
3191
|
+
const h = { children: [] };
|
|
3192
|
+
return Object.assign(h, E), h;
|
|
3193
3193
|
};
|
|
3194
3194
|
class l {
|
|
3195
3195
|
constructor() {
|
|
@@ -3202,12 +3202,12 @@ function Vm() {
|
|
|
3202
3202
|
return this.rootNode;
|
|
3203
3203
|
}
|
|
3204
3204
|
/** @param {Node} node */
|
|
3205
|
-
add(
|
|
3206
|
-
this.top.children.push(
|
|
3205
|
+
add(h) {
|
|
3206
|
+
this.top.children.push(h);
|
|
3207
3207
|
}
|
|
3208
3208
|
/** @param {string} scope */
|
|
3209
|
-
openNode(
|
|
3210
|
-
const D = c({ scope:
|
|
3209
|
+
openNode(h) {
|
|
3210
|
+
const D = c({ scope: h });
|
|
3211
3211
|
this.add(D), this.stack.push(D);
|
|
3212
3212
|
}
|
|
3213
3213
|
closeNode() {
|
|
@@ -3224,21 +3224,21 @@ function Vm() {
|
|
|
3224
3224
|
* @typedef { import("./html_renderer").Renderer } Renderer
|
|
3225
3225
|
* @param {Renderer} builder
|
|
3226
3226
|
*/
|
|
3227
|
-
walk(
|
|
3228
|
-
return this.constructor._walk(
|
|
3227
|
+
walk(h) {
|
|
3228
|
+
return this.constructor._walk(h, this.rootNode);
|
|
3229
3229
|
}
|
|
3230
3230
|
/**
|
|
3231
3231
|
* @param {Renderer} builder
|
|
3232
3232
|
* @param {Node} node
|
|
3233
3233
|
*/
|
|
3234
|
-
static _walk(
|
|
3235
|
-
return typeof D == "string" ?
|
|
3234
|
+
static _walk(h, D) {
|
|
3235
|
+
return typeof D == "string" ? h.addText(D) : D.children && (h.openNode(D), D.children.forEach((H) => this._walk(h, H)), h.closeNode(D)), h;
|
|
3236
3236
|
}
|
|
3237
3237
|
/**
|
|
3238
3238
|
* @param {Node} node
|
|
3239
3239
|
*/
|
|
3240
|
-
static _collapse(
|
|
3241
|
-
typeof
|
|
3240
|
+
static _collapse(h) {
|
|
3241
|
+
typeof h != "string" && h.children && (h.children.every((D) => typeof D == "string") ? h.children = [h.children.join("")] : h.children.forEach((D) => {
|
|
3242
3242
|
l._collapse(D);
|
|
3243
3243
|
}));
|
|
3244
3244
|
}
|
|
@@ -3247,18 +3247,18 @@ function Vm() {
|
|
|
3247
3247
|
/**
|
|
3248
3248
|
* @param {*} options
|
|
3249
3249
|
*/
|
|
3250
|
-
constructor(
|
|
3251
|
-
super(), this.options =
|
|
3250
|
+
constructor(h) {
|
|
3251
|
+
super(), this.options = h;
|
|
3252
3252
|
}
|
|
3253
3253
|
/**
|
|
3254
3254
|
* @param {string} text
|
|
3255
3255
|
*/
|
|
3256
|
-
addText(
|
|
3257
|
-
|
|
3256
|
+
addText(h) {
|
|
3257
|
+
h !== "" && this.add(h);
|
|
3258
3258
|
}
|
|
3259
3259
|
/** @param {string} scope */
|
|
3260
|
-
startScope(
|
|
3261
|
-
this.openNode(
|
|
3260
|
+
startScope(h) {
|
|
3261
|
+
this.openNode(h);
|
|
3262
3262
|
}
|
|
3263
3263
|
endScope() {
|
|
3264
3264
|
this.closeNode();
|
|
@@ -3267,8 +3267,8 @@ function Vm() {
|
|
|
3267
3267
|
* @param {Emitter & {root: DataNode}} emitter
|
|
3268
3268
|
* @param {string} name
|
|
3269
3269
|
*/
|
|
3270
|
-
__addSublanguage(
|
|
3271
|
-
const H =
|
|
3270
|
+
__addSublanguage(h, D) {
|
|
3271
|
+
const H = h.root;
|
|
3272
3272
|
D && (H.scope = `language:${D}`), this.add(H);
|
|
3273
3273
|
}
|
|
3274
3274
|
toHTML() {
|
|
@@ -3294,47 +3294,47 @@ function Vm() {
|
|
|
3294
3294
|
return E.map((D) => _(D)).join("");
|
|
3295
3295
|
}
|
|
3296
3296
|
function S(E) {
|
|
3297
|
-
const
|
|
3298
|
-
return typeof
|
|
3297
|
+
const h = E[E.length - 1];
|
|
3298
|
+
return typeof h == "object" && h.constructor === Object ? (E.splice(E.length - 1, 1), h) : {};
|
|
3299
3299
|
}
|
|
3300
|
-
function
|
|
3300
|
+
function b(...E) {
|
|
3301
3301
|
return "(" + (S(E).capture ? "" : "?:") + E.map((H) => _(H)).join("|") + ")";
|
|
3302
3302
|
}
|
|
3303
3303
|
function f(E) {
|
|
3304
3304
|
return new RegExp(E.toString() + "|").exec("").length - 1;
|
|
3305
3305
|
}
|
|
3306
|
-
function
|
|
3307
|
-
const D = E && E.exec(
|
|
3306
|
+
function T(E, h) {
|
|
3307
|
+
const D = E && E.exec(h);
|
|
3308
3308
|
return D && D.index === 0;
|
|
3309
3309
|
}
|
|
3310
3310
|
const C = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
|
|
3311
|
-
function N(E, { joinWith:
|
|
3311
|
+
function N(E, { joinWith: h }) {
|
|
3312
3312
|
let D = 0;
|
|
3313
3313
|
return E.map((H) => {
|
|
3314
3314
|
D += 1;
|
|
3315
3315
|
const se = D;
|
|
3316
|
-
let ce = _(H),
|
|
3316
|
+
let ce = _(H), G = "";
|
|
3317
3317
|
for (; ce.length > 0; ) {
|
|
3318
|
-
const
|
|
3319
|
-
if (!
|
|
3320
|
-
|
|
3318
|
+
const k = C.exec(ce);
|
|
3319
|
+
if (!k) {
|
|
3320
|
+
G += ce;
|
|
3321
3321
|
break;
|
|
3322
3322
|
}
|
|
3323
|
-
|
|
3323
|
+
G += ce.substring(0, k.index), ce = ce.substring(k.index + k[0].length), k[0][0] === "\\" && k[1] ? G += "\\" + String(Number(k[1]) + se) : (G += k[0], k[0] === "(" && D++);
|
|
3324
3324
|
}
|
|
3325
|
-
return
|
|
3326
|
-
}).map((H) => `(${H})`).join(
|
|
3325
|
+
return G;
|
|
3326
|
+
}).map((H) => `(${H})`).join(h);
|
|
3327
3327
|
}
|
|
3328
|
-
const R = /\b\B/, y = "[a-zA-Z]\\w*", v = "[a-zA-Z_]\\w*",
|
|
3329
|
-
const
|
|
3328
|
+
const R = /\b\B/, y = "[a-zA-Z]\\w*", v = "[a-zA-Z_]\\w*", U = "\\b\\d+(\\.\\d+)?", A = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", O = "\\b(0b[01]+)", M = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", P = (E = {}) => {
|
|
3329
|
+
const h = /^#![ ]*\//;
|
|
3330
3330
|
return E.binary && (E.begin = g(
|
|
3331
|
-
|
|
3331
|
+
h,
|
|
3332
3332
|
/.*\b/,
|
|
3333
3333
|
E.binary,
|
|
3334
3334
|
/\b.*/
|
|
3335
3335
|
)), r({
|
|
3336
3336
|
scope: "meta",
|
|
3337
|
-
begin:
|
|
3337
|
+
begin: h,
|
|
3338
3338
|
end: /$/,
|
|
3339
3339
|
relevance: 0,
|
|
3340
3340
|
/** @type {ModeCallback} */
|
|
@@ -3342,29 +3342,29 @@ function Vm() {
|
|
|
3342
3342
|
D.index !== 0 && H.ignoreMatch();
|
|
3343
3343
|
}
|
|
3344
3344
|
}, E);
|
|
3345
|
-
},
|
|
3345
|
+
}, L = {
|
|
3346
3346
|
begin: "\\\\[\\s\\S]",
|
|
3347
3347
|
relevance: 0
|
|
3348
|
-
},
|
|
3348
|
+
}, w = {
|
|
3349
3349
|
scope: "string",
|
|
3350
3350
|
begin: "'",
|
|
3351
3351
|
end: "'",
|
|
3352
3352
|
illegal: "\\n",
|
|
3353
|
-
contains: [
|
|
3354
|
-
},
|
|
3353
|
+
contains: [L]
|
|
3354
|
+
}, F = {
|
|
3355
3355
|
scope: "string",
|
|
3356
3356
|
begin: '"',
|
|
3357
3357
|
end: '"',
|
|
3358
3358
|
illegal: "\\n",
|
|
3359
|
-
contains: [
|
|
3359
|
+
contains: [L]
|
|
3360
3360
|
}, z = {
|
|
3361
3361
|
begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/
|
|
3362
|
-
}, K = function(E,
|
|
3362
|
+
}, K = function(E, h, D = {}) {
|
|
3363
3363
|
const H = r(
|
|
3364
3364
|
{
|
|
3365
3365
|
scope: "comment",
|
|
3366
3366
|
begin: E,
|
|
3367
|
-
end:
|
|
3367
|
+
end: h,
|
|
3368
3368
|
contains: []
|
|
3369
3369
|
},
|
|
3370
3370
|
D
|
|
@@ -3378,7 +3378,7 @@ function Vm() {
|
|
|
3378
3378
|
excludeBegin: !0,
|
|
3379
3379
|
relevance: 0
|
|
3380
3380
|
});
|
|
3381
|
-
const se =
|
|
3381
|
+
const se = b(
|
|
3382
3382
|
// list of common 1 and 2 letter words in English
|
|
3383
3383
|
"I",
|
|
3384
3384
|
"a",
|
|
@@ -3427,7 +3427,7 @@ function Vm() {
|
|
|
3427
3427
|
), H;
|
|
3428
3428
|
}, j = K("//", "$"), le = K("/\\*", "\\*/"), Se = K("#", "$"), Oe = {
|
|
3429
3429
|
scope: "number",
|
|
3430
|
-
begin:
|
|
3430
|
+
begin: U,
|
|
3431
3431
|
relevance: 0
|
|
3432
3432
|
}, Re = {
|
|
3433
3433
|
scope: "number",
|
|
@@ -3435,19 +3435,19 @@ function Vm() {
|
|
|
3435
3435
|
relevance: 0
|
|
3436
3436
|
}, Te = {
|
|
3437
3437
|
scope: "number",
|
|
3438
|
-
begin:
|
|
3438
|
+
begin: O,
|
|
3439
3439
|
relevance: 0
|
|
3440
3440
|
}, ie = {
|
|
3441
3441
|
scope: "regexp",
|
|
3442
3442
|
begin: /\/(?=[^/\n]*\/)/,
|
|
3443
3443
|
end: /\/[gimuy]*/,
|
|
3444
3444
|
contains: [
|
|
3445
|
-
|
|
3445
|
+
L,
|
|
3446
3446
|
{
|
|
3447
3447
|
begin: /\[/,
|
|
3448
3448
|
end: /\]/,
|
|
3449
3449
|
relevance: 0,
|
|
3450
|
-
contains: [
|
|
3450
|
+
contains: [L]
|
|
3451
3451
|
}
|
|
3452
3452
|
]
|
|
3453
3453
|
}, pe = {
|
|
@@ -3465,10 +3465,10 @@ function Vm() {
|
|
|
3465
3465
|
};
|
|
3466
3466
|
var oe = /* @__PURE__ */ Object.freeze({
|
|
3467
3467
|
__proto__: null,
|
|
3468
|
-
APOS_STRING_MODE:
|
|
3469
|
-
BACKSLASH_ESCAPE:
|
|
3468
|
+
APOS_STRING_MODE: w,
|
|
3469
|
+
BACKSLASH_ESCAPE: L,
|
|
3470
3470
|
BINARY_NUMBER_MODE: Te,
|
|
3471
|
-
BINARY_NUMBER_RE:
|
|
3471
|
+
BINARY_NUMBER_RE: O,
|
|
3472
3472
|
COMMENT: K,
|
|
3473
3473
|
C_BLOCK_COMMENT_MODE: le,
|
|
3474
3474
|
C_LINE_COMMENT_MODE: j,
|
|
@@ -3479,12 +3479,12 @@ function Vm() {
|
|
|
3479
3479
|
E,
|
|
3480
3480
|
{
|
|
3481
3481
|
/** @type {ModeCallback} */
|
|
3482
|
-
"on:begin": (
|
|
3483
|
-
D.data._beginMatch =
|
|
3482
|
+
"on:begin": (h, D) => {
|
|
3483
|
+
D.data._beginMatch = h[1];
|
|
3484
3484
|
},
|
|
3485
3485
|
/** @type {ModeCallback} */
|
|
3486
|
-
"on:end": (
|
|
3487
|
-
D.data._beginMatch !==
|
|
3486
|
+
"on:end": (h, D) => {
|
|
3487
|
+
D.data._beginMatch !== h[1] && D.ignoreMatch();
|
|
3488
3488
|
}
|
|
3489
3489
|
}
|
|
3490
3490
|
);
|
|
@@ -3494,9 +3494,9 @@ function Vm() {
|
|
|
3494
3494
|
MATCH_NOTHING_RE: R,
|
|
3495
3495
|
METHOD_GUARD: X,
|
|
3496
3496
|
NUMBER_MODE: Oe,
|
|
3497
|
-
NUMBER_RE:
|
|
3497
|
+
NUMBER_RE: U,
|
|
3498
3498
|
PHRASAL_WORDS_MODE: z,
|
|
3499
|
-
QUOTE_STRING_MODE:
|
|
3499
|
+
QUOTE_STRING_MODE: F,
|
|
3500
3500
|
REGEXP_MODE: ie,
|
|
3501
3501
|
RE_STARTERS_RE: M,
|
|
3502
3502
|
SHEBANG: P,
|
|
@@ -3504,28 +3504,28 @@ function Vm() {
|
|
|
3504
3504
|
UNDERSCORE_IDENT_RE: v,
|
|
3505
3505
|
UNDERSCORE_TITLE_MODE: ee
|
|
3506
3506
|
});
|
|
3507
|
-
function _e(E,
|
|
3508
|
-
E.input[E.index - 1] === "." &&
|
|
3507
|
+
function _e(E, h) {
|
|
3508
|
+
E.input[E.index - 1] === "." && h.ignoreMatch();
|
|
3509
3509
|
}
|
|
3510
|
-
function Ce(E,
|
|
3510
|
+
function Ce(E, h) {
|
|
3511
3511
|
E.className !== void 0 && (E.scope = E.className, delete E.className);
|
|
3512
3512
|
}
|
|
3513
|
-
function ye(E,
|
|
3514
|
-
|
|
3513
|
+
function ye(E, h) {
|
|
3514
|
+
h && E.beginKeywords && (E.begin = "\\b(" + E.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", E.__beforeBegin = _e, E.keywords = E.keywords || E.beginKeywords, delete E.beginKeywords, E.relevance === void 0 && (E.relevance = 0));
|
|
3515
3515
|
}
|
|
3516
|
-
function Et(E,
|
|
3517
|
-
Array.isArray(E.illegal) && (E.illegal =
|
|
3516
|
+
function Et(E, h) {
|
|
3517
|
+
Array.isArray(E.illegal) && (E.illegal = b(...E.illegal));
|
|
3518
3518
|
}
|
|
3519
|
-
function Vt(E,
|
|
3519
|
+
function Vt(E, h) {
|
|
3520
3520
|
if (E.match) {
|
|
3521
3521
|
if (E.begin || E.end) throw new Error("begin & end are not supported with match");
|
|
3522
3522
|
E.begin = E.match, delete E.match;
|
|
3523
3523
|
}
|
|
3524
3524
|
}
|
|
3525
|
-
function nt(E,
|
|
3525
|
+
function nt(E, h) {
|
|
3526
3526
|
E.relevance === void 0 && (E.relevance = 1);
|
|
3527
3527
|
}
|
|
3528
|
-
const gt = (E,
|
|
3528
|
+
const gt = (E, h) => {
|
|
3529
3529
|
if (!E.beforeMatch) return;
|
|
3530
3530
|
if (E.starts) throw new Error("beforeMatch cannot be used with starts");
|
|
3531
3531
|
const D = Object.assign({}, E);
|
|
@@ -3553,40 +3553,40 @@ function Vm() {
|
|
|
3553
3553
|
"value"
|
|
3554
3554
|
// common variable name
|
|
3555
3555
|
], zt = "keyword";
|
|
3556
|
-
function ft(E,
|
|
3556
|
+
function ft(E, h, D = zt) {
|
|
3557
3557
|
const H = /* @__PURE__ */ Object.create(null);
|
|
3558
3558
|
return typeof E == "string" ? se(D, E.split(" ")) : Array.isArray(E) ? se(D, E) : Object.keys(E).forEach(function(ce) {
|
|
3559
3559
|
Object.assign(
|
|
3560
3560
|
H,
|
|
3561
|
-
ft(E[ce],
|
|
3561
|
+
ft(E[ce], h, ce)
|
|
3562
3562
|
);
|
|
3563
3563
|
}), H;
|
|
3564
|
-
function se(ce,
|
|
3565
|
-
|
|
3566
|
-
const q =
|
|
3564
|
+
function se(ce, G) {
|
|
3565
|
+
h && (G = G.map((k) => k.toLowerCase())), G.forEach(function(k) {
|
|
3566
|
+
const q = k.split("|");
|
|
3567
3567
|
H[q[0]] = [ce, rt(q[0], q[1])];
|
|
3568
3568
|
});
|
|
3569
3569
|
}
|
|
3570
3570
|
}
|
|
3571
|
-
function rt(E,
|
|
3572
|
-
return
|
|
3571
|
+
function rt(E, h) {
|
|
3572
|
+
return h ? Number(h) : Wt(E) ? 0 : 1;
|
|
3573
3573
|
}
|
|
3574
3574
|
function Wt(E) {
|
|
3575
3575
|
return St.includes(E.toLowerCase());
|
|
3576
3576
|
}
|
|
3577
3577
|
const bt = {}, Pe = (E) => {
|
|
3578
3578
|
console.error(E);
|
|
3579
|
-
}, We = (E, ...
|
|
3580
|
-
console.log(`WARN: ${E}`, ...
|
|
3581
|
-
}, Ne = (E,
|
|
3582
|
-
bt[`${E}/${
|
|
3579
|
+
}, We = (E, ...h) => {
|
|
3580
|
+
console.log(`WARN: ${E}`, ...h);
|
|
3581
|
+
}, Ne = (E, h) => {
|
|
3582
|
+
bt[`${E}/${h}`] || (console.log(`Deprecated as of ${E}. ${h}`), bt[`${E}/${h}`] = !0);
|
|
3583
3583
|
}, Ze = new Error();
|
|
3584
|
-
function Tt(E,
|
|
3584
|
+
function Tt(E, h, { key: D }) {
|
|
3585
3585
|
let H = 0;
|
|
3586
|
-
const se = E[D], ce = {},
|
|
3587
|
-
for (let
|
|
3588
|
-
|
|
3589
|
-
E[D] =
|
|
3586
|
+
const se = E[D], ce = {}, G = {};
|
|
3587
|
+
for (let k = 1; k <= h.length; k++)
|
|
3588
|
+
G[k + H] = se[k], ce[k + H] = !0, H += f(h[k - 1]);
|
|
3589
|
+
E[D] = G, E[D]._emit = ce, E[D]._multi = !0;
|
|
3590
3590
|
}
|
|
3591
3591
|
function Rt(E) {
|
|
3592
3592
|
if (Array.isArray(E.begin)) {
|
|
@@ -3613,10 +3613,10 @@ function Vm() {
|
|
|
3613
3613
|
$t(E), typeof E.beginScope == "string" && (E.beginScope = { _wrap: E.beginScope }), typeof E.endScope == "string" && (E.endScope = { _wrap: E.endScope }), Rt(E), at(E);
|
|
3614
3614
|
}
|
|
3615
3615
|
function Kt(E) {
|
|
3616
|
-
function
|
|
3616
|
+
function h(G, k) {
|
|
3617
3617
|
return new RegExp(
|
|
3618
|
-
_(
|
|
3619
|
-
"m" + (E.case_insensitive ? "i" : "") + (E.unicodeRegex ? "u" : "") + (
|
|
3618
|
+
_(G),
|
|
3619
|
+
"m" + (E.case_insensitive ? "i" : "") + (E.unicodeRegex ? "u" : "") + (k ? "g" : "")
|
|
3620
3620
|
);
|
|
3621
3621
|
}
|
|
3622
3622
|
class D {
|
|
@@ -3624,18 +3624,18 @@ function Vm() {
|
|
|
3624
3624
|
this.matchIndexes = {}, this.regexes = [], this.matchAt = 1, this.position = 0;
|
|
3625
3625
|
}
|
|
3626
3626
|
// @ts-ignore
|
|
3627
|
-
addRule(
|
|
3628
|
-
q.position = this.position++, this.matchIndexes[this.matchAt] = q, this.regexes.push([q,
|
|
3627
|
+
addRule(k, q) {
|
|
3628
|
+
q.position = this.position++, this.matchIndexes[this.matchAt] = q, this.regexes.push([q, k]), this.matchAt += f(k) + 1;
|
|
3629
3629
|
}
|
|
3630
3630
|
compile() {
|
|
3631
3631
|
this.regexes.length === 0 && (this.exec = () => null);
|
|
3632
|
-
const
|
|
3633
|
-
this.matcherRe =
|
|
3632
|
+
const k = this.regexes.map((q) => q[1]);
|
|
3633
|
+
this.matcherRe = h(N(k, { joinWith: "|" }), !0), this.lastIndex = 0;
|
|
3634
3634
|
}
|
|
3635
3635
|
/** @param {string} s */
|
|
3636
|
-
exec(
|
|
3636
|
+
exec(k) {
|
|
3637
3637
|
this.matcherRe.lastIndex = this.lastIndex;
|
|
3638
|
-
const q = this.matcherRe.exec(
|
|
3638
|
+
const q = this.matcherRe.exec(k);
|
|
3639
3639
|
if (!q)
|
|
3640
3640
|
return null;
|
|
3641
3641
|
const me = q.findIndex((ot, Jt) => Jt > 0 && ot !== void 0), ue = this.matchIndexes[me];
|
|
@@ -3647,10 +3647,10 @@ function Vm() {
|
|
|
3647
3647
|
this.rules = [], this.multiRegexes = [], this.count = 0, this.lastIndex = 0, this.regexIndex = 0;
|
|
3648
3648
|
}
|
|
3649
3649
|
// @ts-ignore
|
|
3650
|
-
getMatcher(
|
|
3651
|
-
if (this.multiRegexes[
|
|
3650
|
+
getMatcher(k) {
|
|
3651
|
+
if (this.multiRegexes[k]) return this.multiRegexes[k];
|
|
3652
3652
|
const q = new D();
|
|
3653
|
-
return this.rules.slice(
|
|
3653
|
+
return this.rules.slice(k).forEach(([me, ue]) => q.addRule(me, ue)), q.compile(), this.multiRegexes[k] = q, q;
|
|
3654
3654
|
}
|
|
3655
3655
|
resumingScanAtSamePosition() {
|
|
3656
3656
|
return this.regexIndex !== 0;
|
|
@@ -3659,31 +3659,31 @@ function Vm() {
|
|
|
3659
3659
|
this.regexIndex = 0;
|
|
3660
3660
|
}
|
|
3661
3661
|
// @ts-ignore
|
|
3662
|
-
addRule(
|
|
3663
|
-
this.rules.push([
|
|
3662
|
+
addRule(k, q) {
|
|
3663
|
+
this.rules.push([k, q]), q.type === "begin" && this.count++;
|
|
3664
3664
|
}
|
|
3665
3665
|
/** @param {string} s */
|
|
3666
|
-
exec(
|
|
3666
|
+
exec(k) {
|
|
3667
3667
|
const q = this.getMatcher(this.regexIndex);
|
|
3668
3668
|
q.lastIndex = this.lastIndex;
|
|
3669
|
-
let me = q.exec(
|
|
3669
|
+
let me = q.exec(k);
|
|
3670
3670
|
if (this.resumingScanAtSamePosition() && !(me && me.index === this.lastIndex)) {
|
|
3671
3671
|
const ue = this.getMatcher(0);
|
|
3672
|
-
ue.lastIndex = this.lastIndex + 1, me = ue.exec(
|
|
3672
|
+
ue.lastIndex = this.lastIndex + 1, me = ue.exec(k);
|
|
3673
3673
|
}
|
|
3674
3674
|
return me && (this.regexIndex += me.position + 1, this.regexIndex === this.count && this.considerAll()), me;
|
|
3675
3675
|
}
|
|
3676
3676
|
}
|
|
3677
|
-
function se(
|
|
3678
|
-
const
|
|
3679
|
-
return
|
|
3677
|
+
function se(G) {
|
|
3678
|
+
const k = new H();
|
|
3679
|
+
return G.contains.forEach((q) => k.addRule(q.begin, { rule: q, type: "begin" })), G.terminatorEnd && k.addRule(G.terminatorEnd, { type: "end" }), G.illegal && k.addRule(G.illegal, { type: "illegal" }), k;
|
|
3680
3680
|
}
|
|
3681
|
-
function ce(
|
|
3681
|
+
function ce(G, k) {
|
|
3682
3682
|
const q = (
|
|
3683
3683
|
/** @type CompiledMode */
|
|
3684
|
-
|
|
3684
|
+
G
|
|
3685
3685
|
);
|
|
3686
|
-
if (
|
|
3686
|
+
if (G.isCompiled) return q;
|
|
3687
3687
|
[
|
|
3688
3688
|
Ce,
|
|
3689
3689
|
// do this early so compiler extensions generally don't have to worry about
|
|
@@ -3691,27 +3691,27 @@ function Vm() {
|
|
|
3691
3691
|
Vt,
|
|
3692
3692
|
Ct,
|
|
3693
3693
|
gt
|
|
3694
|
-
].forEach((ue) => ue(
|
|
3694
|
+
].forEach((ue) => ue(G, k)), E.compilerExtensions.forEach((ue) => ue(G, k)), G.__beforeBegin = null, [
|
|
3695
3695
|
ye,
|
|
3696
3696
|
// do this later so compiler extensions that come earlier have access to the
|
|
3697
3697
|
// raw array if they wanted to perhaps manipulate it, etc.
|
|
3698
3698
|
Et,
|
|
3699
3699
|
// default to 1 relevance if not specified
|
|
3700
3700
|
nt
|
|
3701
|
-
].forEach((ue) => ue(
|
|
3701
|
+
].forEach((ue) => ue(G, k)), G.isCompiled = !0;
|
|
3702
3702
|
let me = null;
|
|
3703
|
-
return typeof
|
|
3703
|
+
return typeof G.keywords == "object" && G.keywords.$pattern && (G.keywords = Object.assign({}, G.keywords), me = G.keywords.$pattern, delete G.keywords.$pattern), me = me || /\w+/, G.keywords && (G.keywords = ft(G.keywords, E.case_insensitive)), q.keywordPatternRe = h(me, !0), k && (G.begin || (G.begin = /\B|\b/), q.beginRe = h(q.begin), !G.end && !G.endsWithParent && (G.end = /\B|\b/), G.end && (q.endRe = h(q.end)), q.terminatorEnd = _(q.end) || "", G.endsWithParent && k.terminatorEnd && (q.terminatorEnd += (G.end ? "|" : "") + k.terminatorEnd)), G.illegal && (q.illegalRe = h(
|
|
3704
3704
|
/** @type {RegExp | string} */
|
|
3705
|
-
|
|
3706
|
-
)),
|
|
3707
|
-
return Qt(ue === "self" ?
|
|
3708
|
-
})),
|
|
3705
|
+
G.illegal
|
|
3706
|
+
)), G.contains || (G.contains = []), G.contains = [].concat(...G.contains.map(function(ue) {
|
|
3707
|
+
return Qt(ue === "self" ? G : ue);
|
|
3708
|
+
})), G.contains.forEach(function(ue) {
|
|
3709
3709
|
ce(
|
|
3710
3710
|
/** @type Mode */
|
|
3711
3711
|
ue,
|
|
3712
3712
|
q
|
|
3713
3713
|
);
|
|
3714
|
-
}),
|
|
3714
|
+
}), G.starts && ce(G.starts, k), q.matcher = se(q), q;
|
|
3715
3715
|
}
|
|
3716
3716
|
if (E.compilerExtensions || (E.compilerExtensions = []), E.contains && E.contains.includes("self"))
|
|
3717
3717
|
throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");
|
|
@@ -3724,21 +3724,21 @@ function Vm() {
|
|
|
3724
3724
|
return E ? E.endsWithParent || Nt(E.starts) : !1;
|
|
3725
3725
|
}
|
|
3726
3726
|
function Qt(E) {
|
|
3727
|
-
return E.variants && !E.cachedVariants && (E.cachedVariants = E.variants.map(function(
|
|
3728
|
-
return r(E, { variants: null },
|
|
3727
|
+
return E.variants && !E.cachedVariants && (E.cachedVariants = E.variants.map(function(h) {
|
|
3728
|
+
return r(E, { variants: null }, h);
|
|
3729
3729
|
})), E.cachedVariants ? E.cachedVariants : Nt(E) ? r(E, { starts: E.starts ? r(E.starts) : null }) : Object.isFrozen(E) ? r(E) : E;
|
|
3730
3730
|
}
|
|
3731
3731
|
var Xt = "11.11.1";
|
|
3732
3732
|
class Zt extends Error {
|
|
3733
|
-
constructor(
|
|
3734
|
-
super(
|
|
3733
|
+
constructor(h, D) {
|
|
3734
|
+
super(h), this.name = "HTMLInjectionError", this.html = D;
|
|
3735
3735
|
}
|
|
3736
3736
|
}
|
|
3737
3737
|
const it = n, Ot = r, Z = Symbol("nomatch"), Je = 7, Ye = function(E) {
|
|
3738
|
-
const
|
|
3738
|
+
const h = /* @__PURE__ */ Object.create(null), D = /* @__PURE__ */ Object.create(null), H = [];
|
|
3739
3739
|
let se = !0;
|
|
3740
|
-
const ce = "Could not find the language '{}', did you forget to load/include a language module?",
|
|
3741
|
-
let
|
|
3740
|
+
const ce = "Could not find the language '{}', did you forget to load/include a language module?", G = { disableAutodetect: !0, name: "Plain text", contains: [] };
|
|
3741
|
+
let k = {
|
|
3742
3742
|
ignoreUnescapedHTML: !1,
|
|
3743
3743
|
throwUnescapedHTML: !1,
|
|
3744
3744
|
noHighlightRe: /^(no-?highlight)$/i,
|
|
@@ -3751,12 +3751,12 @@ function Vm() {
|
|
|
3751
3751
|
__emitter: u
|
|
3752
3752
|
};
|
|
3753
3753
|
function q(I) {
|
|
3754
|
-
return
|
|
3754
|
+
return k.noHighlightRe.test(I);
|
|
3755
3755
|
}
|
|
3756
3756
|
function me(I) {
|
|
3757
3757
|
let Y = I.className + " ";
|
|
3758
3758
|
Y += I.parentNode ? I.parentNode.className : "";
|
|
3759
|
-
const $ =
|
|
3759
|
+
const $ = k.languageDetectRe.exec(Y);
|
|
3760
3760
|
if ($) {
|
|
3761
3761
|
const te = He($[1]);
|
|
3762
3762
|
return te || (We(ce.replace("{}", $[1])), We("Falling back to no-highlight mode for this block.", I)), te ? $[1] : "no-highlight";
|
|
@@ -3777,8 +3777,8 @@ https://github.com/highlightjs/highlight.js/issues/2277`), de = I, te = Y), $ ==
|
|
|
3777
3777
|
}
|
|
3778
3778
|
function ot(I, Y, $, te) {
|
|
3779
3779
|
const de = /* @__PURE__ */ Object.create(null);
|
|
3780
|
-
function De(x,
|
|
3781
|
-
return x.keywords[
|
|
3780
|
+
function De(x, B) {
|
|
3781
|
+
return x.keywords[B];
|
|
3782
3782
|
}
|
|
3783
3783
|
function Ve() {
|
|
3784
3784
|
if (!V.keywords) {
|
|
@@ -3787,21 +3787,21 @@ https://github.com/highlightjs/highlight.js/issues/2277`), de = I, te = Y), $ ==
|
|
|
3787
3787
|
}
|
|
3788
3788
|
let x = 0;
|
|
3789
3789
|
V.keywordPatternRe.lastIndex = 0;
|
|
3790
|
-
let
|
|
3791
|
-
for (;
|
|
3792
|
-
W += J.substring(x,
|
|
3793
|
-
const Q = xe.case_insensitive ?
|
|
3790
|
+
let B = V.keywordPatternRe.exec(J), W = "";
|
|
3791
|
+
for (; B; ) {
|
|
3792
|
+
W += J.substring(x, B.index);
|
|
3793
|
+
const Q = xe.case_insensitive ? B[0].toLowerCase() : B[0], ge = De(V, Q);
|
|
3794
3794
|
if (ge) {
|
|
3795
3795
|
const [Me, Ko] = ge;
|
|
3796
3796
|
if (Ee.addText(W), W = "", de[Q] = (de[Q] || 0) + 1, de[Q] <= Je && (je += Ko), Me.startsWith("_"))
|
|
3797
|
-
W +=
|
|
3797
|
+
W += B[0];
|
|
3798
3798
|
else {
|
|
3799
3799
|
const Qo = xe.classNameAliases[Me] || Me;
|
|
3800
|
-
Le(
|
|
3800
|
+
Le(B[0], Qo);
|
|
3801
3801
|
}
|
|
3802
3802
|
} else
|
|
3803
|
-
W +=
|
|
3804
|
-
x = V.keywordPatternRe.lastIndex,
|
|
3803
|
+
W += B[0];
|
|
3804
|
+
x = V.keywordPatternRe.lastIndex, B = V.keywordPatternRe.exec(J);
|
|
3805
3805
|
}
|
|
3806
3806
|
W += J.substring(x), Ee.addText(W);
|
|
3807
3807
|
}
|
|
@@ -3809,7 +3809,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), de = I, te = Y), $ ==
|
|
|
3809
3809
|
if (J === "") return;
|
|
3810
3810
|
let x = null;
|
|
3811
3811
|
if (typeof V.subLanguage == "string") {
|
|
3812
|
-
if (!
|
|
3812
|
+
if (!h[V.subLanguage]) {
|
|
3813
3813
|
Ee.addText(J);
|
|
3814
3814
|
return;
|
|
3815
3815
|
}
|
|
@@ -3822,30 +3822,30 @@ https://github.com/highlightjs/highlight.js/issues/2277`), de = I, te = Y), $ ==
|
|
|
3822
3822
|
function he() {
|
|
3823
3823
|
V.subLanguage != null ? It() : Ve(), J = "";
|
|
3824
3824
|
}
|
|
3825
|
-
function Le(x,
|
|
3826
|
-
x !== "" && (Ee.startScope(
|
|
3825
|
+
function Le(x, B) {
|
|
3826
|
+
x !== "" && (Ee.startScope(B), Ee.addText(x), Ee.endScope());
|
|
3827
3827
|
}
|
|
3828
|
-
function Cn(x,
|
|
3828
|
+
function Cn(x, B) {
|
|
3829
3829
|
let W = 1;
|
|
3830
|
-
const Q =
|
|
3830
|
+
const Q = B.length - 1;
|
|
3831
3831
|
for (; W <= Q; ) {
|
|
3832
3832
|
if (!x._emit[W]) {
|
|
3833
3833
|
W++;
|
|
3834
3834
|
continue;
|
|
3835
3835
|
}
|
|
3836
|
-
const ge = xe.classNameAliases[x[W]] || x[W], Me =
|
|
3836
|
+
const ge = xe.classNameAliases[x[W]] || x[W], Me = B[W];
|
|
3837
3837
|
ge ? Le(Me, ge) : (J = Me, Ve(), J = ""), W++;
|
|
3838
3838
|
}
|
|
3839
3839
|
}
|
|
3840
|
-
function Nn(x,
|
|
3841
|
-
return x.scope && typeof x.scope == "string" && Ee.openNode(xe.classNameAliases[x.scope] || x.scope), x.beginScope && (x.beginScope._wrap ? (Le(J, xe.classNameAliases[x.beginScope._wrap] || x.beginScope._wrap), J = "") : x.beginScope._multi && (Cn(x.beginScope,
|
|
3840
|
+
function Nn(x, B) {
|
|
3841
|
+
return x.scope && typeof x.scope == "string" && Ee.openNode(xe.classNameAliases[x.scope] || x.scope), x.beginScope && (x.beginScope._wrap ? (Le(J, xe.classNameAliases[x.beginScope._wrap] || x.beginScope._wrap), J = "") : x.beginScope._multi && (Cn(x.beginScope, B), J = "")), V = Object.create(x, { parent: { value: V } }), V;
|
|
3842
3842
|
}
|
|
3843
|
-
function On(x,
|
|
3844
|
-
let Q =
|
|
3843
|
+
function On(x, B, W) {
|
|
3844
|
+
let Q = T(x.endRe, W);
|
|
3845
3845
|
if (Q) {
|
|
3846
3846
|
if (x["on:end"]) {
|
|
3847
3847
|
const ge = new t(x);
|
|
3848
|
-
x["on:end"](
|
|
3848
|
+
x["on:end"](B, ge), ge.isMatchIgnored && (Q = !1);
|
|
3849
3849
|
}
|
|
3850
3850
|
if (Q) {
|
|
3851
3851
|
for (; x.endsParent && x.parent; )
|
|
@@ -3854,61 +3854,61 @@ https://github.com/highlightjs/highlight.js/issues/2277`), de = I, te = Y), $ ==
|
|
|
3854
3854
|
}
|
|
3855
3855
|
}
|
|
3856
3856
|
if (x.endsWithParent)
|
|
3857
|
-
return On(x.parent,
|
|
3857
|
+
return On(x.parent, B, W);
|
|
3858
3858
|
}
|
|
3859
3859
|
function Vo(x) {
|
|
3860
3860
|
return V.matcher.regexIndex === 0 ? (J += x[0], 1) : (xt = !0, 0);
|
|
3861
3861
|
}
|
|
3862
3862
|
function zo(x) {
|
|
3863
|
-
const
|
|
3863
|
+
const B = x[0], W = x.rule, Q = new t(W), ge = [W.__beforeBegin, W["on:begin"]];
|
|
3864
3864
|
for (const Me of ge)
|
|
3865
3865
|
if (Me && (Me(x, Q), Q.isMatchIgnored))
|
|
3866
|
-
return Vo(
|
|
3867
|
-
return W.skip ? J +=
|
|
3866
|
+
return Vo(B);
|
|
3867
|
+
return W.skip ? J += B : (W.excludeBegin && (J += B), he(), !W.returnBegin && !W.excludeBegin && (J = B)), Nn(W, x), W.returnBegin ? 0 : B.length;
|
|
3868
3868
|
}
|
|
3869
3869
|
function Wo(x) {
|
|
3870
|
-
const
|
|
3870
|
+
const B = x[0], W = Y.substring(x.index), Q = On(V, x, W);
|
|
3871
3871
|
if (!Q)
|
|
3872
3872
|
return Z;
|
|
3873
3873
|
const ge = V;
|
|
3874
|
-
V.endScope && V.endScope._wrap ? (he(), Le(
|
|
3874
|
+
V.endScope && V.endScope._wrap ? (he(), Le(B, V.endScope._wrap)) : V.endScope && V.endScope._multi ? (he(), Cn(V.endScope, x)) : ge.skip ? J += B : (ge.returnEnd || ge.excludeEnd || (J += B), he(), ge.excludeEnd && (J = B));
|
|
3875
3875
|
do
|
|
3876
3876
|
V.scope && Ee.closeNode(), !V.skip && !V.subLanguage && (je += V.relevance), V = V.parent;
|
|
3877
3877
|
while (V !== Q.parent);
|
|
3878
|
-
return Q.starts && Nn(Q.starts, x), ge.returnEnd ? 0 :
|
|
3878
|
+
return Q.starts && Nn(Q.starts, x), ge.returnEnd ? 0 : B.length;
|
|
3879
3879
|
}
|
|
3880
3880
|
function $o() {
|
|
3881
3881
|
const x = [];
|
|
3882
|
-
for (let
|
|
3883
|
-
|
|
3884
|
-
x.forEach((
|
|
3882
|
+
for (let B = V; B !== xe; B = B.parent)
|
|
3883
|
+
B.scope && x.unshift(B.scope);
|
|
3884
|
+
x.forEach((B) => Ee.openNode(B));
|
|
3885
3885
|
}
|
|
3886
3886
|
let vt = {};
|
|
3887
|
-
function tn(x,
|
|
3888
|
-
const W =
|
|
3887
|
+
function tn(x, B) {
|
|
3888
|
+
const W = B && B[0];
|
|
3889
3889
|
if (J += x, W == null)
|
|
3890
3890
|
return he(), 0;
|
|
3891
|
-
if (vt.type === "begin" &&
|
|
3892
|
-
if (J += Y.slice(
|
|
3891
|
+
if (vt.type === "begin" && B.type === "end" && vt.index === B.index && W === "") {
|
|
3892
|
+
if (J += Y.slice(B.index, B.index + 1), !se) {
|
|
3893
3893
|
const Q = new Error(`0 width match regex (${I})`);
|
|
3894
3894
|
throw Q.languageName = I, Q.badRule = vt.rule, Q;
|
|
3895
3895
|
}
|
|
3896
3896
|
return 1;
|
|
3897
3897
|
}
|
|
3898
|
-
if (vt =
|
|
3899
|
-
return zo(
|
|
3900
|
-
if (
|
|
3898
|
+
if (vt = B, B.type === "begin")
|
|
3899
|
+
return zo(B);
|
|
3900
|
+
if (B.type === "illegal" && !$) {
|
|
3901
3901
|
const Q = new Error('Illegal lexeme "' + W + '" for mode "' + (V.scope || "<unnamed>") + '"');
|
|
3902
3902
|
throw Q.mode = V, Q;
|
|
3903
|
-
} else if (
|
|
3904
|
-
const Q = Wo(
|
|
3903
|
+
} else if (B.type === "end") {
|
|
3904
|
+
const Q = Wo(B);
|
|
3905
3905
|
if (Q !== Z)
|
|
3906
3906
|
return Q;
|
|
3907
3907
|
}
|
|
3908
|
-
if (
|
|
3908
|
+
if (B.type === "illegal" && W === "")
|
|
3909
3909
|
return J += `
|
|
3910
3910
|
`, 1;
|
|
3911
|
-
if (Dt > 1e5 && Dt >
|
|
3911
|
+
if (Dt > 1e5 && Dt > B.index * 3)
|
|
3912
3912
|
throw new Error("potential infinite loop, way more iterations than matches");
|
|
3913
3913
|
return J += W, W.length;
|
|
3914
3914
|
}
|
|
@@ -3917,7 +3917,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), de = I, te = Y), $ ==
|
|
|
3917
3917
|
throw Pe(ce.replace("{}", I)), new Error('Unknown language: "' + I + '"');
|
|
3918
3918
|
const hn = Kt(xe);
|
|
3919
3919
|
let yt = "", V = te || hn;
|
|
3920
|
-
const nn = {}, Ee = new
|
|
3920
|
+
const nn = {}, Ee = new k.__emitter(k);
|
|
3921
3921
|
$o();
|
|
3922
3922
|
let J = "", je = 0, ke = 0, Dt = 0, xt = !1;
|
|
3923
3923
|
try {
|
|
@@ -3928,7 +3928,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), de = I, te = Y), $ ==
|
|
|
3928
3928
|
Dt++, xt ? xt = !1 : V.matcher.considerAll(), V.matcher.lastIndex = ke;
|
|
3929
3929
|
const x = V.matcher.exec(Y);
|
|
3930
3930
|
if (!x) break;
|
|
3931
|
-
const
|
|
3931
|
+
const B = Y.substring(ke, x.index), W = tn(B, x);
|
|
3932
3932
|
ke = x.index + W;
|
|
3933
3933
|
}
|
|
3934
3934
|
tn(Y.substring(ke));
|
|
@@ -3975,13 +3975,13 @@ https://github.com/highlightjs/highlight.js/issues/2277`), de = I, te = Y), $ ==
|
|
|
3975
3975
|
value: it(I),
|
|
3976
3976
|
illegal: !1,
|
|
3977
3977
|
relevance: 0,
|
|
3978
|
-
_top:
|
|
3979
|
-
_emitter: new
|
|
3978
|
+
_top: G,
|
|
3979
|
+
_emitter: new k.__emitter(k)
|
|
3980
3980
|
};
|
|
3981
3981
|
return Y._emitter.addText(I), Y;
|
|
3982
3982
|
}
|
|
3983
3983
|
function jt(I, Y) {
|
|
3984
|
-
Y = Y ||
|
|
3984
|
+
Y = Y || k.languages || Object.keys(h);
|
|
3985
3985
|
const $ = Jt(I), te = Y.filter(He).filter(Rn).map(
|
|
3986
3986
|
(he) => ot(he, I, !1)
|
|
3987
3987
|
);
|
|
@@ -4013,7 +4013,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), de = I, te = Y), $ ==
|
|
|
4013
4013
|
console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.", I);
|
|
4014
4014
|
return;
|
|
4015
4015
|
}
|
|
4016
|
-
if (I.children.length > 0 && (
|
|
4016
|
+
if (I.children.length > 0 && (k.ignoreUnescapedHTML || (console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."), console.warn("https://github.com/highlightjs/highlight.js/wiki/security"), console.warn("The element with unescaped HTML:"), console.warn(I)), k.throwUnescapedHTML))
|
|
4017
4017
|
throw new Zt(
|
|
4018
4018
|
"One of your code blocks includes unescaped HTML.",
|
|
4019
4019
|
I.innerHTML
|
|
@@ -4031,7 +4031,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), de = I, te = Y), $ ==
|
|
|
4031
4031
|
}), At("after:highlightElement", { el: I, result: de, text: te });
|
|
4032
4032
|
}
|
|
4033
4033
|
function wo(I) {
|
|
4034
|
-
|
|
4034
|
+
k = Ot(k, I);
|
|
4035
4035
|
}
|
|
4036
4036
|
const Po = () => {
|
|
4037
4037
|
ht(), Ne("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
|
|
@@ -4048,7 +4048,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), de = I, te = Y), $ ==
|
|
|
4048
4048
|
bn || window.addEventListener("DOMContentLoaded", I, !1), bn = !0;
|
|
4049
4049
|
return;
|
|
4050
4050
|
}
|
|
4051
|
-
document.querySelectorAll(
|
|
4051
|
+
document.querySelectorAll(k.cssSelector).forEach(en);
|
|
4052
4052
|
}
|
|
4053
4053
|
function Fo(I, Y) {
|
|
4054
4054
|
let $ = null;
|
|
@@ -4059,20 +4059,20 @@ https://github.com/highlightjs/highlight.js/issues/2277`), de = I, te = Y), $ ==
|
|
|
4059
4059
|
Pe(te);
|
|
4060
4060
|
else
|
|
4061
4061
|
throw te;
|
|
4062
|
-
$ =
|
|
4062
|
+
$ = G;
|
|
4063
4063
|
}
|
|
4064
|
-
$.name || ($.name = I),
|
|
4064
|
+
$.name || ($.name = I), h[I] = $, $.rawDefinition = Y.bind(null, E), $.aliases && Tn($.aliases, { languageName: I });
|
|
4065
4065
|
}
|
|
4066
4066
|
function Uo(I) {
|
|
4067
|
-
delete
|
|
4067
|
+
delete h[I];
|
|
4068
4068
|
for (const Y of Object.keys(D))
|
|
4069
4069
|
D[Y] === I && delete D[Y];
|
|
4070
4070
|
}
|
|
4071
4071
|
function Bo() {
|
|
4072
|
-
return Object.keys(
|
|
4072
|
+
return Object.keys(h);
|
|
4073
4073
|
}
|
|
4074
4074
|
function He(I) {
|
|
4075
|
-
return I = (I || "").toLowerCase(),
|
|
4075
|
+
return I = (I || "").toLowerCase(), h[I] || h[D[I]];
|
|
4076
4076
|
}
|
|
4077
4077
|
function Tn(I, { languageName: Y }) {
|
|
4078
4078
|
typeof I == "string" && (I = [I]), I.forEach(($) => {
|
|
@@ -4136,7 +4136,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), de = I, te = Y), $ ==
|
|
|
4136
4136
|
}, E.versionString = Xt, E.regex = {
|
|
4137
4137
|
concat: g,
|
|
4138
4138
|
lookahead: m,
|
|
4139
|
-
either:
|
|
4139
|
+
either: b,
|
|
4140
4140
|
optional: d,
|
|
4141
4141
|
anyNumberOfTimes: p
|
|
4142
4142
|
};
|
|
@@ -5701,7 +5701,7 @@ function eE() {
|
|
|
5701
5701
|
"while",
|
|
5702
5702
|
"xor",
|
|
5703
5703
|
"xor_eq"
|
|
5704
|
-
],
|
|
5704
|
+
], b = [
|
|
5705
5705
|
"bool",
|
|
5706
5706
|
"char",
|
|
5707
5707
|
"char16_t",
|
|
@@ -5776,7 +5776,7 @@ function eE() {
|
|
|
5776
5776
|
"weak_ptr",
|
|
5777
5777
|
"wstring",
|
|
5778
5778
|
"wstring_view"
|
|
5779
|
-
],
|
|
5779
|
+
], T = [
|
|
5780
5780
|
"abort",
|
|
5781
5781
|
"abs",
|
|
5782
5782
|
"acos",
|
|
@@ -5878,7 +5878,7 @@ function eE() {
|
|
|
5878
5878
|
"vprintf",
|
|
5879
5879
|
"vsprintf"
|
|
5880
5880
|
], R = {
|
|
5881
|
-
type:
|
|
5881
|
+
type: b,
|
|
5882
5882
|
keyword: S,
|
|
5883
5883
|
literal: [
|
|
5884
5884
|
"NULL",
|
|
@@ -5894,7 +5894,7 @@ function eE() {
|
|
|
5894
5894
|
relevance: 0,
|
|
5895
5895
|
keywords: {
|
|
5896
5896
|
// Only for relevance, not highlighting.
|
|
5897
|
-
_hint:
|
|
5897
|
+
_hint: T
|
|
5898
5898
|
},
|
|
5899
5899
|
begin: r.concat(
|
|
5900
5900
|
/\b/,
|
|
@@ -5914,7 +5914,7 @@ function eE() {
|
|
|
5914
5914
|
n.C_BLOCK_COMMENT_MODE,
|
|
5915
5915
|
m,
|
|
5916
5916
|
_
|
|
5917
|
-
],
|
|
5917
|
+
], U = {
|
|
5918
5918
|
// This mode covers expression context where we can't expect a function
|
|
5919
5919
|
// definition and shouldn't highlight anything that looks like one:
|
|
5920
5920
|
// `return some()`, `else if()`, `(x*sum(1, 2))`
|
|
@@ -6035,7 +6035,7 @@ function eE() {
|
|
|
6035
6035
|
illegal: "</",
|
|
6036
6036
|
classNameAliases: { "function.dispatch": "built_in" },
|
|
6037
6037
|
contains: [].concat(
|
|
6038
|
-
|
|
6038
|
+
U,
|
|
6039
6039
|
A,
|
|
6040
6040
|
y,
|
|
6041
6041
|
v,
|
|
@@ -7872,10 +7872,10 @@ function uE() {
|
|
|
7872
7872
|
"coproc",
|
|
7873
7873
|
"function",
|
|
7874
7874
|
"select"
|
|
7875
|
-
],
|
|
7875
|
+
], b = [
|
|
7876
7876
|
"true",
|
|
7877
7877
|
"false"
|
|
7878
|
-
], f = { match: /(\/[a-z._-]+)+/ },
|
|
7878
|
+
], f = { match: /(\/[a-z._-]+)+/ }, T = [
|
|
7879
7879
|
"break",
|
|
7880
7880
|
"cd",
|
|
7881
7881
|
"continue",
|
|
@@ -8100,9 +8100,9 @@ function uE() {
|
|
|
8100
8100
|
keywords: {
|
|
8101
8101
|
$pattern: /\b[a-z][a-z0-9._-]+\b/,
|
|
8102
8102
|
keyword: S,
|
|
8103
|
-
literal:
|
|
8103
|
+
literal: b,
|
|
8104
8104
|
built_in: [
|
|
8105
|
-
...
|
|
8105
|
+
...T,
|
|
8106
8106
|
...C,
|
|
8107
8107
|
// Shell modifiers
|
|
8108
8108
|
"set",
|
|
@@ -8507,7 +8507,7 @@ function mE() {
|
|
|
8507
8507
|
className: "title",
|
|
8508
8508
|
begin: n.optional(i) + t.IDENT_RE,
|
|
8509
8509
|
relevance: 0
|
|
8510
|
-
}, d = n.optional(i) + t.IDENT_RE + "\\s*\\(",
|
|
8510
|
+
}, d = n.optional(i) + t.IDENT_RE + "\\s*\\(", b = {
|
|
8511
8511
|
keyword: [
|
|
8512
8512
|
"asm",
|
|
8513
8513
|
"auto",
|
|
@@ -8598,7 +8598,7 @@ function mE() {
|
|
|
8598
8598
|
t.C_BLOCK_COMMENT_MODE,
|
|
8599
8599
|
_,
|
|
8600
8600
|
u
|
|
8601
|
-
],
|
|
8601
|
+
], T = {
|
|
8602
8602
|
// This mode covers expression context where we can't expect a function
|
|
8603
8603
|
// definition and shouldn't highlight anything that looks like one:
|
|
8604
8604
|
// `return some()`, `else if()`, `(x*sum(1, 2))`
|
|
@@ -8616,12 +8616,12 @@ function mE() {
|
|
|
8616
8616
|
end: /;/
|
|
8617
8617
|
}
|
|
8618
8618
|
],
|
|
8619
|
-
keywords:
|
|
8619
|
+
keywords: b,
|
|
8620
8620
|
contains: f.concat([
|
|
8621
8621
|
{
|
|
8622
8622
|
begin: /\(/,
|
|
8623
8623
|
end: /\)/,
|
|
8624
|
-
keywords:
|
|
8624
|
+
keywords: b,
|
|
8625
8625
|
contains: f.concat(["self"]),
|
|
8626
8626
|
relevance: 0
|
|
8627
8627
|
}
|
|
@@ -8632,13 +8632,13 @@ function mE() {
|
|
|
8632
8632
|
returnBegin: !0,
|
|
8633
8633
|
end: /[{;=]/,
|
|
8634
8634
|
excludeEnd: !0,
|
|
8635
|
-
keywords:
|
|
8635
|
+
keywords: b,
|
|
8636
8636
|
illegal: /[^\w\s\*&:<>.]/,
|
|
8637
8637
|
contains: [
|
|
8638
8638
|
{
|
|
8639
8639
|
// to prevent it from being confused as the function title
|
|
8640
8640
|
begin: a,
|
|
8641
|
-
keywords:
|
|
8641
|
+
keywords: b,
|
|
8642
8642
|
relevance: 0
|
|
8643
8643
|
},
|
|
8644
8644
|
{
|
|
@@ -8657,7 +8657,7 @@ function mE() {
|
|
|
8657
8657
|
className: "params",
|
|
8658
8658
|
begin: /\(/,
|
|
8659
8659
|
end: /\)/,
|
|
8660
|
-
keywords:
|
|
8660
|
+
keywords: b,
|
|
8661
8661
|
relevance: 0,
|
|
8662
8662
|
contains: [
|
|
8663
8663
|
r,
|
|
@@ -8669,7 +8669,7 @@ function mE() {
|
|
|
8669
8669
|
{
|
|
8670
8670
|
begin: /\(/,
|
|
8671
8671
|
end: /\)/,
|
|
8672
|
-
keywords:
|
|
8672
|
+
keywords: b,
|
|
8673
8673
|
relevance: 0,
|
|
8674
8674
|
contains: [
|
|
8675
8675
|
"self",
|
|
@@ -8691,20 +8691,20 @@ function mE() {
|
|
|
8691
8691
|
return {
|
|
8692
8692
|
name: "C",
|
|
8693
8693
|
aliases: ["h"],
|
|
8694
|
-
keywords:
|
|
8694
|
+
keywords: b,
|
|
8695
8695
|
// Until differentiations are added between `c` and `cpp`, `c` will
|
|
8696
8696
|
// not be auto-detected to avoid auto-detect conflicts between C and C++
|
|
8697
8697
|
disableAutodetect: !0,
|
|
8698
8698
|
illegal: "</",
|
|
8699
8699
|
contains: [].concat(
|
|
8700
|
-
|
|
8700
|
+
T,
|
|
8701
8701
|
C,
|
|
8702
8702
|
f,
|
|
8703
8703
|
[
|
|
8704
8704
|
m,
|
|
8705
8705
|
{
|
|
8706
8706
|
begin: t.IDENT_RE + "::",
|
|
8707
|
-
keywords:
|
|
8707
|
+
keywords: b
|
|
8708
8708
|
},
|
|
8709
8709
|
{
|
|
8710
8710
|
className: "class",
|
|
@@ -8720,7 +8720,7 @@ function mE() {
|
|
|
8720
8720
|
exports: {
|
|
8721
8721
|
preprocessor: m,
|
|
8722
8722
|
strings: u,
|
|
8723
|
-
keywords:
|
|
8723
|
+
keywords: b
|
|
8724
8724
|
}
|
|
8725
8725
|
};
|
|
8726
8726
|
}
|
|
@@ -9219,7 +9219,7 @@ function bE() {
|
|
|
9219
9219
|
}, S = {
|
|
9220
9220
|
begin: "\\(",
|
|
9221
9221
|
end: "\\)"
|
|
9222
|
-
},
|
|
9222
|
+
}, b = {
|
|
9223
9223
|
endsWithParent: !0,
|
|
9224
9224
|
relevance: 0
|
|
9225
9225
|
}, f = {
|
|
@@ -9227,8 +9227,8 @@ function bE() {
|
|
|
9227
9227
|
className: "name",
|
|
9228
9228
|
begin: r,
|
|
9229
9229
|
relevance: 0,
|
|
9230
|
-
starts:
|
|
9231
|
-
},
|
|
9230
|
+
starts: b
|
|
9231
|
+
}, T = [
|
|
9232
9232
|
_,
|
|
9233
9233
|
S,
|
|
9234
9234
|
c,
|
|
@@ -9256,13 +9256,13 @@ function bE() {
|
|
|
9256
9256
|
// we can only have a single title
|
|
9257
9257
|
endsParent: !0
|
|
9258
9258
|
}
|
|
9259
|
-
].concat(
|
|
9259
|
+
].concat(T)
|
|
9260
9260
|
};
|
|
9261
9261
|
return S.contains = [
|
|
9262
9262
|
C,
|
|
9263
9263
|
f,
|
|
9264
|
-
|
|
9265
|
-
],
|
|
9264
|
+
b
|
|
9265
|
+
], b.contains = T, d.contains = T, {
|
|
9266
9266
|
name: "Clojure",
|
|
9267
9267
|
aliases: [
|
|
9268
9268
|
"clj",
|
|
@@ -9589,7 +9589,7 @@ function CE() {
|
|
|
9589
9589
|
}
|
|
9590
9590
|
];
|
|
9591
9591
|
g.contains = S;
|
|
9592
|
-
const
|
|
9592
|
+
const b = o.inherit(o.TITLE_MODE, { begin: d }), f = "(\\(.*\\)\\s*)?\\B[-=]>", T = {
|
|
9593
9593
|
className: "params",
|
|
9594
9594
|
begin: "\\([^\\(]",
|
|
9595
9595
|
returnBegin: !0,
|
|
@@ -9641,8 +9641,8 @@ function CE() {
|
|
|
9641
9641
|
end: "[-=]>",
|
|
9642
9642
|
returnBegin: !0,
|
|
9643
9643
|
contains: [
|
|
9644
|
-
|
|
9645
|
-
|
|
9644
|
+
b,
|
|
9645
|
+
T
|
|
9646
9646
|
]
|
|
9647
9647
|
},
|
|
9648
9648
|
{
|
|
@@ -9655,7 +9655,7 @@ function CE() {
|
|
|
9655
9655
|
begin: f,
|
|
9656
9656
|
end: "[-=]>",
|
|
9657
9657
|
returnBegin: !0,
|
|
9658
|
-
contains: [
|
|
9658
|
+
contains: [T]
|
|
9659
9659
|
}
|
|
9660
9660
|
]
|
|
9661
9661
|
},
|
|
@@ -10374,7 +10374,7 @@ function hE() {
|
|
|
10374
10374
|
"signed",
|
|
10375
10375
|
"const",
|
|
10376
10376
|
"static"
|
|
10377
|
-
],
|
|
10377
|
+
], b = [
|
|
10378
10378
|
"any",
|
|
10379
10379
|
"auto_ptr",
|
|
10380
10380
|
"barrier",
|
|
@@ -10544,7 +10544,7 @@ function hE() {
|
|
|
10544
10544
|
"true"
|
|
10545
10545
|
],
|
|
10546
10546
|
built_in: ["_Pragma"],
|
|
10547
|
-
_type_hints:
|
|
10547
|
+
_type_hints: b
|
|
10548
10548
|
}, R = {
|
|
10549
10549
|
className: "function.dispatch",
|
|
10550
10550
|
relevance: 0,
|
|
@@ -10599,7 +10599,7 @@ function hE() {
|
|
|
10599
10599
|
}
|
|
10600
10600
|
]),
|
|
10601
10601
|
relevance: 0
|
|
10602
|
-
},
|
|
10602
|
+
}, U = {
|
|
10603
10603
|
className: "function",
|
|
10604
10604
|
begin: "(" + o + "[\\*&\\s]+)+" + d,
|
|
10605
10605
|
returnBegin: !0,
|
|
@@ -10692,7 +10692,7 @@ function hE() {
|
|
|
10692
10692
|
classNameAliases: { "function.dispatch": "built_in" },
|
|
10693
10693
|
contains: [].concat(
|
|
10694
10694
|
v,
|
|
10695
|
-
|
|
10695
|
+
U,
|
|
10696
10696
|
R,
|
|
10697
10697
|
y,
|
|
10698
10698
|
[
|
|
@@ -10846,11 +10846,11 @@ function IE() {
|
|
|
10846
10846
|
],
|
|
10847
10847
|
keywords: o
|
|
10848
10848
|
};
|
|
10849
|
-
function _(f,
|
|
10849
|
+
function _(f, T) {
|
|
10850
10850
|
const C = [
|
|
10851
10851
|
{
|
|
10852
10852
|
begin: f,
|
|
10853
|
-
end:
|
|
10853
|
+
end: T
|
|
10854
10854
|
}
|
|
10855
10855
|
];
|
|
10856
10856
|
return C[0].contains = C, C;
|
|
@@ -10998,7 +10998,7 @@ function IE() {
|
|
|
10998
10998
|
begin: "@\\[",
|
|
10999
10999
|
end: "\\]",
|
|
11000
11000
|
contains: [t.inherit(t.QUOTE_STRING_MODE, { className: "string" })]
|
|
11001
|
-
},
|
|
11001
|
+
}, b = [
|
|
11002
11002
|
u,
|
|
11003
11003
|
m,
|
|
11004
11004
|
p,
|
|
@@ -11090,11 +11090,11 @@ function IE() {
|
|
|
11090
11090
|
relevance: 0
|
|
11091
11091
|
}
|
|
11092
11092
|
];
|
|
11093
|
-
return c.contains =
|
|
11093
|
+
return c.contains = b, u.contains = b.slice(1), {
|
|
11094
11094
|
name: "Crystal",
|
|
11095
11095
|
aliases: ["cr"],
|
|
11096
11096
|
keywords: o,
|
|
11097
|
-
contains:
|
|
11097
|
+
contains: b
|
|
11098
11098
|
};
|
|
11099
11099
|
}
|
|
11100
11100
|
return gr = e, gr;
|
|
@@ -11292,7 +11292,7 @@ function vE() {
|
|
|
11292
11292
|
{ begin: '""' },
|
|
11293
11293
|
p
|
|
11294
11294
|
]
|
|
11295
|
-
},
|
|
11295
|
+
}, b = t.inherit(S, {
|
|
11296
11296
|
illegal: /\n/,
|
|
11297
11297
|
contains: [
|
|
11298
11298
|
{ begin: /\{\{/ },
|
|
@@ -11310,7 +11310,7 @@ function vE() {
|
|
|
11310
11310
|
l,
|
|
11311
11311
|
t.C_BLOCK_COMMENT_MODE
|
|
11312
11312
|
], d.contains = [
|
|
11313
|
-
|
|
11313
|
+
b,
|
|
11314
11314
|
g,
|
|
11315
11315
|
m,
|
|
11316
11316
|
t.APOS_STRING_MODE,
|
|
@@ -11325,7 +11325,7 @@ function vE() {
|
|
|
11325
11325
|
_,
|
|
11326
11326
|
t.APOS_STRING_MODE,
|
|
11327
11327
|
t.QUOTE_STRING_MODE
|
|
11328
|
-
] },
|
|
11328
|
+
] }, T = {
|
|
11329
11329
|
begin: "<",
|
|
11330
11330
|
end: ">",
|
|
11331
11331
|
contains: [
|
|
@@ -11388,7 +11388,7 @@ function vE() {
|
|
|
11388
11388
|
contains: [
|
|
11389
11389
|
{ beginKeywords: "where class" },
|
|
11390
11390
|
c,
|
|
11391
|
-
|
|
11391
|
+
T,
|
|
11392
11392
|
t.C_LINE_COMMENT_MODE,
|
|
11393
11393
|
t.C_BLOCK_COMMENT_MODE
|
|
11394
11394
|
]
|
|
@@ -11411,7 +11411,7 @@ function vE() {
|
|
|
11411
11411
|
illegal: /[^\s:]/,
|
|
11412
11412
|
contains: [
|
|
11413
11413
|
c,
|
|
11414
|
-
|
|
11414
|
+
T,
|
|
11415
11415
|
t.C_LINE_COMMENT_MODE,
|
|
11416
11416
|
t.C_BLOCK_COMMENT_MODE
|
|
11417
11417
|
]
|
|
@@ -11455,7 +11455,7 @@ function vE() {
|
|
|
11455
11455
|
returnBegin: !0,
|
|
11456
11456
|
contains: [
|
|
11457
11457
|
t.TITLE_MODE,
|
|
11458
|
-
|
|
11458
|
+
T
|
|
11459
11459
|
],
|
|
11460
11460
|
relevance: 0
|
|
11461
11461
|
},
|
|
@@ -12491,7 +12491,7 @@ function xE() {
|
|
|
12491
12491
|
relevance: 0
|
|
12492
12492
|
}],
|
|
12493
12493
|
end: '"[cwd]?'
|
|
12494
|
-
},
|
|
12494
|
+
}, T = {
|
|
12495
12495
|
className: "string",
|
|
12496
12496
|
begin: '[rq]"',
|
|
12497
12497
|
end: '"[cwd]?',
|
|
@@ -12518,7 +12518,7 @@ function xE() {
|
|
|
12518
12518
|
begin: "#(line)",
|
|
12519
12519
|
end: "$",
|
|
12520
12520
|
relevance: 5
|
|
12521
|
-
},
|
|
12521
|
+
}, U = {
|
|
12522
12522
|
className: "keyword",
|
|
12523
12523
|
begin: "@[a-zA-Z_][a-zA-Z_\\d]*"
|
|
12524
12524
|
}, A = t.COMMENT(
|
|
@@ -12538,7 +12538,7 @@ function xE() {
|
|
|
12538
12538
|
A,
|
|
12539
12539
|
N,
|
|
12540
12540
|
f,
|
|
12541
|
-
|
|
12541
|
+
T,
|
|
12542
12542
|
C,
|
|
12543
12543
|
R,
|
|
12544
12544
|
g,
|
|
@@ -12546,7 +12546,7 @@ function xE() {
|
|
|
12546
12546
|
S,
|
|
12547
12547
|
y,
|
|
12548
12548
|
v,
|
|
12549
|
-
|
|
12549
|
+
U
|
|
12550
12550
|
]
|
|
12551
12551
|
};
|
|
12552
12552
|
}
|
|
@@ -14021,7 +14021,7 @@ function VE() {
|
|
|
14021
14021
|
R,
|
|
14022
14022
|
{ contains: [d(R.end)] }
|
|
14023
14023
|
))
|
|
14024
|
-
},
|
|
14024
|
+
}, b = {
|
|
14025
14025
|
className: "regex",
|
|
14026
14026
|
variants: [
|
|
14027
14027
|
{
|
|
@@ -14099,7 +14099,7 @@ function VE() {
|
|
|
14099
14099
|
end: /"/
|
|
14100
14100
|
}
|
|
14101
14101
|
]
|
|
14102
|
-
},
|
|
14102
|
+
}, T = {
|
|
14103
14103
|
className: "function",
|
|
14104
14104
|
beginKeywords: "def defp defmacro defmacrop",
|
|
14105
14105
|
end: /\B\b/,
|
|
@@ -14110,18 +14110,18 @@ function VE() {
|
|
|
14110
14110
|
endsParent: !0
|
|
14111
14111
|
})
|
|
14112
14112
|
]
|
|
14113
|
-
}, C = t.inherit(
|
|
14113
|
+
}, C = t.inherit(T, {
|
|
14114
14114
|
className: "class",
|
|
14115
14115
|
beginKeywords: "defimpl defmodule defprotocol defrecord",
|
|
14116
14116
|
end: /\bdo\b|$|;/
|
|
14117
14117
|
}), N = [
|
|
14118
14118
|
f,
|
|
14119
|
-
|
|
14119
|
+
b,
|
|
14120
14120
|
S,
|
|
14121
14121
|
g,
|
|
14122
14122
|
t.HASH_COMMENT_MODE,
|
|
14123
14123
|
C,
|
|
14124
|
-
|
|
14124
|
+
T,
|
|
14125
14125
|
{ begin: "::" },
|
|
14126
14126
|
{
|
|
14127
14127
|
className: "symbol",
|
|
@@ -14646,7 +14646,7 @@ function WE() {
|
|
|
14646
14646
|
}
|
|
14647
14647
|
].concat(l, u);
|
|
14648
14648
|
_.contains = y, S.contains = y;
|
|
14649
|
-
const
|
|
14649
|
+
const O = [
|
|
14650
14650
|
{
|
|
14651
14651
|
begin: /^\s*=>/,
|
|
14652
14652
|
starts: {
|
|
@@ -14675,7 +14675,7 @@ function WE() {
|
|
|
14675
14675
|
],
|
|
14676
14676
|
keywords: o,
|
|
14677
14677
|
illegal: /\/\*/,
|
|
14678
|
-
contains: [t.SHEBANG({ binary: "ruby" })].concat(
|
|
14678
|
+
contains: [t.SHEBANG({ binary: "ruby" })].concat(O).concat(u).concat(y)
|
|
14679
14679
|
};
|
|
14680
14680
|
}
|
|
14681
14681
|
return Pr = e, Pr;
|
|
@@ -14852,7 +14852,7 @@ function QE() {
|
|
|
14852
14852
|
m,
|
|
14853
14853
|
p
|
|
14854
14854
|
];
|
|
14855
|
-
const
|
|
14855
|
+
const b = [
|
|
14856
14856
|
i,
|
|
14857
14857
|
o,
|
|
14858
14858
|
S,
|
|
@@ -14867,7 +14867,7 @@ function QE() {
|
|
|
14867
14867
|
m,
|
|
14868
14868
|
p
|
|
14869
14869
|
];
|
|
14870
|
-
c.contains[1].contains =
|
|
14870
|
+
c.contains[1].contains = b, l.contains = b, m.contains[1].contains = b;
|
|
14871
14871
|
const f = [
|
|
14872
14872
|
"-module",
|
|
14873
14873
|
"-record",
|
|
@@ -14893,11 +14893,11 @@ function QE() {
|
|
|
14893
14893
|
"-spec",
|
|
14894
14894
|
"-on_load",
|
|
14895
14895
|
"-nifs"
|
|
14896
|
-
],
|
|
14896
|
+
], T = {
|
|
14897
14897
|
className: "params",
|
|
14898
14898
|
begin: "\\(",
|
|
14899
14899
|
end: "\\)",
|
|
14900
|
-
contains:
|
|
14900
|
+
contains: b
|
|
14901
14901
|
};
|
|
14902
14902
|
return {
|
|
14903
14903
|
name: "Erlang",
|
|
@@ -14912,13 +14912,13 @@ function QE() {
|
|
|
14912
14912
|
returnBegin: !0,
|
|
14913
14913
|
illegal: "\\(|#|//|/\\*|\\\\|:|;",
|
|
14914
14914
|
contains: [
|
|
14915
|
-
|
|
14915
|
+
T,
|
|
14916
14916
|
t.inherit(t.TITLE_MODE, { begin: n })
|
|
14917
14917
|
],
|
|
14918
14918
|
starts: {
|
|
14919
14919
|
end: ";|\\.",
|
|
14920
14920
|
keywords: a,
|
|
14921
|
-
contains:
|
|
14921
|
+
contains: b
|
|
14922
14922
|
}
|
|
14923
14923
|
},
|
|
14924
14924
|
i,
|
|
@@ -14933,7 +14933,7 @@ function QE() {
|
|
|
14933
14933
|
keyword: f.map((C) => `${C}|1.5`).join(" ")
|
|
14934
14934
|
},
|
|
14935
14935
|
contains: [
|
|
14936
|
-
|
|
14936
|
+
T,
|
|
14937
14937
|
g,
|
|
14938
14938
|
d,
|
|
14939
14939
|
t.QUOTE_STRING_MODE
|
|
@@ -16399,14 +16399,14 @@ function eg() {
|
|
|
16399
16399
|
"failwithf"
|
|
16400
16400
|
],
|
|
16401
16401
|
"variable.constant": m
|
|
16402
|
-
},
|
|
16402
|
+
}, b = {
|
|
16403
16403
|
variants: [
|
|
16404
16404
|
o.COMMENT(/\(\*(?!\))/, /\*\)/, {
|
|
16405
16405
|
contains: ["self"]
|
|
16406
16406
|
}),
|
|
16407
16407
|
o.C_LINE_COMMENT_MODE
|
|
16408
16408
|
]
|
|
16409
|
-
}, f = /[a-zA-Z_](\w|')*/,
|
|
16409
|
+
}, f = /[a-zA-Z_](\w|')*/, T = {
|
|
16410
16410
|
scope: "variable",
|
|
16411
16411
|
begin: /``/,
|
|
16412
16412
|
end: /``/
|
|
@@ -16447,7 +16447,7 @@ function eg() {
|
|
|
16447
16447
|
// A single $ can be used as an operator
|
|
16448
16448
|
relevance: 0
|
|
16449
16449
|
};
|
|
16450
|
-
}, y = R({ includeEqual: !0 }), v = R({ includeEqual: !1 }),
|
|
16450
|
+
}, y = R({ includeEqual: !0 }), v = R({ includeEqual: !1 }), U = function(ie, pe) {
|
|
16451
16451
|
return {
|
|
16452
16452
|
begin: r(
|
|
16453
16453
|
// a type annotation is a
|
|
@@ -16494,14 +16494,14 @@ function eg() {
|
|
|
16494
16494
|
// we need the known types, and we need the type constraint keywords and literals. e.g.: when 'a : null
|
|
16495
16495
|
keywords: o.inherit(g, { type: p }),
|
|
16496
16496
|
contains: [
|
|
16497
|
-
|
|
16497
|
+
b,
|
|
16498
16498
|
N,
|
|
16499
|
-
o.inherit(
|
|
16499
|
+
o.inherit(T, { scope: null }),
|
|
16500
16500
|
// match to avoid strange patterns inside that may break the parsing
|
|
16501
16501
|
v
|
|
16502
16502
|
]
|
|
16503
16503
|
};
|
|
16504
|
-
}, A =
|
|
16504
|
+
}, A = U(/:/, "operator"), O = U(/\bof\b/, "keyword"), M = {
|
|
16505
16505
|
begin: [
|
|
16506
16506
|
/(^|\s+)/,
|
|
16507
16507
|
// prevents matching the following: `match s.stype with`
|
|
@@ -16517,8 +16517,8 @@ function eg() {
|
|
|
16517
16517
|
keywords: g,
|
|
16518
16518
|
// match keywords in type constraints. e.g.: when 'a : null
|
|
16519
16519
|
contains: [
|
|
16520
|
-
|
|
16521
|
-
o.inherit(
|
|
16520
|
+
b,
|
|
16521
|
+
o.inherit(T, { scope: null }),
|
|
16522
16522
|
// match to avoid strange patterns inside that may break the parsing
|
|
16523
16523
|
N,
|
|
16524
16524
|
{
|
|
@@ -16534,7 +16534,7 @@ function eg() {
|
|
|
16534
16534
|
scope: "computation-expression",
|
|
16535
16535
|
// BUG: might conflict with record deconstruction. e.g. let f { Name = name } = name // will highlight f
|
|
16536
16536
|
match: /\b[_a-z]\w*(?=\s*\{)/
|
|
16537
|
-
},
|
|
16537
|
+
}, L = {
|
|
16538
16538
|
// preprocessor directives and fsi commands:
|
|
16539
16539
|
begin: [
|
|
16540
16540
|
/^\s*/,
|
|
@@ -16543,12 +16543,12 @@ function eg() {
|
|
|
16543
16543
|
],
|
|
16544
16544
|
beginScope: { 2: "meta" },
|
|
16545
16545
|
end: n(/\s|$/)
|
|
16546
|
-
},
|
|
16546
|
+
}, w = {
|
|
16547
16547
|
variants: [
|
|
16548
16548
|
o.BINARY_NUMBER_MODE,
|
|
16549
16549
|
o.C_NUMBER_MODE
|
|
16550
16550
|
]
|
|
16551
|
-
},
|
|
16551
|
+
}, F = {
|
|
16552
16552
|
scope: "string",
|
|
16553
16553
|
begin: /"/,
|
|
16554
16554
|
end: /"/,
|
|
@@ -16644,15 +16644,15 @@ function eg() {
|
|
|
16644
16644
|
Se,
|
|
16645
16645
|
le,
|
|
16646
16646
|
z,
|
|
16647
|
-
|
|
16647
|
+
F,
|
|
16648
16648
|
Re,
|
|
16649
16649
|
l,
|
|
16650
|
-
T,
|
|
16651
16650
|
b,
|
|
16651
|
+
T,
|
|
16652
16652
|
A,
|
|
16653
16653
|
P,
|
|
16654
|
-
G,
|
|
16655
16654
|
L,
|
|
16655
|
+
w,
|
|
16656
16656
|
N,
|
|
16657
16657
|
y
|
|
16658
16658
|
], {
|
|
@@ -16675,12 +16675,12 @@ function eg() {
|
|
|
16675
16675
|
le,
|
|
16676
16676
|
K,
|
|
16677
16677
|
z,
|
|
16678
|
-
|
|
16678
|
+
F,
|
|
16679
16679
|
Re
|
|
16680
16680
|
]
|
|
16681
16681
|
},
|
|
16682
|
-
T,
|
|
16683
16682
|
b,
|
|
16683
|
+
T,
|
|
16684
16684
|
M,
|
|
16685
16685
|
{
|
|
16686
16686
|
// e.g. [<Attributes("")>] or [<``module``: MyCustomAttributeThatWorksOnModules>]
|
|
@@ -16690,20 +16690,20 @@ function eg() {
|
|
|
16690
16690
|
end: />\]/,
|
|
16691
16691
|
relevance: 2,
|
|
16692
16692
|
contains: [
|
|
16693
|
-
|
|
16693
|
+
T,
|
|
16694
16694
|
// can contain any constant value
|
|
16695
16695
|
K,
|
|
16696
16696
|
z,
|
|
16697
|
-
|
|
16697
|
+
F,
|
|
16698
16698
|
Re,
|
|
16699
|
-
|
|
16699
|
+
w
|
|
16700
16700
|
]
|
|
16701
16701
|
},
|
|
16702
|
-
|
|
16702
|
+
O,
|
|
16703
16703
|
A,
|
|
16704
16704
|
P,
|
|
16705
|
-
G,
|
|
16706
16705
|
L,
|
|
16706
|
+
w,
|
|
16707
16707
|
N,
|
|
16708
16708
|
y
|
|
16709
16709
|
]
|
|
@@ -21244,7 +21244,7 @@ function pg() {
|
|
|
21244
21244
|
g
|
|
21245
21245
|
] }
|
|
21246
21246
|
}
|
|
21247
|
-
},
|
|
21247
|
+
}, b = {
|
|
21248
21248
|
// parameters of the form '{{#with x as | y |}}...{{/with}}'
|
|
21249
21249
|
begin: /as\s+\|/,
|
|
21250
21250
|
keywords: { keyword: "as" },
|
|
@@ -21260,7 +21260,7 @@ function pg() {
|
|
|
21260
21260
|
t.NUMBER_MODE,
|
|
21261
21261
|
t.QUOTE_STRING_MODE,
|
|
21262
21262
|
t.APOS_STRING_MODE,
|
|
21263
|
-
|
|
21263
|
+
b,
|
|
21264
21264
|
S,
|
|
21265
21265
|
d,
|
|
21266
21266
|
g
|
|
@@ -21269,12 +21269,12 @@ function pg() {
|
|
|
21269
21269
|
// the property "end" is defined through inheritance when the mode is used. If depends
|
|
21270
21270
|
// on the surrounding mode, but "endsWithParent" does not work here (i.e. it includes the
|
|
21271
21271
|
// end-token of the surrounding mode)
|
|
21272
|
-
},
|
|
21272
|
+
}, T = t.inherit(p, {
|
|
21273
21273
|
className: "name",
|
|
21274
21274
|
keywords: r,
|
|
21275
21275
|
starts: t.inherit(f, { end: /\)/ })
|
|
21276
21276
|
});
|
|
21277
|
-
g.contains = [
|
|
21277
|
+
g.contains = [T];
|
|
21278
21278
|
const C = t.inherit(p, {
|
|
21279
21279
|
keywords: r,
|
|
21280
21280
|
className: "name",
|
|
@@ -21894,7 +21894,7 @@ function fg() {
|
|
|
21894
21894
|
}, S = {
|
|
21895
21895
|
endsWithParent: !0,
|
|
21896
21896
|
relevance: 0
|
|
21897
|
-
},
|
|
21897
|
+
}, b = {
|
|
21898
21898
|
className: "name",
|
|
21899
21899
|
relevance: 0,
|
|
21900
21900
|
keywords: a,
|
|
@@ -21914,7 +21914,7 @@ function fg() {
|
|
|
21914
21914
|
];
|
|
21915
21915
|
return g.contains = [
|
|
21916
21916
|
t.COMMENT("comment", ""),
|
|
21917
|
-
|
|
21917
|
+
b,
|
|
21918
21918
|
S
|
|
21919
21919
|
], S.contains = f, _.contains = f, {
|
|
21920
21920
|
name: "Hy",
|
|
@@ -22204,7 +22204,7 @@ function Cg() {
|
|
|
22204
22204
|
}, x = { variants: [
|
|
22205
22205
|
Dt,
|
|
22206
22206
|
xt
|
|
22207
|
-
] },
|
|
22207
|
+
] }, B = {
|
|
22208
22208
|
$pattern: n,
|
|
22209
22209
|
keyword: a,
|
|
22210
22210
|
built_in: V,
|
|
@@ -22212,7 +22212,7 @@ function Cg() {
|
|
|
22212
22212
|
literal: Ee
|
|
22213
22213
|
}, W = {
|
|
22214
22214
|
begin: "\\.\\s*" + t.UNDERSCORE_IDENT_RE,
|
|
22215
|
-
keywords:
|
|
22215
|
+
keywords: B,
|
|
22216
22216
|
relevance: 0
|
|
22217
22217
|
}, Q = {
|
|
22218
22218
|
className: "type",
|
|
@@ -22221,7 +22221,7 @@ function Cg() {
|
|
|
22221
22221
|
excludeEnd: !0
|
|
22222
22222
|
}, ge = {
|
|
22223
22223
|
className: "variable",
|
|
22224
|
-
keywords:
|
|
22224
|
+
keywords: B,
|
|
22225
22225
|
begin: n,
|
|
22226
22226
|
relevance: 0,
|
|
22227
22227
|
contains: [
|
|
@@ -22232,7 +22232,7 @@ function Cg() {
|
|
|
22232
22232
|
return {
|
|
22233
22233
|
name: "ISBL",
|
|
22234
22234
|
case_insensitive: !0,
|
|
22235
|
-
keywords:
|
|
22235
|
+
keywords: B,
|
|
22236
22236
|
illegal: "\\$|\\?|%|,|;$|~|#|@|</",
|
|
22237
22237
|
contains: [
|
|
22238
22238
|
{
|
|
@@ -22240,7 +22240,7 @@ function Cg() {
|
|
|
22240
22240
|
begin: Me,
|
|
22241
22241
|
end: "\\)$",
|
|
22242
22242
|
returnBegin: !0,
|
|
22243
|
-
keywords:
|
|
22243
|
+
keywords: B,
|
|
22244
22244
|
illegal: "[\\[\\]\\|\\$\\?%,~#@]",
|
|
22245
22245
|
contains: [
|
|
22246
22246
|
{
|
|
@@ -22710,12 +22710,12 @@ function Og() {
|
|
|
22710
22710
|
literal: n,
|
|
22711
22711
|
built_in: o,
|
|
22712
22712
|
"variable.language": s
|
|
22713
|
-
},
|
|
22713
|
+
}, b = "[0-9](_?[0-9])*", f = `\\.(${b})`, T = "0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*", C = {
|
|
22714
22714
|
className: "number",
|
|
22715
22715
|
variants: [
|
|
22716
22716
|
// DecimalLiteral
|
|
22717
|
-
{ begin: `(\\b(${
|
|
22718
|
-
{ begin: `\\b(${
|
|
22717
|
+
{ begin: `(\\b(${T})((${f})|\\.)?|(${f}))[eE][+-]?(${b})\\b` },
|
|
22718
|
+
{ begin: `\\b(${T})\\b((${f})\\b|\\.)?|(${f})\\b` },
|
|
22719
22719
|
// DecimalBigIntegerLiteral
|
|
22720
22720
|
{ begin: "\\b(0|[1-9](_?[0-9])*)n\\b" },
|
|
22721
22721
|
// NonDecimalIntegerLiteral
|
|
@@ -22770,7 +22770,7 @@ function Og() {
|
|
|
22770
22770
|
],
|
|
22771
22771
|
subLanguage: "graphql"
|
|
22772
22772
|
}
|
|
22773
|
-
},
|
|
22773
|
+
}, U = {
|
|
22774
22774
|
className: "string",
|
|
22775
22775
|
begin: "`",
|
|
22776
22776
|
end: "`",
|
|
@@ -22778,7 +22778,7 @@ function Og() {
|
|
|
22778
22778
|
l.BACKSLASH_ESCAPE,
|
|
22779
22779
|
N
|
|
22780
22780
|
]
|
|
22781
|
-
},
|
|
22781
|
+
}, O = {
|
|
22782
22782
|
className: "comment",
|
|
22783
22783
|
variants: [
|
|
22784
22784
|
l.COMMENT(
|
|
@@ -22829,7 +22829,7 @@ function Og() {
|
|
|
22829
22829
|
R,
|
|
22830
22830
|
y,
|
|
22831
22831
|
v,
|
|
22832
|
-
|
|
22832
|
+
U,
|
|
22833
22833
|
// Skip numbers when they are part of a variable name
|
|
22834
22834
|
{ match: /\$\d+/ },
|
|
22835
22835
|
C
|
|
@@ -22847,7 +22847,7 @@ function Og() {
|
|
|
22847
22847
|
"self"
|
|
22848
22848
|
].concat(M)
|
|
22849
22849
|
});
|
|
22850
|
-
const P = [].concat(
|
|
22850
|
+
const P = [].concat(O, N.contains), L = P.concat([
|
|
22851
22851
|
// eat recursive parens in sub expressions
|
|
22852
22852
|
{
|
|
22853
22853
|
begin: /(\s*)\(/,
|
|
@@ -22855,7 +22855,7 @@ function Og() {
|
|
|
22855
22855
|
keywords: S,
|
|
22856
22856
|
contains: ["self"].concat(P)
|
|
22857
22857
|
}
|
|
22858
|
-
]),
|
|
22858
|
+
]), w = {
|
|
22859
22859
|
className: "params",
|
|
22860
22860
|
// convert this to negative lookbehind in v12
|
|
22861
22861
|
begin: /(\s*)\(/,
|
|
@@ -22864,8 +22864,8 @@ function Og() {
|
|
|
22864
22864
|
excludeBegin: !0,
|
|
22865
22865
|
excludeEnd: !0,
|
|
22866
22866
|
keywords: S,
|
|
22867
|
-
contains:
|
|
22868
|
-
},
|
|
22867
|
+
contains: L
|
|
22868
|
+
}, F = {
|
|
22869
22869
|
variants: [
|
|
22870
22870
|
// class Car extends vehicle
|
|
22871
22871
|
{
|
|
@@ -22950,7 +22950,7 @@ function Og() {
|
|
|
22950
22950
|
3: "title.function"
|
|
22951
22951
|
},
|
|
22952
22952
|
label: "func.def",
|
|
22953
|
-
contains: [
|
|
22953
|
+
contains: [w],
|
|
22954
22954
|
illegal: /%/
|
|
22955
22955
|
}, le = {
|
|
22956
22956
|
relevance: 0,
|
|
@@ -22998,7 +22998,7 @@ function Og() {
|
|
|
22998
22998
|
// eat to avoid empty params
|
|
22999
22999
|
begin: /\(\)/
|
|
23000
23000
|
},
|
|
23001
|
-
|
|
23001
|
+
w
|
|
23002
23002
|
]
|
|
23003
23003
|
}, ie = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + l.UNDERSCORE_IDENT_RE + ")\\s*=>", pe = {
|
|
23004
23004
|
match: [
|
|
@@ -23017,7 +23017,7 @@ function Og() {
|
|
|
23017
23017
|
3: "title.function"
|
|
23018
23018
|
},
|
|
23019
23019
|
contains: [
|
|
23020
|
-
|
|
23020
|
+
w
|
|
23021
23021
|
]
|
|
23022
23022
|
};
|
|
23023
23023
|
return {
|
|
@@ -23025,7 +23025,7 @@ function Og() {
|
|
|
23025
23025
|
aliases: ["js", "jsx", "mjs", "cjs"],
|
|
23026
23026
|
keywords: S,
|
|
23027
23027
|
// this will be extended by TypeScript
|
|
23028
|
-
exports: { PARAMS_CONTAINS:
|
|
23028
|
+
exports: { PARAMS_CONTAINS: L, CLASS_REFERENCE: z },
|
|
23029
23029
|
illegal: /#(?![$_A-z])/,
|
|
23030
23030
|
contains: [
|
|
23031
23031
|
l.SHEBANG({
|
|
@@ -23039,8 +23039,8 @@ function Og() {
|
|
|
23039
23039
|
R,
|
|
23040
23040
|
y,
|
|
23041
23041
|
v,
|
|
23042
|
-
|
|
23043
|
-
|
|
23042
|
+
U,
|
|
23043
|
+
O,
|
|
23044
23044
|
// Skip numbers when they are part of a variable name
|
|
23045
23045
|
{ match: /\$\d+/ },
|
|
23046
23046
|
C,
|
|
@@ -23057,7 +23057,7 @@ function Og() {
|
|
|
23057
23057
|
keywords: "return throw case",
|
|
23058
23058
|
relevance: 0,
|
|
23059
23059
|
contains: [
|
|
23060
|
-
|
|
23060
|
+
O,
|
|
23061
23061
|
l.REGEXP_MODE,
|
|
23062
23062
|
{
|
|
23063
23063
|
className: "function",
|
|
@@ -23086,7 +23086,7 @@ function Og() {
|
|
|
23086
23086
|
excludeBegin: !0,
|
|
23087
23087
|
excludeEnd: !0,
|
|
23088
23088
|
keywords: S,
|
|
23089
|
-
contains:
|
|
23089
|
+
contains: L
|
|
23090
23090
|
}
|
|
23091
23091
|
]
|
|
23092
23092
|
}
|
|
@@ -23141,7 +23141,7 @@ function Og() {
|
|
|
23141
23141
|
returnBegin: !0,
|
|
23142
23142
|
label: "func.def",
|
|
23143
23143
|
contains: [
|
|
23144
|
-
|
|
23144
|
+
w,
|
|
23145
23145
|
l.inherit(l.TITLE_MODE, { begin: m, className: "title.function" })
|
|
23146
23146
|
]
|
|
23147
23147
|
},
|
|
@@ -23161,11 +23161,11 @@ function Og() {
|
|
|
23161
23161
|
{
|
|
23162
23162
|
match: [/\bconstructor(?=\s*\()/],
|
|
23163
23163
|
className: { 1: "title.function" },
|
|
23164
|
-
contains: [
|
|
23164
|
+
contains: [w]
|
|
23165
23165
|
},
|
|
23166
23166
|
Oe,
|
|
23167
23167
|
le,
|
|
23168
|
-
|
|
23168
|
+
F,
|
|
23169
23169
|
Te,
|
|
23170
23170
|
{
|
|
23171
23171
|
match: /\$[(.]/
|
|
@@ -23773,8 +23773,8 @@ function yg() {
|
|
|
23773
23773
|
contains: []
|
|
23774
23774
|
// defined later
|
|
23775
23775
|
}
|
|
23776
|
-
] },
|
|
23777
|
-
return
|
|
23776
|
+
] }, b = S;
|
|
23777
|
+
return b.variants[1].contains = [S], S.variants[1].contains = [b], {
|
|
23778
23778
|
name: "Kotlin",
|
|
23779
23779
|
aliases: [
|
|
23780
23780
|
"kt",
|
|
@@ -24069,7 +24069,7 @@ function xg() {
|
|
|
24069
24069
|
"(?:[Ss]igma|varsigma|tau|[Uu]psilon|[Pp]hi|varphi|chi|[Pp]si|[Oo]mega)",
|
|
24070
24070
|
"(?:frac|sum|prod|lim|infty|times|sqrt|leq|geq|left|right|middle|[bB]igg?)",
|
|
24071
24071
|
"(?:[lr]angle|q?quad|[lcvdi]?dots|d?dot|hat|tilde|bar)"
|
|
24072
|
-
].map((
|
|
24072
|
+
].map((O) => O + "(?![a-zA-Z@:_])")), a = new RegExp([
|
|
24073
24073
|
// A function \module_function_name:signature or \__module_function_name:signature,
|
|
24074
24074
|
// where both module and function_name need at least two characters and
|
|
24075
24075
|
// function_name may contain single underscores.
|
|
@@ -24090,7 +24090,7 @@ function xg() {
|
|
|
24090
24090
|
"(?:hbox|vbox):n",
|
|
24091
24091
|
"::[a-zA-Z]_unbraced",
|
|
24092
24092
|
"::[a-zA-Z:]"
|
|
24093
|
-
].map((
|
|
24093
|
+
].map((O) => O + "(?![a-zA-Z:_])").join("|")), i = [
|
|
24094
24094
|
{ begin: /[a-zA-Z@]+/ },
|
|
24095
24095
|
// control word
|
|
24096
24096
|
{ begin: /[^a-zA-Z@]?/ }
|
|
@@ -24179,33 +24179,33 @@ function xg() {
|
|
|
24179
24179
|
d,
|
|
24180
24180
|
...p
|
|
24181
24181
|
]
|
|
24182
|
-
},
|
|
24182
|
+
}, b = {
|
|
24183
24183
|
begin: /\s+/,
|
|
24184
24184
|
relevance: 0
|
|
24185
|
-
}, f = [g],
|
|
24185
|
+
}, f = [g], T = [S], C = function(O, M) {
|
|
24186
24186
|
return {
|
|
24187
|
-
contains: [
|
|
24187
|
+
contains: [b],
|
|
24188
24188
|
starts: {
|
|
24189
24189
|
relevance: 0,
|
|
24190
|
-
contains:
|
|
24190
|
+
contains: O,
|
|
24191
24191
|
starts: M
|
|
24192
24192
|
}
|
|
24193
24193
|
};
|
|
24194
|
-
}, N = function(
|
|
24194
|
+
}, N = function(O, M) {
|
|
24195
24195
|
return {
|
|
24196
|
-
begin: "\\\\" +
|
|
24196
|
+
begin: "\\\\" + O + "(?![a-zA-Z@:_])",
|
|
24197
24197
|
keywords: {
|
|
24198
24198
|
$pattern: /\\[a-zA-Z]+/,
|
|
24199
|
-
keyword: "\\" +
|
|
24199
|
+
keyword: "\\" + O
|
|
24200
24200
|
},
|
|
24201
24201
|
relevance: 0,
|
|
24202
|
-
contains: [
|
|
24202
|
+
contains: [b],
|
|
24203
24203
|
starts: M
|
|
24204
24204
|
};
|
|
24205
|
-
}, R = function(
|
|
24205
|
+
}, R = function(O, M) {
|
|
24206
24206
|
return t.inherit(
|
|
24207
24207
|
{
|
|
24208
|
-
begin: "\\\\begin(?=[ ]*(\\r?\\n[ ]*)?\\{" +
|
|
24208
|
+
begin: "\\\\begin(?=[ ]*(\\r?\\n[ ]*)?\\{" + O + "\\})",
|
|
24209
24209
|
keywords: {
|
|
24210
24210
|
$pattern: /\\[a-zA-Z]+/,
|
|
24211
24211
|
keyword: "\\begin"
|
|
@@ -24214,26 +24214,26 @@ function xg() {
|
|
|
24214
24214
|
},
|
|
24215
24215
|
C(f, M)
|
|
24216
24216
|
);
|
|
24217
|
-
}, y = (
|
|
24218
|
-
className:
|
|
24217
|
+
}, y = (O = "string") => t.END_SAME_AS_BEGIN({
|
|
24218
|
+
className: O,
|
|
24219
24219
|
begin: /(.|\r?\n)/,
|
|
24220
24220
|
end: /(.|\r?\n)/,
|
|
24221
24221
|
excludeBegin: !0,
|
|
24222
24222
|
excludeEnd: !0,
|
|
24223
24223
|
endsParent: !0
|
|
24224
|
-
}), v = function(
|
|
24224
|
+
}), v = function(O) {
|
|
24225
24225
|
return {
|
|
24226
24226
|
className: "string",
|
|
24227
|
-
end: "(?=\\\\end\\{" +
|
|
24227
|
+
end: "(?=\\\\end\\{" + O + "\\})"
|
|
24228
24228
|
};
|
|
24229
|
-
},
|
|
24229
|
+
}, U = (O = "string") => ({
|
|
24230
24230
|
relevance: 0,
|
|
24231
24231
|
begin: /\{/,
|
|
24232
24232
|
starts: {
|
|
24233
24233
|
endsParent: !0,
|
|
24234
24234
|
contains: [
|
|
24235
24235
|
{
|
|
24236
|
-
className:
|
|
24236
|
+
className: O,
|
|
24237
24237
|
end: /(?=\})/,
|
|
24238
24238
|
endsParent: !0,
|
|
24239
24239
|
contains: [
|
|
@@ -24251,33 +24251,33 @@ function xg() {
|
|
|
24251
24251
|
...[
|
|
24252
24252
|
"verb",
|
|
24253
24253
|
"lstinline"
|
|
24254
|
-
].map((
|
|
24254
|
+
].map((O) => N(O, { contains: [y()] })),
|
|
24255
24255
|
N("mint", C(f, { contains: [y()] })),
|
|
24256
24256
|
N("mintinline", C(f, { contains: [
|
|
24257
|
-
|
|
24257
|
+
U(),
|
|
24258
24258
|
y()
|
|
24259
24259
|
] })),
|
|
24260
24260
|
N("url", { contains: [
|
|
24261
|
-
|
|
24262
|
-
|
|
24261
|
+
U("link"),
|
|
24262
|
+
U("link")
|
|
24263
24263
|
] }),
|
|
24264
|
-
N("hyperref", { contains: [
|
|
24265
|
-
N("href", C(
|
|
24264
|
+
N("hyperref", { contains: [U("link")] }),
|
|
24265
|
+
N("href", C(T, { contains: [U("link")] })),
|
|
24266
24266
|
...[].concat(...[
|
|
24267
24267
|
"",
|
|
24268
24268
|
"\\*"
|
|
24269
|
-
].map((
|
|
24270
|
-
R("verbatim" +
|
|
24271
|
-
R("filecontents" +
|
|
24269
|
+
].map((O) => [
|
|
24270
|
+
R("verbatim" + O, v("verbatim" + O)),
|
|
24271
|
+
R("filecontents" + O, C(f, v("filecontents" + O))),
|
|
24272
24272
|
...[
|
|
24273
24273
|
"",
|
|
24274
24274
|
"B",
|
|
24275
24275
|
"L"
|
|
24276
24276
|
].map(
|
|
24277
|
-
(M) => R(M + "Verbatim" +
|
|
24277
|
+
(M) => R(M + "Verbatim" + O, C(T, v(M + "Verbatim" + O)))
|
|
24278
24278
|
)
|
|
24279
24279
|
])),
|
|
24280
|
-
R("minted", C(
|
|
24280
|
+
R("minted", C(T, C(f, v("minted"))))
|
|
24281
24281
|
];
|
|
24282
24282
|
return {
|
|
24283
24283
|
name: "LaTeX",
|
|
@@ -25209,17 +25209,17 @@ function wg() {
|
|
|
25209
25209
|
"zoom"
|
|
25210
25210
|
].sort().reverse(), c = i.concat(s).sort().reverse();
|
|
25211
25211
|
function l(u) {
|
|
25212
|
-
const _ = e(u), m = c, p = "and or not only", d = "[\\w-]+", g = "(" + d + "|@\\{" + d + "\\})", S = [],
|
|
25212
|
+
const _ = e(u), m = c, p = "and or not only", d = "[\\w-]+", g = "(" + d + "|@\\{" + d + "\\})", S = [], b = [], f = function(P) {
|
|
25213
25213
|
return {
|
|
25214
25214
|
// Less strings are not multiline (also include '~' for more consistent coloring of "escaped" strings)
|
|
25215
25215
|
className: "string",
|
|
25216
25216
|
begin: "~?" + P + ".*?" + P
|
|
25217
25217
|
};
|
|
25218
|
-
},
|
|
25218
|
+
}, T = function(P, L, w) {
|
|
25219
25219
|
return {
|
|
25220
25220
|
className: P,
|
|
25221
|
-
begin:
|
|
25222
|
-
relevance:
|
|
25221
|
+
begin: L,
|
|
25222
|
+
relevance: w
|
|
25223
25223
|
};
|
|
25224
25224
|
}, C = {
|
|
25225
25225
|
$pattern: /[a-z-]+/,
|
|
@@ -25229,11 +25229,11 @@ function wg() {
|
|
|
25229
25229
|
// used only to properly balance nested parens inside mixin call, def. arg list
|
|
25230
25230
|
begin: "\\(",
|
|
25231
25231
|
end: "\\)",
|
|
25232
|
-
contains:
|
|
25232
|
+
contains: b,
|
|
25233
25233
|
keywords: C,
|
|
25234
25234
|
relevance: 0
|
|
25235
25235
|
};
|
|
25236
|
-
|
|
25236
|
+
b.push(
|
|
25237
25237
|
u.C_LINE_COMMENT_MODE,
|
|
25238
25238
|
u.C_BLOCK_COMMENT_MODE,
|
|
25239
25239
|
f("'"),
|
|
@@ -25250,9 +25250,9 @@ function wg() {
|
|
|
25250
25250
|
},
|
|
25251
25251
|
_.HEXCOLOR,
|
|
25252
25252
|
N,
|
|
25253
|
-
|
|
25254
|
-
|
|
25255
|
-
|
|
25253
|
+
T("variable", "@@?" + d, 10),
|
|
25254
|
+
T("variable", "@\\{" + d + "\\}"),
|
|
25255
|
+
T("built_in", "~?`[^`]*?`"),
|
|
25256
25256
|
// inline javascript (or whatever host language) *multiline* string
|
|
25257
25257
|
{
|
|
25258
25258
|
// @media features (it’s here to not duplicate things in AT_RULE_MODE with extra PARENS_MODE overriding):
|
|
@@ -25266,14 +25266,14 @@ function wg() {
|
|
|
25266
25266
|
{ beginKeywords: "and not" },
|
|
25267
25267
|
_.FUNCTION_DISPATCH
|
|
25268
25268
|
);
|
|
25269
|
-
const R =
|
|
25269
|
+
const R = b.concat({
|
|
25270
25270
|
begin: /\{/,
|
|
25271
25271
|
end: /\}/,
|
|
25272
25272
|
contains: S
|
|
25273
25273
|
}), y = {
|
|
25274
25274
|
beginKeywords: "when",
|
|
25275
25275
|
endsWithParent: !0,
|
|
25276
|
-
contains: [{ beginKeywords: "and not" }].concat(
|
|
25276
|
+
contains: [{ beginKeywords: "and not" }].concat(b)
|
|
25277
25277
|
// using this form to override VALUE’s 'function' match
|
|
25278
25278
|
}, v = {
|
|
25279
25279
|
begin: g + "\\s*:",
|
|
@@ -25291,18 +25291,18 @@ function wg() {
|
|
|
25291
25291
|
endsWithParent: !0,
|
|
25292
25292
|
illegal: "[<=$]",
|
|
25293
25293
|
relevance: 0,
|
|
25294
|
-
contains:
|
|
25294
|
+
contains: b
|
|
25295
25295
|
}
|
|
25296
25296
|
}
|
|
25297
25297
|
]
|
|
25298
|
-
},
|
|
25298
|
+
}, U = {
|
|
25299
25299
|
className: "keyword",
|
|
25300
25300
|
begin: "@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",
|
|
25301
25301
|
starts: {
|
|
25302
25302
|
end: "[;{}]",
|
|
25303
25303
|
keywords: C,
|
|
25304
25304
|
returnEnd: !0,
|
|
25305
|
-
contains:
|
|
25305
|
+
contains: b,
|
|
25306
25306
|
relevance: 0
|
|
25307
25307
|
}
|
|
25308
25308
|
}, A = {
|
|
@@ -25323,7 +25323,7 @@ function wg() {
|
|
|
25323
25323
|
returnEnd: !0,
|
|
25324
25324
|
contains: R
|
|
25325
25325
|
}
|
|
25326
|
-
},
|
|
25326
|
+
}, O = {
|
|
25327
25327
|
// first parse unambiguous selectors (i.e. those not starting with tag)
|
|
25328
25328
|
// then fall into the scary lookahead-discriminator variant.
|
|
25329
25329
|
// this mode also handles mixin definitions and calls
|
|
@@ -25346,18 +25346,18 @@ function wg() {
|
|
|
25346
25346
|
u.C_LINE_COMMENT_MODE,
|
|
25347
25347
|
u.C_BLOCK_COMMENT_MODE,
|
|
25348
25348
|
y,
|
|
25349
|
-
|
|
25350
|
-
|
|
25349
|
+
T("keyword", "all\\b"),
|
|
25350
|
+
T("variable", "@\\{" + d + "\\}"),
|
|
25351
25351
|
// otherwise it’s identified as tag
|
|
25352
25352
|
{
|
|
25353
25353
|
begin: "\\b(" + r.join("|") + ")\\b",
|
|
25354
25354
|
className: "selector-tag"
|
|
25355
25355
|
},
|
|
25356
25356
|
_.CSS_NUMBER_MODE,
|
|
25357
|
-
|
|
25358
|
-
|
|
25359
|
-
|
|
25360
|
-
|
|
25357
|
+
T("selector-tag", g, 0),
|
|
25358
|
+
T("selector-id", "#" + g),
|
|
25359
|
+
T("selector-class", "\\." + g, 0),
|
|
25360
|
+
T("selector-tag", "&", 0),
|
|
25361
25361
|
_.ATTRIBUTE_SELECTOR_MODE,
|
|
25362
25362
|
{
|
|
25363
25363
|
className: "selector-pseudo",
|
|
@@ -25381,16 +25381,16 @@ function wg() {
|
|
|
25381
25381
|
}, M = {
|
|
25382
25382
|
begin: d + `:(:)?(${m.join("|")})`,
|
|
25383
25383
|
returnBegin: !0,
|
|
25384
|
-
contains: [
|
|
25384
|
+
contains: [O]
|
|
25385
25385
|
};
|
|
25386
25386
|
return S.push(
|
|
25387
25387
|
u.C_LINE_COMMENT_MODE,
|
|
25388
25388
|
u.C_BLOCK_COMMENT_MODE,
|
|
25389
|
-
|
|
25389
|
+
U,
|
|
25390
25390
|
A,
|
|
25391
25391
|
M,
|
|
25392
25392
|
v,
|
|
25393
|
-
|
|
25393
|
+
O,
|
|
25394
25394
|
y,
|
|
25395
25395
|
_.FUNCTION_DISPATCH
|
|
25396
25396
|
), {
|
|
@@ -25475,7 +25475,7 @@ function Pg() {
|
|
|
25475
25475
|
] }, S = {
|
|
25476
25476
|
begin: "\\(\\s*",
|
|
25477
25477
|
end: "\\)"
|
|
25478
|
-
},
|
|
25478
|
+
}, b = {
|
|
25479
25479
|
endsWithParent: !0,
|
|
25480
25480
|
relevance: 0
|
|
25481
25481
|
};
|
|
@@ -25490,8 +25490,8 @@ function Pg() {
|
|
|
25490
25490
|
{ begin: r }
|
|
25491
25491
|
]
|
|
25492
25492
|
},
|
|
25493
|
-
|
|
25494
|
-
],
|
|
25493
|
+
b
|
|
25494
|
+
], b.contains = [
|
|
25495
25495
|
d,
|
|
25496
25496
|
g,
|
|
25497
25497
|
S,
|
|
@@ -25888,7 +25888,7 @@ function Fg() {
|
|
|
25888
25888
|
}
|
|
25889
25889
|
];
|
|
25890
25890
|
d.contains = S;
|
|
25891
|
-
const
|
|
25891
|
+
const b = {
|
|
25892
25892
|
className: "params",
|
|
25893
25893
|
begin: "\\(",
|
|
25894
25894
|
returnBegin: !0,
|
|
@@ -25902,7 +25902,7 @@ function Fg() {
|
|
|
25902
25902
|
contains: ["self"].concat(S)
|
|
25903
25903
|
}
|
|
25904
25904
|
]
|
|
25905
|
-
}, f = { begin: "(#=>|=>|\\|>>|-?->|!->)" },
|
|
25905
|
+
}, f = { begin: "(#=>|=>|\\|>>|-?->|!->)" }, T = {
|
|
25906
25906
|
variants: [
|
|
25907
25907
|
{ match: [
|
|
25908
25908
|
/class\s+/,
|
|
@@ -25935,7 +25935,7 @@ function Fg() {
|
|
|
25935
25935
|
className: "function",
|
|
25936
25936
|
contains: [
|
|
25937
25937
|
p,
|
|
25938
|
-
|
|
25938
|
+
b
|
|
25939
25939
|
],
|
|
25940
25940
|
returnBegin: !0,
|
|
25941
25941
|
variants: [
|
|
@@ -25953,7 +25953,7 @@ function Fg() {
|
|
|
25953
25953
|
}
|
|
25954
25954
|
]
|
|
25955
25955
|
},
|
|
25956
|
-
|
|
25956
|
+
T,
|
|
25957
25957
|
{
|
|
25958
25958
|
begin: m + ":",
|
|
25959
25959
|
end: ":",
|
|
@@ -33508,14 +33508,14 @@ function qg() {
|
|
|
33508
33508
|
relevance: 0,
|
|
33509
33509
|
begin: d
|
|
33510
33510
|
}
|
|
33511
|
-
] },
|
|
33511
|
+
] }, b = {
|
|
33512
33512
|
className: "named-character",
|
|
33513
33513
|
begin: /\\\[[$a-zA-Z][$a-zA-Z0-9]+\]/
|
|
33514
33514
|
}, f = {
|
|
33515
33515
|
className: "operator",
|
|
33516
33516
|
relevance: 0,
|
|
33517
33517
|
begin: /[+\-*/,;.:@~=><&|_`'^?!%]+/
|
|
33518
|
-
},
|
|
33518
|
+
}, T = {
|
|
33519
33519
|
className: "pattern",
|
|
33520
33520
|
relevance: 0,
|
|
33521
33521
|
begin: /([a-zA-Z$][a-zA-Z0-9$]*)?_+([a-zA-Z$][a-zA-Z0-9$]*)?/
|
|
@@ -33549,11 +33549,11 @@ function qg() {
|
|
|
33549
33549
|
},
|
|
33550
33550
|
contains: [
|
|
33551
33551
|
n.COMMENT(/\(\*/, /\*\)/, { contains: ["self"] }),
|
|
33552
|
-
|
|
33552
|
+
T,
|
|
33553
33553
|
C,
|
|
33554
33554
|
R,
|
|
33555
33555
|
S,
|
|
33556
|
-
|
|
33556
|
+
b,
|
|
33557
33557
|
n.QUOTE_STRING_MODE,
|
|
33558
33558
|
p,
|
|
33559
33559
|
f,
|
|
@@ -34194,20 +34194,20 @@ function Qg() {
|
|
|
34194
34194
|
// valid but infrequent and weird
|
|
34195
34195
|
/#/
|
|
34196
34196
|
// valid but infrequent and weird
|
|
34197
|
-
], p = (S,
|
|
34198
|
-
const
|
|
34197
|
+
], p = (S, b, f = "\\1") => {
|
|
34198
|
+
const T = f === "\\1" ? f : n.concat(f, b);
|
|
34199
34199
|
return n.concat(
|
|
34200
34200
|
n.concat("(?:", S, ")"),
|
|
34201
|
-
T,
|
|
34202
|
-
/(?:\\.|[^\\\/])*?/,
|
|
34203
34201
|
b,
|
|
34204
34202
|
/(?:\\.|[^\\\/])*?/,
|
|
34203
|
+
T,
|
|
34204
|
+
/(?:\\.|[^\\\/])*?/,
|
|
34205
34205
|
f,
|
|
34206
34206
|
a
|
|
34207
34207
|
);
|
|
34208
|
-
}, d = (S,
|
|
34208
|
+
}, d = (S, b, f) => n.concat(
|
|
34209
34209
|
n.concat("(?:", S, ")"),
|
|
34210
|
-
|
|
34210
|
+
b,
|
|
34211
34211
|
/(?:\\.|[^\\\/])*?/,
|
|
34212
34212
|
f,
|
|
34213
34213
|
a
|
|
@@ -35695,13 +35695,13 @@ function rS() {
|
|
|
35695
35695
|
begin: /\$\{/,
|
|
35696
35696
|
end: /\}/,
|
|
35697
35697
|
keywords: r
|
|
35698
|
-
},
|
|
35698
|
+
}, b = {
|
|
35699
35699
|
scope: "char.escape",
|
|
35700
35700
|
match: /'''/
|
|
35701
35701
|
}, f = {
|
|
35702
35702
|
scope: "char.escape",
|
|
35703
35703
|
match: /\\(?!\$)./
|
|
35704
|
-
},
|
|
35704
|
+
}, T = {
|
|
35705
35705
|
scope: "string",
|
|
35706
35706
|
variants: [
|
|
35707
35707
|
{
|
|
@@ -35710,7 +35710,7 @@ function rS() {
|
|
|
35710
35710
|
contains: [
|
|
35711
35711
|
g,
|
|
35712
35712
|
S,
|
|
35713
|
-
|
|
35713
|
+
b,
|
|
35714
35714
|
f
|
|
35715
35715
|
]
|
|
35716
35716
|
},
|
|
@@ -35740,7 +35740,7 @@ function rS() {
|
|
|
35740
35740
|
}
|
|
35741
35741
|
),
|
|
35742
35742
|
a,
|
|
35743
|
-
|
|
35743
|
+
T,
|
|
35744
35744
|
s,
|
|
35745
35745
|
c,
|
|
35746
35746
|
C,
|
|
@@ -36262,7 +36262,7 @@ function iS() {
|
|
|
36262
36262
|
"Win8",
|
|
36263
36263
|
"WinVista",
|
|
36264
36264
|
"zlib"
|
|
36265
|
-
],
|
|
36265
|
+
], b = {
|
|
36266
36266
|
match: [
|
|
36267
36267
|
/Function/,
|
|
36268
36268
|
/\s+/,
|
|
@@ -36272,7 +36272,7 @@ function iS() {
|
|
|
36272
36272
|
1: "keyword",
|
|
36273
36273
|
3: "title.function"
|
|
36274
36274
|
}
|
|
36275
|
-
},
|
|
36275
|
+
}, T = {
|
|
36276
36276
|
match: [
|
|
36277
36277
|
/Var/,
|
|
36278
36278
|
/\s+/,
|
|
@@ -36300,8 +36300,8 @@ function iS() {
|
|
|
36300
36300
|
"$",
|
|
36301
36301
|
{ relevance: 0 }
|
|
36302
36302
|
),
|
|
36303
|
-
b,
|
|
36304
36303
|
T,
|
|
36304
|
+
b,
|
|
36305
36305
|
{ beginKeywords: "Function PageEx Section SectionGroup FunctionEnd SectionEnd" },
|
|
36306
36306
|
d,
|
|
36307
36307
|
_,
|
|
@@ -37161,11 +37161,11 @@ function pS() {
|
|
|
37161
37161
|
begin: /<<<[ \t]*(?:(\w+)|"(\w+)")\n/,
|
|
37162
37162
|
end: /[ \t]*(\w+)\b/,
|
|
37163
37163
|
contains: t.QUOTE_STRING_MODE.contains.concat(l),
|
|
37164
|
-
"on:begin": (
|
|
37165
|
-
|
|
37164
|
+
"on:begin": (w, F) => {
|
|
37165
|
+
F.data._beginMatch = w[1] || w[2];
|
|
37166
37166
|
},
|
|
37167
|
-
"on:end": (
|
|
37168
|
-
|
|
37167
|
+
"on:end": (w, F) => {
|
|
37168
|
+
F.data._beginMatch !== w[1] && F.ignoreMatch();
|
|
37169
37169
|
}
|
|
37170
37170
|
}, p = t.END_SAME_AS_BEGIN({
|
|
37171
37171
|
begin: /<<<[ \t]*'(\w+)'\n/,
|
|
@@ -37192,7 +37192,7 @@ function pS() {
|
|
|
37192
37192
|
{ begin: "(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?" }
|
|
37193
37193
|
],
|
|
37194
37194
|
relevance: 0
|
|
37195
|
-
},
|
|
37195
|
+
}, b = [
|
|
37196
37196
|
"false",
|
|
37197
37197
|
"null",
|
|
37198
37198
|
"true"
|
|
@@ -37296,7 +37296,7 @@ function pS() {
|
|
|
37296
37296
|
"while",
|
|
37297
37297
|
"xor",
|
|
37298
37298
|
"yield"
|
|
37299
|
-
],
|
|
37299
|
+
], T = [
|
|
37300
37300
|
// Standard PHP library:
|
|
37301
37301
|
// <https://www.php.net/manual/en/book.spl.php>
|
|
37302
37302
|
"Error|0",
|
|
@@ -37393,20 +37393,20 @@ function pS() {
|
|
|
37393
37393
|
"stdClass"
|
|
37394
37394
|
], N = {
|
|
37395
37395
|
keyword: f,
|
|
37396
|
-
literal: ((
|
|
37397
|
-
const
|
|
37398
|
-
return
|
|
37399
|
-
|
|
37400
|
-
}),
|
|
37401
|
-
})(
|
|
37402
|
-
built_in:
|
|
37403
|
-
}, R = (
|
|
37396
|
+
literal: ((w) => {
|
|
37397
|
+
const F = [];
|
|
37398
|
+
return w.forEach((z) => {
|
|
37399
|
+
F.push(z), z.toLowerCase() === z ? F.push(z.toUpperCase()) : F.push(z.toLowerCase());
|
|
37400
|
+
}), F;
|
|
37401
|
+
})(b),
|
|
37402
|
+
built_in: T
|
|
37403
|
+
}, R = (w) => w.map((F) => F.replace(/\|\d+$/, "")), y = { variants: [
|
|
37404
37404
|
{
|
|
37405
37405
|
match: [
|
|
37406
37406
|
/new/,
|
|
37407
37407
|
n.concat(d, "+"),
|
|
37408
37408
|
// to prevent built ins from being confused as the class constructor call
|
|
37409
|
-
n.concat("(?!", R(
|
|
37409
|
+
n.concat("(?!", R(T).join("\\b|"), "\\b)"),
|
|
37410
37410
|
i
|
|
37411
37411
|
],
|
|
37412
37412
|
scope: {
|
|
@@ -37414,7 +37414,7 @@ function pS() {
|
|
|
37414
37414
|
4: "title.class"
|
|
37415
37415
|
}
|
|
37416
37416
|
}
|
|
37417
|
-
] }, v = n.concat(a, "\\b(?!\\()"),
|
|
37417
|
+
] }, v = n.concat(a, "\\b(?!\\()"), U = { variants: [
|
|
37418
37418
|
{
|
|
37419
37419
|
match: [
|
|
37420
37420
|
n.concat(
|
|
@@ -37470,7 +37470,7 @@ function pS() {
|
|
|
37470
37470
|
] }, A = {
|
|
37471
37471
|
scope: "attr",
|
|
37472
37472
|
match: n.concat(a, n.lookahead(":"), n.lookahead(/(?!::)/))
|
|
37473
|
-
},
|
|
37473
|
+
}, O = {
|
|
37474
37474
|
relevance: 0,
|
|
37475
37475
|
begin: /\(/,
|
|
37476
37476
|
end: /\)/,
|
|
@@ -37478,7 +37478,7 @@ function pS() {
|
|
|
37478
37478
|
contains: [
|
|
37479
37479
|
A,
|
|
37480
37480
|
o,
|
|
37481
|
-
|
|
37481
|
+
U,
|
|
37482
37482
|
t.C_BLOCK_COMMENT_MODE,
|
|
37483
37483
|
g,
|
|
37484
37484
|
S,
|
|
@@ -37489,23 +37489,23 @@ function pS() {
|
|
|
37489
37489
|
match: [
|
|
37490
37490
|
/\b/,
|
|
37491
37491
|
// to prevent keywords from being confused as the function title
|
|
37492
|
-
n.concat("(?!fn\\b|function\\b|", R(f).join("\\b|"), "|", R(
|
|
37492
|
+
n.concat("(?!fn\\b|function\\b|", R(f).join("\\b|"), "|", R(T).join("\\b|"), "\\b)"),
|
|
37493
37493
|
a,
|
|
37494
37494
|
n.concat(d, "*"),
|
|
37495
37495
|
n.lookahead(/(?=\()/)
|
|
37496
37496
|
],
|
|
37497
37497
|
scope: { 3: "title.function.invoke" },
|
|
37498
|
-
contains: [
|
|
37498
|
+
contains: [O]
|
|
37499
37499
|
};
|
|
37500
|
-
|
|
37500
|
+
O.contains.push(M);
|
|
37501
37501
|
const P = [
|
|
37502
37502
|
A,
|
|
37503
|
-
|
|
37503
|
+
U,
|
|
37504
37504
|
t.C_BLOCK_COMMENT_MODE,
|
|
37505
37505
|
g,
|
|
37506
37506
|
S,
|
|
37507
37507
|
y
|
|
37508
|
-
],
|
|
37508
|
+
], L = {
|
|
37509
37509
|
begin: n.concat(
|
|
37510
37510
|
/#\[\s*\\?/,
|
|
37511
37511
|
n.either(
|
|
@@ -37517,7 +37517,7 @@ function pS() {
|
|
|
37517
37517
|
end: /]/,
|
|
37518
37518
|
endScope: "meta",
|
|
37519
37519
|
keywords: {
|
|
37520
|
-
literal:
|
|
37520
|
+
literal: b,
|
|
37521
37521
|
keyword: [
|
|
37522
37522
|
"new",
|
|
37523
37523
|
"array"
|
|
@@ -37528,7 +37528,7 @@ function pS() {
|
|
|
37528
37528
|
begin: /\[/,
|
|
37529
37529
|
end: /]/,
|
|
37530
37530
|
keywords: {
|
|
37531
|
-
literal:
|
|
37531
|
+
literal: b,
|
|
37532
37532
|
keyword: [
|
|
37533
37533
|
"new",
|
|
37534
37534
|
"array"
|
|
@@ -37553,7 +37553,7 @@ function pS() {
|
|
|
37553
37553
|
case_insensitive: !1,
|
|
37554
37554
|
keywords: N,
|
|
37555
37555
|
contains: [
|
|
37556
|
-
|
|
37556
|
+
L,
|
|
37557
37557
|
t.HASH_COMMENT_MODE,
|
|
37558
37558
|
t.COMMENT("//", "$"),
|
|
37559
37559
|
t.COMMENT(
|
|
@@ -37588,7 +37588,7 @@ function pS() {
|
|
|
37588
37588
|
},
|
|
37589
37589
|
o,
|
|
37590
37590
|
M,
|
|
37591
|
-
|
|
37591
|
+
U,
|
|
37592
37592
|
{
|
|
37593
37593
|
match: [
|
|
37594
37594
|
/const/,
|
|
@@ -37625,9 +37625,9 @@ function pS() {
|
|
|
37625
37625
|
keywords: N,
|
|
37626
37626
|
contains: [
|
|
37627
37627
|
"self",
|
|
37628
|
-
|
|
37628
|
+
L,
|
|
37629
37629
|
o,
|
|
37630
|
-
|
|
37630
|
+
U,
|
|
37631
37631
|
t.C_BLOCK_COMMENT_MODE,
|
|
37632
37632
|
g,
|
|
37633
37633
|
S
|
|
@@ -37943,7 +37943,7 @@ function SS() {
|
|
|
37943
37943
|
}
|
|
37944
37944
|
// CMDLETS
|
|
37945
37945
|
]
|
|
37946
|
-
},
|
|
37946
|
+
}, b = {
|
|
37947
37947
|
begin: /using\s/,
|
|
37948
37948
|
end: /$/,
|
|
37949
37949
|
returnBegin: !0,
|
|
@@ -37966,7 +37966,7 @@ function SS() {
|
|
|
37966
37966
|
begin: /(-){1,2}[\w\d-]+/,
|
|
37967
37967
|
relevance: 0
|
|
37968
37968
|
}
|
|
37969
|
-
] },
|
|
37969
|
+
] }, T = {
|
|
37970
37970
|
className: "selector-tag",
|
|
37971
37971
|
begin: /@\B/,
|
|
37972
37972
|
relevance: 0
|
|
@@ -38003,7 +38003,7 @@ function SS() {
|
|
|
38003
38003
|
d,
|
|
38004
38004
|
c,
|
|
38005
38005
|
l,
|
|
38006
|
-
|
|
38006
|
+
T
|
|
38007
38007
|
], R = {
|
|
38008
38008
|
begin: /\[/,
|
|
38009
38009
|
end: /\]/,
|
|
@@ -38037,7 +38037,7 @@ function SS() {
|
|
|
38037
38037
|
contains: N.concat(
|
|
38038
38038
|
g,
|
|
38039
38039
|
S,
|
|
38040
|
-
|
|
38040
|
+
b,
|
|
38041
38041
|
f,
|
|
38042
38042
|
R
|
|
38043
38043
|
)
|
|
@@ -39151,7 +39151,7 @@ function hS() {
|
|
|
39151
39151
|
begin: `\\b(${p})[jJ](?=${g})`
|
|
39152
39152
|
}
|
|
39153
39153
|
]
|
|
39154
|
-
},
|
|
39154
|
+
}, b = {
|
|
39155
39155
|
className: "comment",
|
|
39156
39156
|
begin: n.lookahead(/# type:/),
|
|
39157
39157
|
end: /$/,
|
|
@@ -39223,7 +39223,7 @@ function hS() {
|
|
|
39223
39223
|
},
|
|
39224
39224
|
{ match: /\bor\b/, scope: "keyword" },
|
|
39225
39225
|
m,
|
|
39226
|
-
|
|
39226
|
+
b,
|
|
39227
39227
|
t.HASH_COMMENT_MODE,
|
|
39228
39228
|
{
|
|
39229
39229
|
match: [
|
|
@@ -45822,7 +45822,7 @@ function $S() {
|
|
|
45822
45822
|
].filter((R) => !_.includes(R)), S = {
|
|
45823
45823
|
scope: "variable",
|
|
45824
45824
|
match: /@[a-z0-9][a-z0-9_]*/
|
|
45825
|
-
},
|
|
45825
|
+
}, b = {
|
|
45826
45826
|
scope: "operator",
|
|
45827
45827
|
match: /[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,
|
|
45828
45828
|
relevance: 0
|
|
@@ -45831,7 +45831,7 @@ function $S() {
|
|
|
45831
45831
|
relevance: 0,
|
|
45832
45832
|
keywords: { built_in: d }
|
|
45833
45833
|
};
|
|
45834
|
-
function
|
|
45834
|
+
function T(R) {
|
|
45835
45835
|
return n.concat(
|
|
45836
45836
|
/\b/,
|
|
45837
45837
|
n.either(...R.map((y) => y.replace(/\s+/, "\\s+"))),
|
|
@@ -45840,15 +45840,15 @@ function $S() {
|
|
|
45840
45840
|
}
|
|
45841
45841
|
const C = {
|
|
45842
45842
|
scope: "keyword",
|
|
45843
|
-
match:
|
|
45843
|
+
match: T(p),
|
|
45844
45844
|
relevance: 0
|
|
45845
45845
|
};
|
|
45846
45846
|
function N(R, {
|
|
45847
45847
|
exceptions: y,
|
|
45848
45848
|
when: v
|
|
45849
45849
|
} = {}) {
|
|
45850
|
-
const
|
|
45851
|
-
return y = y || [], R.map((A) => A.match(/\|\d+$/) || y.includes(A) ? A :
|
|
45850
|
+
const U = v;
|
|
45851
|
+
return y = y || [], R.map((A) => A.match(/\|\d+$/) || y.includes(A) ? A : U(A) ? `${A}|0` : A);
|
|
45852
45852
|
}
|
|
45853
45853
|
return {
|
|
45854
45854
|
name: "SQL",
|
|
@@ -45865,7 +45865,7 @@ function $S() {
|
|
|
45865
45865
|
contains: [
|
|
45866
45866
|
{
|
|
45867
45867
|
scope: "type",
|
|
45868
|
-
match:
|
|
45868
|
+
match: T(o)
|
|
45869
45869
|
},
|
|
45870
45870
|
C,
|
|
45871
45871
|
f,
|
|
@@ -45875,7 +45875,7 @@ function $S() {
|
|
|
45875
45875
|
t.C_NUMBER_MODE,
|
|
45876
45876
|
t.C_BLOCK_COMMENT_MODE,
|
|
45877
45877
|
r,
|
|
45878
|
-
|
|
45878
|
+
b
|
|
45879
45879
|
]
|
|
45880
45880
|
};
|
|
45881
45881
|
}
|
|
@@ -47489,11 +47489,11 @@ function jS() {
|
|
|
47489
47489
|
return v.map((A) => e(A)).join("");
|
|
47490
47490
|
}
|
|
47491
47491
|
function r(v) {
|
|
47492
|
-
const
|
|
47493
|
-
return typeof
|
|
47492
|
+
const U = v[v.length - 1];
|
|
47493
|
+
return typeof U == "object" && U.constructor === Object ? (v.splice(v.length - 1, 1), U) : {};
|
|
47494
47494
|
}
|
|
47495
47495
|
function a(...v) {
|
|
47496
|
-
return "(" + (r(v).capture ? "" : "?:") + v.map((
|
|
47496
|
+
return "(" + (r(v).capture ? "" : "?:") + v.map((O) => e(O)).join("|") + ")";
|
|
47497
47497
|
}
|
|
47498
47498
|
const i = (v) => n(
|
|
47499
47499
|
/\b/,
|
|
@@ -47741,7 +47741,7 @@ function jS() {
|
|
|
47741
47741
|
/[\uFE20-\uFE2F]/
|
|
47742
47742
|
// TODO: The following characters are also allowed, but the regex isn't supported yet.
|
|
47743
47743
|
// /[\u{E0100}-\u{E01EF}]/u
|
|
47744
|
-
), S = n(d, g, "*"),
|
|
47744
|
+
), S = n(d, g, "*"), b = a(
|
|
47745
47745
|
/[a-zA-Z_]/,
|
|
47746
47746
|
/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,
|
|
47747
47747
|
/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,
|
|
@@ -47760,10 +47760,10 @@ function jS() {
|
|
|
47760
47760
|
// /[\u{90000}-\u{9FFFD}\u{A0000-\u{AFFFD}\u{B0000}-\u{BFFFD}\u{C0000}-\u{CFFFD}]/u,
|
|
47761
47761
|
// /[\u{D0000}-\u{DFFFD}\u{E0000-\u{EFFFD}]/u
|
|
47762
47762
|
), f = a(
|
|
47763
|
-
|
|
47763
|
+
b,
|
|
47764
47764
|
/\d/,
|
|
47765
47765
|
/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/
|
|
47766
|
-
),
|
|
47766
|
+
), T = n(b, f, "*"), C = n(/[A-Z]/, f, "*"), N = [
|
|
47767
47767
|
"attached",
|
|
47768
47768
|
"autoclosure",
|
|
47769
47769
|
n(/convention\(/, a("swift", "block", "c"), /\)/),
|
|
@@ -47785,7 +47785,7 @@ function jS() {
|
|
|
47785
47785
|
"NSApplicationMain",
|
|
47786
47786
|
"NSCopying",
|
|
47787
47787
|
"NSManaged",
|
|
47788
|
-
n(/objc\(/,
|
|
47788
|
+
n(/objc\(/, T, /\)/),
|
|
47789
47789
|
"objc",
|
|
47790
47790
|
"objcMembers",
|
|
47791
47791
|
"propertyWrapper",
|
|
@@ -47812,14 +47812,14 @@ function jS() {
|
|
|
47812
47812
|
"swift"
|
|
47813
47813
|
];
|
|
47814
47814
|
function y(v) {
|
|
47815
|
-
const
|
|
47815
|
+
const U = {
|
|
47816
47816
|
match: /\s+/,
|
|
47817
47817
|
relevance: 0
|
|
47818
47818
|
}, A = v.COMMENT(
|
|
47819
47819
|
"/\\*",
|
|
47820
47820
|
"\\*/",
|
|
47821
47821
|
{ contains: ["self"] }
|
|
47822
|
-
),
|
|
47822
|
+
), O = [
|
|
47823
47823
|
v.C_LINE_COMMENT_MODE,
|
|
47824
47824
|
A
|
|
47825
47825
|
], M = {
|
|
@@ -47832,10 +47832,10 @@ function jS() {
|
|
|
47832
47832
|
// Consume .keyword to prevent highlighting properties and methods as keywords.
|
|
47833
47833
|
match: n(/\./, a(...l)),
|
|
47834
47834
|
relevance: 0
|
|
47835
|
-
},
|
|
47835
|
+
}, L = l.filter((Z) => typeof Z == "string").concat(["_|0"]), w = l.filter((Z) => typeof Z != "string").concat(c).map(i), F = { variants: [
|
|
47836
47836
|
{
|
|
47837
47837
|
className: "keyword",
|
|
47838
|
-
match: a(...
|
|
47838
|
+
match: a(...w, ...o)
|
|
47839
47839
|
}
|
|
47840
47840
|
] }, z = {
|
|
47841
47841
|
$pattern: a(
|
|
@@ -47844,12 +47844,12 @@ function jS() {
|
|
|
47844
47844
|
/#\w+/
|
|
47845
47845
|
// number keywords
|
|
47846
47846
|
),
|
|
47847
|
-
keyword:
|
|
47847
|
+
keyword: L.concat(m),
|
|
47848
47848
|
literal: u
|
|
47849
47849
|
}, K = [
|
|
47850
47850
|
M,
|
|
47851
47851
|
P,
|
|
47852
|
-
|
|
47852
|
+
F
|
|
47853
47853
|
], j = {
|
|
47854
47854
|
// Consume .built_in to prevent highlighting properties and methods.
|
|
47855
47855
|
match: n(/\./, a(...p)),
|
|
@@ -47967,7 +47967,7 @@ function jS() {
|
|
|
47967
47967
|
nt("#"),
|
|
47968
47968
|
Vt
|
|
47969
47969
|
]
|
|
47970
|
-
}, St = { match: n(/`/,
|
|
47970
|
+
}, St = { match: n(/`/, T, /`/) }, zt = {
|
|
47971
47971
|
className: "variable",
|
|
47972
47972
|
match: /\$\d+/
|
|
47973
47973
|
}, ft = {
|
|
@@ -47997,7 +47997,7 @@ function jS() {
|
|
|
47997
47997
|
match: n(/@/, a(...N), t(a(/\(/, /\s+/)))
|
|
47998
47998
|
}, Pe = {
|
|
47999
47999
|
scope: "meta",
|
|
48000
|
-
match: n(/@/,
|
|
48000
|
+
match: n(/@/, T)
|
|
48001
48001
|
}, We = [
|
|
48002
48002
|
Wt,
|
|
48003
48003
|
bt,
|
|
@@ -48038,7 +48038,7 @@ function jS() {
|
|
|
48038
48038
|
end: />/,
|
|
48039
48039
|
keywords: z,
|
|
48040
48040
|
contains: [
|
|
48041
|
-
...
|
|
48041
|
+
...O,
|
|
48042
48042
|
...K,
|
|
48043
48043
|
...We,
|
|
48044
48044
|
Oe,
|
|
@@ -48047,7 +48047,7 @@ function jS() {
|
|
|
48047
48047
|
};
|
|
48048
48048
|
Ne.contains.push(Ze);
|
|
48049
48049
|
const Tt = {
|
|
48050
|
-
match: n(
|
|
48050
|
+
match: n(T, /\s*:/),
|
|
48051
48051
|
keywords: "_|0",
|
|
48052
48052
|
relevance: 0
|
|
48053
48053
|
}, Rt = {
|
|
@@ -48058,7 +48058,7 @@ function jS() {
|
|
|
48058
48058
|
contains: [
|
|
48059
48059
|
"self",
|
|
48060
48060
|
Tt,
|
|
48061
|
-
...
|
|
48061
|
+
...O,
|
|
48062
48062
|
gt,
|
|
48063
48063
|
...K,
|
|
48064
48064
|
...Se,
|
|
@@ -48074,13 +48074,13 @@ function jS() {
|
|
|
48074
48074
|
end: />/,
|
|
48075
48075
|
keywords: "repeat each",
|
|
48076
48076
|
contains: [
|
|
48077
|
-
...
|
|
48077
|
+
...O,
|
|
48078
48078
|
Ne
|
|
48079
48079
|
]
|
|
48080
48080
|
}, $t = {
|
|
48081
48081
|
begin: a(
|
|
48082
|
-
t(n(
|
|
48083
|
-
t(n(
|
|
48082
|
+
t(n(T, /\s*:/)),
|
|
48083
|
+
t(n(T, /\s+/, T, /\s*:/))
|
|
48084
48084
|
),
|
|
48085
48085
|
end: /:/,
|
|
48086
48086
|
relevance: 0,
|
|
@@ -48091,7 +48091,7 @@ function jS() {
|
|
|
48091
48091
|
},
|
|
48092
48092
|
{
|
|
48093
48093
|
className: "params",
|
|
48094
|
-
match:
|
|
48094
|
+
match: T
|
|
48095
48095
|
}
|
|
48096
48096
|
]
|
|
48097
48097
|
}, Ct = {
|
|
@@ -48100,7 +48100,7 @@ function jS() {
|
|
|
48100
48100
|
keywords: z,
|
|
48101
48101
|
contains: [
|
|
48102
48102
|
$t,
|
|
48103
|
-
...
|
|
48103
|
+
...O,
|
|
48104
48104
|
...K,
|
|
48105
48105
|
...Te,
|
|
48106
48106
|
ee,
|
|
@@ -48115,7 +48115,7 @@ function jS() {
|
|
|
48115
48115
|
match: [
|
|
48116
48116
|
/(func|macro)/,
|
|
48117
48117
|
/\s+/,
|
|
48118
|
-
a(St.match,
|
|
48118
|
+
a(St.match, T, S)
|
|
48119
48119
|
],
|
|
48120
48120
|
className: {
|
|
48121
48121
|
1: "keyword",
|
|
@@ -48124,7 +48124,7 @@ function jS() {
|
|
|
48124
48124
|
contains: [
|
|
48125
48125
|
at,
|
|
48126
48126
|
Ct,
|
|
48127
|
-
|
|
48127
|
+
U
|
|
48128
48128
|
],
|
|
48129
48129
|
illegal: [
|
|
48130
48130
|
/\[/,
|
|
@@ -48139,7 +48139,7 @@ function jS() {
|
|
|
48139
48139
|
contains: [
|
|
48140
48140
|
at,
|
|
48141
48141
|
Ct,
|
|
48142
|
-
|
|
48142
|
+
U
|
|
48143
48143
|
],
|
|
48144
48144
|
illegal: /\[|%/
|
|
48145
48145
|
}, Qt = {
|
|
@@ -48195,7 +48195,7 @@ function jS() {
|
|
|
48195
48195
|
begin: [
|
|
48196
48196
|
/(struct|protocol|class|extension|enum|actor)/,
|
|
48197
48197
|
/\s+/,
|
|
48198
|
-
|
|
48198
|
+
T,
|
|
48199
48199
|
/\s*/
|
|
48200
48200
|
],
|
|
48201
48201
|
beginScope: {
|
|
@@ -48248,7 +48248,7 @@ function jS() {
|
|
|
48248
48248
|
name: "Swift",
|
|
48249
48249
|
keywords: z,
|
|
48250
48250
|
contains: [
|
|
48251
|
-
...
|
|
48251
|
+
...O,
|
|
48252
48252
|
Kt,
|
|
48253
48253
|
Nt,
|
|
48254
48254
|
Zt,
|
|
@@ -48259,7 +48259,7 @@ function jS() {
|
|
|
48259
48259
|
{
|
|
48260
48260
|
beginKeywords: "import",
|
|
48261
48261
|
end: /$/,
|
|
48262
|
-
contains: [...
|
|
48262
|
+
contains: [...O],
|
|
48263
48263
|
relevance: 0
|
|
48264
48264
|
},
|
|
48265
48265
|
gt,
|
|
@@ -48419,7 +48419,7 @@ function tf() {
|
|
|
48419
48419
|
contains: [d],
|
|
48420
48420
|
illegal: "\\n",
|
|
48421
48421
|
relevance: 0
|
|
48422
|
-
},
|
|
48422
|
+
}, b = [
|
|
48423
48423
|
a,
|
|
48424
48424
|
{
|
|
48425
48425
|
className: "meta",
|
|
@@ -48499,12 +48499,12 @@ function tf() {
|
|
|
48499
48499
|
S,
|
|
48500
48500
|
s,
|
|
48501
48501
|
o
|
|
48502
|
-
], f = [...
|
|
48502
|
+
], f = [...b];
|
|
48503
48503
|
return f.pop(), f.push(c), d.contains = f, {
|
|
48504
48504
|
name: "YAML",
|
|
48505
48505
|
case_insensitive: !0,
|
|
48506
48506
|
aliases: ["yml"],
|
|
48507
|
-
contains:
|
|
48507
|
+
contains: b
|
|
48508
48508
|
};
|
|
48509
48509
|
}
|
|
48510
48510
|
return Vi = e, Vi;
|
|
@@ -49389,18 +49389,18 @@ function cf() {
|
|
|
49389
49389
|
return;
|
|
49390
49390
|
}
|
|
49391
49391
|
}
|
|
49392
|
-
},
|
|
49392
|
+
}, b = {
|
|
49393
49393
|
$pattern: e,
|
|
49394
49394
|
keyword: t,
|
|
49395
49395
|
literal: n,
|
|
49396
49396
|
built_in: o,
|
|
49397
49397
|
"variable.language": s
|
|
49398
|
-
}, f = "[0-9](_?[0-9])*",
|
|
49398
|
+
}, f = "[0-9](_?[0-9])*", T = `\\.(${f})`, C = "0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*", N = {
|
|
49399
49399
|
className: "number",
|
|
49400
49400
|
variants: [
|
|
49401
49401
|
// DecimalLiteral
|
|
49402
|
-
{ begin: `(\\b(${C})((${
|
|
49403
|
-
{ begin: `\\b(${C})\\b((${
|
|
49402
|
+
{ begin: `(\\b(${C})((${T})|\\.)?|(${T}))[eE][+-]?(${f})\\b` },
|
|
49403
|
+
{ begin: `\\b(${C})\\b((${T})\\b|\\.)?|(${T})\\b` },
|
|
49404
49404
|
// DecimalBigIntegerLiteral
|
|
49405
49405
|
{ begin: "\\b(0|[1-9](_?[0-9])*)n\\b" },
|
|
49406
49406
|
// NonDecimalIntegerLiteral
|
|
@@ -49416,7 +49416,7 @@ function cf() {
|
|
|
49416
49416
|
className: "subst",
|
|
49417
49417
|
begin: "\\$\\{",
|
|
49418
49418
|
end: "\\}",
|
|
49419
|
-
keywords:
|
|
49419
|
+
keywords: b,
|
|
49420
49420
|
contains: []
|
|
49421
49421
|
// defined later
|
|
49422
49422
|
}, y = {
|
|
@@ -49443,7 +49443,7 @@ function cf() {
|
|
|
49443
49443
|
],
|
|
49444
49444
|
subLanguage: "css"
|
|
49445
49445
|
}
|
|
49446
|
-
},
|
|
49446
|
+
}, U = {
|
|
49447
49447
|
begin: ".?gql`",
|
|
49448
49448
|
end: "",
|
|
49449
49449
|
starts: {
|
|
@@ -49513,7 +49513,7 @@ function cf() {
|
|
|
49513
49513
|
u.QUOTE_STRING_MODE,
|
|
49514
49514
|
y,
|
|
49515
49515
|
v,
|
|
49516
|
-
|
|
49516
|
+
U,
|
|
49517
49517
|
A,
|
|
49518
49518
|
// Skip numbers when they are part of a variable name
|
|
49519
49519
|
{ match: /\$\d+/ },
|
|
@@ -49527,20 +49527,20 @@ function cf() {
|
|
|
49527
49527
|
// it from ending too early by matching another }
|
|
49528
49528
|
begin: /\{/,
|
|
49529
49529
|
end: /\}/,
|
|
49530
|
-
keywords:
|
|
49530
|
+
keywords: b,
|
|
49531
49531
|
contains: [
|
|
49532
49532
|
"self"
|
|
49533
49533
|
].concat(P)
|
|
49534
49534
|
});
|
|
49535
|
-
const
|
|
49535
|
+
const L = [].concat(M, R.contains), w = L.concat([
|
|
49536
49536
|
// eat recursive parens in sub expressions
|
|
49537
49537
|
{
|
|
49538
49538
|
begin: /(\s*)\(/,
|
|
49539
49539
|
end: /\)/,
|
|
49540
|
-
keywords:
|
|
49541
|
-
contains: ["self"].concat(
|
|
49540
|
+
keywords: b,
|
|
49541
|
+
contains: ["self"].concat(L)
|
|
49542
49542
|
}
|
|
49543
|
-
]),
|
|
49543
|
+
]), F = {
|
|
49544
49544
|
className: "params",
|
|
49545
49545
|
// convert this to negative lookbehind in v12
|
|
49546
49546
|
begin: /(\s*)\(/,
|
|
@@ -49548,8 +49548,8 @@ function cf() {
|
|
|
49548
49548
|
end: /\)/,
|
|
49549
49549
|
excludeBegin: !0,
|
|
49550
49550
|
excludeEnd: !0,
|
|
49551
|
-
keywords:
|
|
49552
|
-
contains:
|
|
49551
|
+
keywords: b,
|
|
49552
|
+
contains: w
|
|
49553
49553
|
}, z = {
|
|
49554
49554
|
variants: [
|
|
49555
49555
|
// class Car extends vehicle
|
|
@@ -49635,7 +49635,7 @@ function cf() {
|
|
|
49635
49635
|
3: "title.function"
|
|
49636
49636
|
},
|
|
49637
49637
|
label: "func.def",
|
|
49638
|
-
contains: [
|
|
49638
|
+
contains: [F],
|
|
49639
49639
|
illegal: /%/
|
|
49640
49640
|
}, Se = {
|
|
49641
49641
|
relevance: 0,
|
|
@@ -49683,7 +49683,7 @@ function cf() {
|
|
|
49683
49683
|
// eat to avoid empty params
|
|
49684
49684
|
begin: /\(\)/
|
|
49685
49685
|
},
|
|
49686
|
-
|
|
49686
|
+
F
|
|
49687
49687
|
]
|
|
49688
49688
|
}, pe = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + u.UNDERSCORE_IDENT_RE + ")\\s*=>", ee = {
|
|
49689
49689
|
match: [
|
|
@@ -49702,15 +49702,15 @@ function cf() {
|
|
|
49702
49702
|
3: "title.function"
|
|
49703
49703
|
},
|
|
49704
49704
|
contains: [
|
|
49705
|
-
|
|
49705
|
+
F
|
|
49706
49706
|
]
|
|
49707
49707
|
};
|
|
49708
49708
|
return {
|
|
49709
49709
|
name: "JavaScript",
|
|
49710
49710
|
aliases: ["js", "jsx", "mjs", "cjs"],
|
|
49711
|
-
keywords:
|
|
49711
|
+
keywords: b,
|
|
49712
49712
|
// this will be extended by TypeScript
|
|
49713
|
-
exports: { PARAMS_CONTAINS:
|
|
49713
|
+
exports: { PARAMS_CONTAINS: w, CLASS_REFERENCE: K },
|
|
49714
49714
|
illegal: /#(?![$_A-z])/,
|
|
49715
49715
|
contains: [
|
|
49716
49716
|
u.SHEBANG({
|
|
@@ -49723,7 +49723,7 @@ function cf() {
|
|
|
49723
49723
|
u.QUOTE_STRING_MODE,
|
|
49724
49724
|
y,
|
|
49725
49725
|
v,
|
|
49726
|
-
|
|
49726
|
+
U,
|
|
49727
49727
|
A,
|
|
49728
49728
|
M,
|
|
49729
49729
|
// Skip numbers when they are part of a variable name
|
|
@@ -49770,8 +49770,8 @@ function cf() {
|
|
|
49770
49770
|
end: /\)/,
|
|
49771
49771
|
excludeBegin: !0,
|
|
49772
49772
|
excludeEnd: !0,
|
|
49773
|
-
keywords:
|
|
49774
|
-
contains:
|
|
49773
|
+
keywords: b,
|
|
49774
|
+
contains: w
|
|
49775
49775
|
}
|
|
49776
49776
|
]
|
|
49777
49777
|
}
|
|
@@ -49826,7 +49826,7 @@ function cf() {
|
|
|
49826
49826
|
returnBegin: !0,
|
|
49827
49827
|
label: "func.def",
|
|
49828
49828
|
contains: [
|
|
49829
|
-
|
|
49829
|
+
F,
|
|
49830
49830
|
u.inherit(u.TITLE_MODE, { begin: p, className: "title.function" })
|
|
49831
49831
|
]
|
|
49832
49832
|
},
|
|
@@ -49846,7 +49846,7 @@ function cf() {
|
|
|
49846
49846
|
{
|
|
49847
49847
|
match: [/\bconstructor(?=\s*\()/],
|
|
49848
49848
|
className: { 1: "title.function" },
|
|
49849
|
-
contains: [
|
|
49849
|
+
contains: [F]
|
|
49850
49850
|
},
|
|
49851
49851
|
Re,
|
|
49852
49852
|
Se,
|
|
@@ -49890,7 +49890,7 @@ function cf() {
|
|
|
49890
49890
|
built_in: d
|
|
49891
49891
|
},
|
|
49892
49892
|
contains: [m.exports.CLASS_REFERENCE]
|
|
49893
|
-
},
|
|
49893
|
+
}, b = {
|
|
49894
49894
|
className: "meta",
|
|
49895
49895
|
relevance: 10,
|
|
49896
49896
|
begin: /^\s*['"]use strict['"]/
|
|
@@ -49908,7 +49908,7 @@ function cf() {
|
|
|
49908
49908
|
"enum",
|
|
49909
49909
|
"override",
|
|
49910
49910
|
"satisfies"
|
|
49911
|
-
],
|
|
49911
|
+
], T = {
|
|
49912
49912
|
$pattern: e,
|
|
49913
49913
|
keyword: t.concat(f),
|
|
49914
49914
|
literal: n,
|
|
@@ -49917,14 +49917,14 @@ function cf() {
|
|
|
49917
49917
|
}, C = {
|
|
49918
49918
|
className: "meta",
|
|
49919
49919
|
begin: "@" + p
|
|
49920
|
-
}, N = (
|
|
49921
|
-
const M =
|
|
49920
|
+
}, N = (U, A, O) => {
|
|
49921
|
+
const M = U.contains.findIndex((P) => P.label === A);
|
|
49922
49922
|
if (M === -1)
|
|
49923
49923
|
throw new Error("can not find mode to replace");
|
|
49924
|
-
|
|
49924
|
+
U.contains.splice(M, 1, O);
|
|
49925
49925
|
};
|
|
49926
|
-
Object.assign(m.keywords,
|
|
49927
|
-
const R = m.contains.find((
|
|
49926
|
+
Object.assign(m.keywords, T), m.exports.PARAMS_CONTAINS.push(C);
|
|
49927
|
+
const R = m.contains.find((U) => U.scope === "attr"), y = Object.assign(
|
|
49928
49928
|
{},
|
|
49929
49929
|
R,
|
|
49930
49930
|
{ match: _.concat(p, _.lookahead(/\s*\?:/)) }
|
|
@@ -49942,8 +49942,8 @@ function cf() {
|
|
|
49942
49942
|
S,
|
|
49943
49943
|
y
|
|
49944
49944
|
// Added for optional property assignment highlighting
|
|
49945
|
-
]), N(m, "shebang", u.SHEBANG()), N(m, "use_strict",
|
|
49946
|
-
const v = m.contains.find((
|
|
49945
|
+
]), N(m, "shebang", u.SHEBANG()), N(m, "use_strict", b);
|
|
49946
|
+
const v = m.contains.find((U) => U.label === "func.def");
|
|
49947
49947
|
return v.relevance = 0, Object.assign(m, {
|
|
49948
49948
|
name: "TypeScript",
|
|
49949
49949
|
aliases: [
|
|
@@ -51416,7 +51416,7 @@ function Sf() {
|
|
|
51416
51416
|
match: /\b[A-Z]+[a-z]+([A-Z]+[a-z]+)*/,
|
|
51417
51417
|
scope: "title.class",
|
|
51418
51418
|
keywords: { _: o }
|
|
51419
|
-
},
|
|
51419
|
+
}, b = t.C_NUMBER_MODE, f = {
|
|
51420
51420
|
match: [
|
|
51421
51421
|
r,
|
|
51422
51422
|
/\s*/,
|
|
@@ -51431,7 +51431,7 @@ function Sf() {
|
|
|
51431
51431
|
3: "operator",
|
|
51432
51432
|
6: "params"
|
|
51433
51433
|
}
|
|
51434
|
-
},
|
|
51434
|
+
}, T = t.COMMENT(
|
|
51435
51435
|
/\/\*\*/,
|
|
51436
51436
|
/\*\//,
|
|
51437
51437
|
{ contains: [
|
|
@@ -51446,7 +51446,7 @@ function Sf() {
|
|
|
51446
51446
|
begin: /%\(/,
|
|
51447
51447
|
end: /\)/,
|
|
51448
51448
|
contains: [
|
|
51449
|
-
|
|
51449
|
+
b,
|
|
51450
51450
|
S,
|
|
51451
51451
|
l,
|
|
51452
51452
|
g,
|
|
@@ -51523,10 +51523,10 @@ function Sf() {
|
|
|
51523
51523
|
}
|
|
51524
51524
|
]
|
|
51525
51525
|
},
|
|
51526
|
-
|
|
51526
|
+
b,
|
|
51527
51527
|
N,
|
|
51528
51528
|
p,
|
|
51529
|
-
|
|
51529
|
+
T,
|
|
51530
51530
|
t.C_LINE_COMMENT_MODE,
|
|
51531
51531
|
t.C_BLOCK_COMMENT_MODE,
|
|
51532
51532
|
S,
|
|
@@ -52775,7 +52775,8 @@ const ZT = ["data-theme"], JT = ["id"], jT = /* @__PURE__ */ $_({
|
|
|
52775
52775
|
afterRender: {},
|
|
52776
52776
|
themeMode: { default: "light" },
|
|
52777
52777
|
incremental: { type: Boolean, default: !1 },
|
|
52778
|
-
incrementalDebounce: { default: 16 }
|
|
52778
|
+
incrementalDebounce: { default: 16 },
|
|
52779
|
+
performanceLog: { type: Boolean, default: !1 }
|
|
52779
52780
|
}, {
|
|
52780
52781
|
modelValue: {},
|
|
52781
52782
|
modelModifiers: {}
|
|
@@ -52783,17 +52784,17 @@ const ZT = ["data-theme"], JT = ["id"], jT = /* @__PURE__ */ $_({
|
|
|
52783
52784
|
emits: ["update:modelValue"],
|
|
52784
52785
|
setup(e, { expose: t }) {
|
|
52785
52786
|
const n = e, r = Mt(""), a = Mt(null), i = Mt(!1), s = Mt(""), o = Q_(e, "modelValue"), c = (A) => {
|
|
52786
|
-
const
|
|
52787
|
-
if (
|
|
52787
|
+
const O = A.match(/```/g);
|
|
52788
|
+
if (O && O.length % 2 !== 0)
|
|
52788
52789
|
return !0;
|
|
52789
52790
|
const P = A.replace(/```[\s\S]*?```/g, "").match(/`/g);
|
|
52790
52791
|
if (P && P.length % 2 !== 0)
|
|
52791
52792
|
return !0;
|
|
52792
|
-
const
|
|
52793
|
-
`),
|
|
52794
|
-
if (
|
|
52793
|
+
const L = A.split(`
|
|
52794
|
+
`), w = L[L.length - 1];
|
|
52795
|
+
if (w && w.trim().startsWith("|") && !w.trim().endsWith("|"))
|
|
52795
52796
|
return !0;
|
|
52796
|
-
const
|
|
52797
|
+
const F = [
|
|
52797
52798
|
"div",
|
|
52798
52799
|
"table",
|
|
52799
52800
|
"thead",
|
|
@@ -52806,74 +52807,74 @@ const ZT = ["data-theme"], JT = ["id"], jT = /* @__PURE__ */ $_({
|
|
|
52806
52807
|
"li",
|
|
52807
52808
|
"blockquote"
|
|
52808
52809
|
];
|
|
52809
|
-
for (const z of
|
|
52810
|
+
for (const z of F) {
|
|
52810
52811
|
const K = (A.match(new RegExp(`<${z}[^>]*>`, "gi")) || []).length, j = (A.match(new RegExp(`</${z}>`, "gi")) || []).length;
|
|
52811
52812
|
if (K > j)
|
|
52812
52813
|
return !0;
|
|
52813
52814
|
}
|
|
52814
|
-
if (
|
|
52815
|
-
const z =
|
|
52815
|
+
if (w) {
|
|
52816
|
+
const z = w.trim();
|
|
52816
52817
|
if (/^[-*+]\s*$/.test(z) || /^\d+\.\s*$/.test(z) || /^#{1,6}\s*$/.test(z))
|
|
52817
52818
|
return !0;
|
|
52818
52819
|
}
|
|
52819
52820
|
return !1;
|
|
52820
52821
|
}, l = (A) => {
|
|
52821
|
-
const
|
|
52822
|
-
if (
|
|
52823
|
-
return
|
|
52822
|
+
const O = A.lastIndexOf("\n```\n");
|
|
52823
|
+
if (O > 0 && (A.slice(0, O + 4).match(/```/g) || []).length % 2 === 0)
|
|
52824
|
+
return O + 4;
|
|
52824
52825
|
const M = A.lastIndexOf(`
|
|
52825
52826
|
|
|
52826
52827
|
`);
|
|
52827
52828
|
if (M > 0) {
|
|
52828
|
-
const
|
|
52829
|
-
if (!c(
|
|
52829
|
+
const L = A.slice(0, M);
|
|
52830
|
+
if (!c(L))
|
|
52830
52831
|
return M + 2;
|
|
52831
52832
|
}
|
|
52832
52833
|
const P = A.match(/\|\s*\n(?!\|)/g);
|
|
52833
52834
|
if (P && P.length > 0) {
|
|
52834
|
-
const
|
|
52835
|
-
if (
|
|
52836
|
-
const
|
|
52835
|
+
const L = P[P.length - 1], w = A.lastIndexOf(L);
|
|
52836
|
+
if (w > 0) {
|
|
52837
|
+
const F = w + L.length, z = A.slice(0, F);
|
|
52837
52838
|
if (!c(z))
|
|
52838
|
-
return
|
|
52839
|
+
return F;
|
|
52839
52840
|
}
|
|
52840
52841
|
}
|
|
52841
52842
|
return -1;
|
|
52842
52843
|
}, u = (A) => {
|
|
52843
|
-
const
|
|
52844
|
-
return
|
|
52845
|
-
}, _ = (A,
|
|
52846
|
-
if (s.value ===
|
|
52844
|
+
const O = document.createElement("template");
|
|
52845
|
+
return O.innerHTML = A.trim(), O.content;
|
|
52846
|
+
}, _ = (A, O) => {
|
|
52847
|
+
if (s.value === O)
|
|
52847
52848
|
return;
|
|
52848
|
-
const P = u(
|
|
52849
|
-
if (
|
|
52850
|
-
A.appendChild(P), s.value =
|
|
52849
|
+
const P = u(O), L = Array.from(P.children), w = Array.from(A.children);
|
|
52850
|
+
if (w.length === 0) {
|
|
52851
|
+
A.appendChild(P), s.value = O;
|
|
52851
52852
|
return;
|
|
52852
52853
|
}
|
|
52853
|
-
let
|
|
52854
|
-
const z = Math.min(
|
|
52854
|
+
let F = 0;
|
|
52855
|
+
const z = Math.min(w.length, L.length);
|
|
52855
52856
|
for (let K = 0; K < z; K++) {
|
|
52856
|
-
const j =
|
|
52857
|
+
const j = w[K], le = L[K];
|
|
52857
52858
|
if (j && le && j.outerHTML === le.outerHTML)
|
|
52858
|
-
|
|
52859
|
+
F = K + 1;
|
|
52859
52860
|
else
|
|
52860
52861
|
break;
|
|
52861
52862
|
}
|
|
52862
|
-
if (
|
|
52863
|
-
for (; A.children.length >
|
|
52863
|
+
if (F > 0 && F < L.length) {
|
|
52864
|
+
for (; A.children.length > F; )
|
|
52864
52865
|
A.lastElementChild?.remove();
|
|
52865
52866
|
const K = document.createDocumentFragment();
|
|
52866
|
-
for (let j =
|
|
52867
|
-
const le =
|
|
52867
|
+
for (let j = F; j < L.length; j++) {
|
|
52868
|
+
const le = L[j];
|
|
52868
52869
|
le && K.appendChild(le.cloneNode(!0));
|
|
52869
52870
|
}
|
|
52870
52871
|
A.appendChild(K);
|
|
52871
|
-
} else if (
|
|
52872
|
+
} else if (F === 0)
|
|
52872
52873
|
A.innerHTML = "", A.appendChild(P);
|
|
52873
|
-
else if (
|
|
52874
|
-
for (; A.children.length >
|
|
52874
|
+
else if (w.length > L.length)
|
|
52875
|
+
for (; A.children.length > L.length; )
|
|
52875
52876
|
A.lastElementChild?.remove();
|
|
52876
|
-
s.value =
|
|
52877
|
+
s.value = O;
|
|
52877
52878
|
}, m = Mt(), p = X_();
|
|
52878
52879
|
Z_(() => {
|
|
52879
52880
|
n.options ? p.value = new ve(
|
|
@@ -52890,39 +52891,43 @@ const ZT = ["data-theme"], JT = ["id"], jT = /* @__PURE__ */ $_({
|
|
|
52890
52891
|
n.options
|
|
52891
52892
|
)
|
|
52892
52893
|
) : p.value = new ve();
|
|
52893
|
-
const A = p.value.renderer.rules.table_open || function(M, P,
|
|
52894
|
-
return
|
|
52895
|
-
},
|
|
52896
|
-
return
|
|
52894
|
+
const A = p.value.renderer.rules.table_open || function(M, P, L, w, F) {
|
|
52895
|
+
return F.renderToken(M, P, L);
|
|
52896
|
+
}, O = p.value.renderer.rules.table_close || function(M, P, L, w, F) {
|
|
52897
|
+
return F.renderToken(M, P, L);
|
|
52897
52898
|
};
|
|
52898
|
-
p.value.renderer.rules.table_open = function(M, P,
|
|
52899
|
-
return '<div class="table-container">' + A(M, P,
|
|
52900
|
-
}, p.value.renderer.rules.table_close = function(M, P,
|
|
52901
|
-
return
|
|
52899
|
+
p.value.renderer.rules.table_open = function(M, P, L, w, F) {
|
|
52900
|
+
return '<div class="table-container">' + A(M, P, L, w, F);
|
|
52901
|
+
}, p.value.renderer.rules.table_close = function(M, P, L, w, F) {
|
|
52902
|
+
return O(M, P, L, w, F) + "</div>";
|
|
52902
52903
|
}, p.value.renderer.rules.fence = (M, P) => {
|
|
52903
|
-
const
|
|
52904
|
+
const L = M[P], w = L.info.trim(), F = L.content;
|
|
52904
52905
|
if (!p.value)
|
|
52905
52906
|
throw new Error("MarkdownIt instance is not initialized");
|
|
52906
|
-
const z =
|
|
52907
|
-
language:
|
|
52907
|
+
const z = w && (Wu.getLanguage(w) || w === "vue") ? Wu.highlight(F, {
|
|
52908
|
+
language: w === "vue" ? "html" : w,
|
|
52908
52909
|
ignoreIllegals: !0
|
|
52909
|
-
}).value : p.value.utils.escapeHtml(
|
|
52910
|
+
}).value : p.value.utils.escapeHtml(F), j = F.split(`
|
|
52910
52911
|
`).length, le = Array.from(
|
|
52911
52912
|
{ length: j },
|
|
52912
52913
|
(Te, ie) => `<div class="ln" data-line="${ie + 1}">${ie + 1}</div>`
|
|
52913
|
-
).join(""), Se = n.incremental ? !1 : j > n.codeMaxHeight, Oe = Se ? "code-block--collapsed" : "", Re = Se ? `<button class="expand-btn" data-expanded="false"
|
|
52914
|
+
).join(""), Se = n.incremental ? !1 : j > n.codeMaxHeight, Oe = Se ? "code-block--collapsed" : "", Re = Se ? `<button class="expand-btn" data-expanded="false" title="${n.expandText}">
|
|
52915
|
+
<i class="expand-icon material-symbols--expand-more"></i>
|
|
52916
|
+
</button>` : "";
|
|
52914
52917
|
return `
|
|
52915
52918
|
<div class="code-block-wrapper not-prose ${Oe}" data-lines="${j}">
|
|
52916
52919
|
<div class="code-header">
|
|
52917
|
-
<span class="lang">${
|
|
52920
|
+
<span class="lang">${w || "text"}</span>
|
|
52918
52921
|
<div class="code-header__actions">
|
|
52919
52922
|
${Re}
|
|
52920
|
-
<button class="copy-btn"
|
|
52923
|
+
<button class="copy-btn" title="${n.copyText}">
|
|
52924
|
+
<i class="copy-icon material-symbols--content-copy"></i>
|
|
52925
|
+
</button>
|
|
52921
52926
|
</div>
|
|
52922
52927
|
</div>
|
|
52923
52928
|
<div class="code-content">
|
|
52924
52929
|
<div class="line-numbers" style="min-width: ${Math.max(2, j.toString().length)}ch;">${le}</div>
|
|
52925
|
-
<pre><code class="hljs ${
|
|
52930
|
+
<pre><code class="hljs ${w} code-content__code">${z}</code></pre>
|
|
52926
52931
|
</div>
|
|
52927
52932
|
${Se ? '<div class="code-block__fade"></div>' : ""}
|
|
52928
52933
|
</div>
|
|
@@ -52940,8 +52945,8 @@ const ZT = ["data-theme"], JT = ["id"], jT = /* @__PURE__ */ $_({
|
|
|
52940
52945
|
}), m.value?.addEventListener("click", N), m.value?.addEventListener("click", C), d();
|
|
52941
52946
|
});
|
|
52942
52947
|
const d = () => {
|
|
52943
|
-
m.value?.querySelectorAll(".code-block-wrapper")?.forEach((
|
|
52944
|
-
const M =
|
|
52948
|
+
m.value?.querySelectorAll(".code-block-wrapper")?.forEach((O) => {
|
|
52949
|
+
const M = O.querySelector("pre"), P = O.querySelector(".line-numbers");
|
|
52945
52950
|
M && P && M.addEventListener("scroll", () => {
|
|
52946
52951
|
P.scrollTop = M.scrollTop;
|
|
52947
52952
|
});
|
|
@@ -52950,51 +52955,54 @@ const ZT = ["data-theme"], JT = ["id"], jT = /* @__PURE__ */ $_({
|
|
|
52950
52955
|
setTimeout(() => {
|
|
52951
52956
|
d();
|
|
52952
52957
|
}, 0);
|
|
52953
|
-
}, S = (A,
|
|
52958
|
+
}, S = (A, O) => O.startsWith(A) && O.length > A.length, b = (A) => {
|
|
52954
52959
|
if (!p.value || !m.value) return;
|
|
52955
|
-
const
|
|
52956
|
-
if (i.value = M, !
|
|
52960
|
+
const O = r.value, M = S(O, A);
|
|
52961
|
+
if (i.value = M, !O || !M) {
|
|
52957
52962
|
f(A);
|
|
52958
52963
|
return;
|
|
52959
52964
|
}
|
|
52960
52965
|
if (c(A)) {
|
|
52961
|
-
const
|
|
52966
|
+
const F = p.value.render(A), z = u(F);
|
|
52962
52967
|
requestAnimationFrame(() => {
|
|
52963
52968
|
m.value && (m.value.innerHTML = "", m.value.appendChild(z));
|
|
52964
52969
|
}), r.value = A, g();
|
|
52965
52970
|
return;
|
|
52966
52971
|
}
|
|
52967
|
-
const P = l(
|
|
52972
|
+
const P = l(O);
|
|
52968
52973
|
if (P <= 0) {
|
|
52969
|
-
const
|
|
52970
|
-
_(m.value,
|
|
52974
|
+
const F = p.value.render(A);
|
|
52975
|
+
_(m.value, F), r.value = A, g();
|
|
52971
52976
|
return;
|
|
52972
52977
|
}
|
|
52973
|
-
const
|
|
52974
|
-
if (
|
|
52975
|
-
const
|
|
52976
|
-
_(m.value,
|
|
52978
|
+
const L = O.slice(0, P), w = A.slice(0, Math.min(P, A.length));
|
|
52979
|
+
if (L === w && A.length > P) {
|
|
52980
|
+
const F = p.value.render(A);
|
|
52981
|
+
_(m.value, F);
|
|
52977
52982
|
} else {
|
|
52978
|
-
const
|
|
52979
|
-
_(m.value,
|
|
52983
|
+
const F = p.value.render(A);
|
|
52984
|
+
_(m.value, F);
|
|
52980
52985
|
}
|
|
52981
52986
|
r.value = A, s.value = p.value.render(A), g();
|
|
52982
52987
|
}, f = (A) => {
|
|
52983
52988
|
if (!p.value || !m.value) return;
|
|
52984
|
-
const
|
|
52985
|
-
m.value.innerHTML = "", m.value.appendChild(M), r.value = A, s.value =
|
|
52986
|
-
},
|
|
52989
|
+
const O = p.value.render(A), M = u(O);
|
|
52990
|
+
m.value.innerHTML = "", m.value.appendChild(M), r.value = A, s.value = O, g();
|
|
52991
|
+
}, T = (A) => {
|
|
52987
52992
|
if (a.value !== null && cancelAnimationFrame(a.value), n.incrementalDebounce <= 0) {
|
|
52988
52993
|
if (n.incremental)
|
|
52989
52994
|
try {
|
|
52990
|
-
|
|
52991
|
-
|
|
52992
|
-
|
|
52993
|
-
|
|
52994
|
-
|
|
52995
|
+
if (n.performanceLog) {
|
|
52996
|
+
const O = performance.now();
|
|
52997
|
+
b(A);
|
|
52998
|
+
const M = performance.now();
|
|
52999
|
+
console.log(`[kernelift](markdown) Incremental render took ${M - O} ms`);
|
|
53000
|
+
} else
|
|
53001
|
+
b(A);
|
|
53002
|
+
} catch (O) {
|
|
52995
53003
|
console.warn(
|
|
52996
53004
|
"[kernelift](markdown) Incremental rendering failed, falling back to full render",
|
|
52997
|
-
|
|
53005
|
+
O
|
|
52998
53006
|
), f(A);
|
|
52999
53007
|
}
|
|
53000
53008
|
else
|
|
@@ -53004,14 +53012,17 @@ const ZT = ["data-theme"], JT = ["id"], jT = /* @__PURE__ */ $_({
|
|
|
53004
53012
|
a.value = requestAnimationFrame(() => {
|
|
53005
53013
|
if (n.incremental)
|
|
53006
53014
|
try {
|
|
53007
|
-
|
|
53008
|
-
|
|
53009
|
-
|
|
53010
|
-
|
|
53011
|
-
|
|
53015
|
+
if (n.performanceLog) {
|
|
53016
|
+
const O = performance.now();
|
|
53017
|
+
b(A);
|
|
53018
|
+
const M = performance.now();
|
|
53019
|
+
console.log(`[kernelift](markdown) Incremental render took ${M - O} ms`);
|
|
53020
|
+
} else
|
|
53021
|
+
b(A);
|
|
53022
|
+
} catch (O) {
|
|
53012
53023
|
console.warn(
|
|
53013
53024
|
"[kernelift](markdown) Incremental rendering failed, falling back to full render",
|
|
53014
|
-
|
|
53025
|
+
O
|
|
53015
53026
|
), f(A);
|
|
53016
53027
|
}
|
|
53017
53028
|
else
|
|
@@ -53019,20 +53030,24 @@ const ZT = ["data-theme"], JT = ["id"], jT = /* @__PURE__ */ $_({
|
|
|
53019
53030
|
a.value = null;
|
|
53020
53031
|
});
|
|
53021
53032
|
}, C = (A) => {
|
|
53022
|
-
const
|
|
53023
|
-
if (!
|
|
53024
|
-
const M =
|
|
53033
|
+
const O = A.target?.closest(".expand-btn");
|
|
53034
|
+
if (!O) return;
|
|
53035
|
+
const M = O.closest(".code-block-wrapper");
|
|
53025
53036
|
if (!M) return;
|
|
53026
|
-
|
|
53037
|
+
const P = O.dataset.expanded === "true", L = O.querySelector(".expand-icon");
|
|
53038
|
+
P ? (M.classList.add("code-block--collapsed"), O.dataset.expanded = "false", O.title = n.expandText, L && (L.classList.remove("material-symbols--expand-less"), L.classList.add("material-symbols--expand-more"))) : (M.classList.remove("code-block--collapsed"), O.dataset.expanded = "true", O.title = n.collapseText, L && (L.classList.remove("material-symbols--expand-more"), L.classList.add("material-symbols--expand-less")));
|
|
53027
53039
|
}, N = (A) => {
|
|
53028
|
-
const
|
|
53029
|
-
if (!
|
|
53030
|
-
const P =
|
|
53040
|
+
const O = A.target?.closest(".copy-btn");
|
|
53041
|
+
if (!O) return;
|
|
53042
|
+
const P = O.closest(".code-block-wrapper")?.querySelector(".code-content__code")?.innerText;
|
|
53031
53043
|
if (!P) {
|
|
53032
53044
|
console.error("[kernelift/markdown-render] Failed to copy code");
|
|
53033
53045
|
return;
|
|
53034
53046
|
}
|
|
53035
|
-
|
|
53047
|
+
const L = O.querySelector(".copy-icon");
|
|
53048
|
+
if (L && (L.classList.remove("material-symbols--content-copy"), L.classList.add("material-symbols--check"), O.classList.add("copied"), O.title = "Copied!"), setTimeout(() => {
|
|
53049
|
+
L && (L.classList.remove("material-symbols--check"), L.classList.add("material-symbols--content-copy"), O.classList.remove("copied"), O.title = n.copyText);
|
|
53050
|
+
}, 2e3), typeof n.onCopy == "function") {
|
|
53036
53051
|
n.onCopy(P || "");
|
|
53037
53052
|
return;
|
|
53038
53053
|
} else
|
|
@@ -53042,8 +53057,8 @@ const ZT = ["data-theme"], JT = ["id"], jT = /* @__PURE__ */ $_({
|
|
|
53042
53057
|
console.error("[kernelift/markdown-render] Failed to copy code");
|
|
53043
53058
|
});
|
|
53044
53059
|
};
|
|
53045
|
-
J_([() => o.value, () => p.value], ([A,
|
|
53046
|
-
|
|
53060
|
+
J_([() => o.value, () => p.value], ([A, O]) => {
|
|
53061
|
+
O && m.value && T(A || "");
|
|
53047
53062
|
});
|
|
53048
53063
|
const R = (A) => {
|
|
53049
53064
|
p.value && A(p.value);
|
|
@@ -53061,13 +53076,13 @@ const ZT = ["data-theme"], JT = ["id"], jT = /* @__PURE__ */ $_({
|
|
|
53061
53076
|
resetRenderState: v,
|
|
53062
53077
|
isStreaming: i
|
|
53063
53078
|
});
|
|
53064
|
-
const
|
|
53065
|
-
return (A,
|
|
53079
|
+
const U = (/* @__PURE__ */ new Date()).getTime();
|
|
53080
|
+
return (A, O) => (td(), ed("article", {
|
|
53066
53081
|
class: "kernelift-md-render",
|
|
53067
53082
|
"data-theme": e.themeMode
|
|
53068
53083
|
}, [
|
|
53069
53084
|
nd("div", {
|
|
53070
|
-
id: `kernelift-md-render__container-${rd(
|
|
53085
|
+
id: `kernelift-md-render__container-${rd(U)}`,
|
|
53071
53086
|
class: "kernelift-md-render__container",
|
|
53072
53087
|
ref_key: "containerRef",
|
|
53073
53088
|
ref: m
|
|
@@ -53079,7 +53094,7 @@ const ZT = ["data-theme"], JT = ["id"], jT = /* @__PURE__ */ $_({
|
|
|
53079
53094
|
for (const [r, a] of t)
|
|
53080
53095
|
n[r] = a;
|
|
53081
53096
|
return n;
|
|
53082
|
-
}, nR = /* @__PURE__ */ eR(jT, [["__scopeId", "data-v-
|
|
53097
|
+
}, nR = /* @__PURE__ */ eR(jT, [["__scopeId", "data-v-efa45a40"]]);
|
|
53083
53098
|
export {
|
|
53084
53099
|
nR as MdRender
|
|
53085
53100
|
};
|