@checkly/playwright-core 1.48.21 → 1.48.22-beta
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/lib/cli/cli.js +61 -0
- package/lib/common/debugLogger.js +90 -0
- package/lib/generated/recorderSource.js +1 -1
- package/lib/server/recorder/java.js +4 -36
- package/lib/server/trace/recorder/tracing.js +22 -17
- package/lib/vite/{traceViewer/assets/codeMirrorModule-B7Z3vq11.js → recorder/assets/codeMirrorModule-CR6kB851.js} +1 -1
- package/lib/vite/recorder/assets/{index-Bxxcmxlu.js → index-BcaUAUCW.js} +2 -2
- package/lib/vite/recorder/index.html +1 -1
- package/lib/vite/traceViewer/assets/codeMirrorModule-75b0ca4f.js +24 -0
- package/lib/vite/traceViewer/assets/codeMirrorModule-CNHvVrFd.js +16437 -0
- package/lib/vite/traceViewer/assets/{codeMirrorModule-BdBhzV6t.js → codeMirrorModule-CpGx_S8D.js} +2 -2
- package/lib/vite/traceViewer/assets/codeMirrorModule-SomGa-Da.js +16443 -0
- package/lib/vite/traceViewer/assets/codeMirrorModule-c1454a2e.js +24 -0
- package/lib/vite/traceViewer/assets/codeMirrorModule-c9bb9834.js +24 -0
- package/lib/vite/traceViewer/assets/{codeMirrorModule-BqcXH1AO.js → codeMirrorModule-cc2329e4.js} +11 -1256
- package/lib/vite/traceViewer/assets/codeMirrorModule-d2cc7db0.js +15579 -0
- package/lib/vite/traceViewer/assets/codeMirrorModule-da915a35.js +15586 -0
- package/lib/vite/traceViewer/assets/{codeMirrorModule-U6XMqGkV.js → codeMirrorModule-f03b1a3e.js} +661 -1519
- package/lib/vite/traceViewer/assets/codeMirrorModule-f333a775.js +24 -0
- package/lib/vite/traceViewer/assets/{codeMirrorModule-V7N6ppkd.js → codeMirrorModule-uWDlVSQz.js} +2 -2
- package/lib/vite/traceViewer/assets/{codeMirrorModule-Dx6AXgMV.js → codeMirrorModule-yboVpgC0.js} +2 -1248
- package/lib/vite/traceViewer/assets/{inspectorTab-BPzVEZSf.js → inspectorTab-B4ynvyY9.js} +18 -8
- package/lib/vite/traceViewer/assets/{inspectorTab-BABZNwlH.js → inspectorTab-Dw0Gnh1T.js} +18 -8
- package/lib/vite/traceViewer/assets/{inspectorTab-DpvLVMq5.js → inspectorTab-Ywa000c9.js} +16 -6
- package/lib/vite/traceViewer/assets/{workbench-BcgGQnKb.js → workbench-CROk6Fcc.js} +2 -2
- package/lib/vite/traceViewer/assets/{workbench-ByyWxoT8.js → workbench-CfXOj3eT.js} +2 -2
- package/lib/vite/traceViewer/assets/{workbench-DhqI6jeL.js → workbench-D9CTkv-4.js} +2 -2
- package/lib/vite/traceViewer/assets/{workbench-I4s6sWjN.js → workbench-DNolpp3y.js} +1 -1
- package/lib/vite/traceViewer/assets/workbench-dnZM5a7x.js +1473 -0
- package/lib/vite/traceViewer/assets/wsPort-54626118.js +18361 -0
- package/lib/vite/traceViewer/assets/{workbench-Crj6jzdv.js → wsPort-57f274c6.js} +4308 -5066
- package/lib/vite/traceViewer/assets/wsPort-762c6840.js +64 -0
- package/lib/vite/traceViewer/assets/wsPort-85286e61.js +18361 -0
- package/lib/vite/traceViewer/assets/wsPort-98e00a94.js +64 -0
- package/lib/vite/traceViewer/assets/{wsPort-EUvw-dwH.js → wsPort-CAXygIGt.js} +3 -3
- package/lib/vite/traceViewer/assets/{workbench-Bjkiwcr1.js → wsPort-cc0077b5.js} +4046 -4623
- package/lib/vite/traceViewer/assets/wsPort-edfeeb7d.js +64 -0
- package/lib/vite/traceViewer/assets/wsPort-ee2830d7.js +64 -0
- package/lib/vite/traceViewer/assets/{workbench-C5OQh9VX.js → wsPort-peeLnQhT.js} +985 -1540
- package/lib/vite/traceViewer/assets/xtermModule-443332e6.js +9 -0
- package/lib/vite/traceViewer/assets/xtermModule-60687b6b.js +6410 -0
- package/lib/vite/traceViewer/codeMirrorModule.5d0f417c.css +1 -0
- package/lib/vite/traceViewer/codeMirrorModule.eb494ea9.css +344 -0
- package/lib/vite/traceViewer/codicon.79f233d0.ttf +0 -0
- package/lib/vite/traceViewer/{embedded.27BGR_eD.js → embedded.6N1v7bZ1.js} +4 -3
- package/lib/vite/traceViewer/{embedded.DTjd2aiy.js → embedded.BaqdbLsy.js} +4 -3
- package/lib/vite/traceViewer/{embedded.SsjKHrxC.js → embedded.CwwTDBzP.js} +4 -3
- package/lib/vite/traceViewer/{embedded.Zu332ZC1.js → embedded.DeCrOtlO.js} +2 -2
- package/lib/vite/traceViewer/embedded.i_k4ceMJ.js +106 -0
- package/lib/vite/traceViewer/index.1a1fe659.css +1 -0
- package/lib/vite/traceViewer/index.1b525c1c.js +181 -0
- package/lib/vite/traceViewer/index.55e65778.js +181 -0
- package/lib/vite/traceViewer/{index.6KJ-JQ0L.js → index.5nqVcfiC.js} +2 -2
- package/lib/vite/traceViewer/{index.C0EgJ4oW.js → index.5ooko4n7.js} +21 -36
- package/lib/vite/traceViewer/index.76e9f312.css +124 -0
- package/lib/vite/traceViewer/{index.Dz3icWJV.js → index.Bugo2TbS.js} +4 -3
- package/lib/vite/traceViewer/{index.PqcsvBxQ.js → index.BzvnAP7t.js} +4 -3
- package/lib/vite/traceViewer/{index.CLxsp2W_.js → index.CM_h9lHr.js} +2 -2
- package/lib/vite/traceViewer/{index.yxAwzeWG.js → index.CY13pBr8.js} +4 -3
- package/lib/vite/traceViewer/index.DblJtEW_.js +197 -0
- package/lib/vite/traceViewer/index.a265fbdb.js +2 -0
- package/lib/vite/traceViewer/index.c9f6fa8f.js +2 -0
- package/lib/vite/traceViewer/index.d86e70ca.js +181 -0
- package/lib/vite/traceViewer/index.decad628.js +2 -0
- package/lib/vite/traceViewer/index.e8730524.js +181 -0
- package/lib/vite/traceViewer/index.ed9a3c58.js +2 -0
- package/lib/vite/traceViewer/{recorder.BufKu9Hp.js → recorder.3Xfrl_zV.js} +3 -2
- package/lib/vite/traceViewer/{recorder.am-MV-DQ.js → recorder.Db1aK_DY.js} +3 -2
- package/lib/vite/traceViewer/{recorder.7Wl6HrQl.js → recorder.uj3cfoMf.js} +3 -2
- package/lib/vite/traceViewer/uiMode.08ab2d90.js +4 -0
- package/lib/vite/traceViewer/uiMode.0d0d667b.js +4 -0
- package/lib/vite/traceViewer/uiMode.216233d5.js +1484 -0
- package/lib/vite/traceViewer/{uiMode.DVWUEIHq.css → uiMode.2c31018f.css} +88 -188
- package/lib/vite/traceViewer/uiMode.3ff70f7d.js +4 -0
- package/lib/vite/traceViewer/uiMode.4d0a45af.js +1484 -0
- package/lib/vite/traceViewer/uiMode.66eb0ce2.js +1484 -0
- package/lib/vite/traceViewer/uiMode.8b41a49d.css +1 -0
- package/lib/vite/traceViewer/uiMode.8d080c01.js +1486 -0
- package/lib/vite/traceViewer/uiMode.BKrDfnAk.js +1725 -0
- package/lib/vite/traceViewer/uiMode.BMYUvsRh.js +1725 -0
- package/lib/vite/traceViewer/{uiMode.BZoFj6zV.js → uiMode.BVpTBGoe.js} +4 -3
- package/lib/vite/traceViewer/uiMode.BWhJCEE9.js +1725 -0
- package/lib/vite/traceViewer/uiMode.Bg9fACTB.js +1725 -0
- package/lib/vite/traceViewer/{uiMode.CpC2B27N.js → uiMode.CYBsUhm_.js} +2 -2
- package/lib/vite/traceViewer/{uiMode.Dlo9s_YX.js → uiMode.DCSdxlAq.js} +4 -3
- package/lib/vite/traceViewer/{uiMode.wsGnVMQK.js → uiMode.DtleKuGI.js} +4 -3
- package/lib/vite/traceViewer/uiMode.UamAvOMX.js +1725 -0
- package/lib/vite/traceViewer/uiMode.bBcXYWNF.js +1725 -0
- package/lib/vite/traceViewer/uiMode.ca6ec898.js +4 -0
- package/lib/vite/traceViewer/{uiMode.iq7CyYy7.js → uiMode.e-PLonGl.js} +2 -2
- package/lib/vite/traceViewer/uiMode.e_-GuqEi.js +1725 -0
- package/lib/vite/traceViewer/uiMode.f1YADWIl.js +1724 -0
- package/lib/vite/traceViewer/uiMode.kHsXCfV8.js +1490 -0
- package/lib/vite/traceViewer/{workbench.B3X2QtYa.css → wsPort.162042f9.css} +63 -315
- package/lib/vite/traceViewer/{workbench.wuxQoE2z.css → wsPort.997c92cf.css} +145 -335
- package/lib/vite/traceViewer/wsPort.9c9a6767.css +1 -0
- package/lib/vite/traceViewer/xtermModule.125f4259.css +191 -0
- package/lib/vite/traceViewer/xtermModule.6428296b.css +32 -0
- package/package.json +1 -1
- package/lib/vite/recorder/assets/codeMirrorModule-d0KhC1qL.js +0 -24
- package/lib/vite/traceViewer/assets/codeMirrorModule-5yiV-3wl.js +0 -16831
- package/lib/vite/traceViewer/assets/codeMirrorModule-C6p3E9Zg.js +0 -24
- package/lib/vite/traceViewer/assets/codeMirrorModule-Ca-1BNel.js +0 -24
- package/lib/vite/traceViewer/assets/codeMirrorModule-CcviAl53.js +0 -16831
- package/lib/vite/traceViewer/assets/codeMirrorModule-CqYUz5ms.js +0 -24
- package/lib/vite/traceViewer/assets/codeMirrorModule-DS3v0XrQ.js +0 -24
- package/lib/vite/traceViewer/assets/codeMirrorModule-DZoSgqUd.js +0 -24
- package/lib/vite/traceViewer/assets/codeMirrorModule-EhKN7Okm.js +0 -16449
- package/lib/vite/traceViewer/assets/codeMirrorModule-MzSmL4X2.js +0 -24
- package/lib/vite/traceViewer/assets/codeMirrorModule-T_sdMrbM.js +0 -24
- package/lib/vite/traceViewer/assets/inspectorTab-BHcfR9dD.js +0 -64
- package/lib/vite/traceViewer/assets/inspectorTab-Bbgq0hgt.js +0 -64
- package/lib/vite/traceViewer/assets/inspectorTab-DhBbZz8I.js +0 -64
- package/lib/vite/traceViewer/assets/workbench-B13nfocr.js +0 -9
- package/lib/vite/traceViewer/assets/workbench-BwodYCgl.js +0 -19119
- package/lib/vite/traceViewer/assets/workbench-C43LWZEX.js +0 -72
- package/lib/vite/traceViewer/assets/workbench-DZqNXdoV.js +0 -9
- package/lib/vite/traceViewer/assets/workbench-DrQjKdyE.js +0 -72
- package/lib/vite/traceViewer/assets/workbench-Pa1v1Ojh.js +0 -72
- package/lib/vite/traceViewer/assets/workbench-caTaZnzx.js +0 -72
- package/lib/vite/traceViewer/assets/workbench-gtYcQBNA.js +0 -9
- package/lib/vite/traceViewer/assets/workbench-u2lRPMOT.js +0 -72
- package/lib/vite/traceViewer/assets/xtermModule-CZ7sDYXB.js +0 -6529
- package/lib/vite/traceViewer/embedded.BBZ9gQEw.js +0 -104
- package/lib/vite/traceViewer/embedded.BQq6Psnz.js +0 -104
- package/lib/vite/traceViewer/embedded.BVDVQOzc.js +0 -2
- package/lib/vite/traceViewer/embedded.Bn8Ptzv6.js +0 -2
- package/lib/vite/traceViewer/embedded.CorI3dFX.js +0 -104
- package/lib/vite/traceViewer/embedded.CvhnUgIi.js +0 -2
- package/lib/vite/traceViewer/embedded.D27cnKiB.js +0 -104
- package/lib/vite/traceViewer/embedded.D4lqGydT.js +0 -2
- package/lib/vite/traceViewer/embedded.DPqrDeET.js +0 -2
- package/lib/vite/traceViewer/embedded.DbzY7Q8w.js +0 -2
- package/lib/vite/traceViewer/embedded.Dxe2heQk.js +0 -2
- package/lib/vite/traceViewer/embedded.f-PLGsBT.js +0 -2
- package/lib/vite/traceViewer/index.B7aiTMfZ.js +0 -2
- package/lib/vite/traceViewer/index.B8dgQwuN.js +0 -2
- package/lib/vite/traceViewer/index.BGj8jY3H.js +0 -2
- package/lib/vite/traceViewer/index.BSak5QT9.js +0 -2
- package/lib/vite/traceViewer/index.BrT2kfuc.js +0 -2
- package/lib/vite/traceViewer/index.CB297BuW.js +0 -2
- package/lib/vite/traceViewer/index.CUpI-BFe.js +0 -195
- package/lib/vite/traceViewer/index.DkRbtWVo.js +0 -195
- package/lib/vite/traceViewer/index.DsjmhbB6.js +0 -195
- package/lib/vite/traceViewer/index._cX8k4co.js +0 -2
- package/lib/vite/traceViewer/index.pMAN88y-.js +0 -2
- package/lib/vite/traceViewer/recorder.C88JDknq.js +0 -2
- package/lib/vite/traceViewer/recorder.Ch-WHviK.js +0 -2
- package/lib/vite/traceViewer/recorder.POd-toIn.js +0 -2
- package/lib/vite/traceViewer/uiMode.2tr9k625.js +0 -5
- package/lib/vite/traceViewer/uiMode.BEZVCe5O.js +0 -5
- package/lib/vite/traceViewer/uiMode.C4nbcio6.js +0 -1730
- package/lib/vite/traceViewer/uiMode.D-tg1Oci.js +0 -1730
- package/lib/vite/traceViewer/uiMode.D3cNFP6u.css +0 -1
- package/lib/vite/traceViewer/uiMode.DKjMBMlc.js +0 -1730
- package/lib/vite/traceViewer/uiMode.DVrL7a1K.js +0 -10
- package/lib/vite/traceViewer/uiMode.DdtUZZVS.js +0 -5
- package/lib/vite/traceViewer/uiMode.Dg9oJCQU.js +0 -10
- package/lib/vite/traceViewer/uiMode.DwZAzstF.js +0 -10
- package/lib/vite/traceViewer/uiMode.O07awP3T.js +0 -10
- package/lib/vite/traceViewer/uiMode.gGHHTsyL.js +0 -1730
- package/lib/vite/traceViewer/uiMode.jY2s-9ps.js +0 -10
- package/lib/vite/traceViewer/workbench.DjbIuxix.css +0 -1
- package/lib/vite/traceViewer/workbench.DyTpxWVb.css +0 -1
package/lib/vite/traceViewer/assets/{codeMirrorModule-U6XMqGkV.js → codeMirrorModule-f03b1a3e.js}
RENAMED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
var codemirror$
|
|
1
|
+
import { o as commonjsGlobal, p as getDefaultExportFromCjs } from "./wsPort-cc0077b5.js";
|
|
2
|
+
var codemirror$2 = { exports: {} };
|
|
3
3
|
var hasRequiredCodemirror;
|
|
4
4
|
function requireCodemirror() {
|
|
5
|
-
if (hasRequiredCodemirror)
|
|
5
|
+
if (hasRequiredCodemirror)
|
|
6
|
+
return codemirror$2.exports;
|
|
6
7
|
hasRequiredCodemirror = 1;
|
|
7
8
|
(function(module, exports) {
|
|
8
9
|
(function(global, factory) {
|
|
@@ -393,7 +394,7 @@ function requireCodemirror() {
|
|
|
393
394
|
}
|
|
394
395
|
return found != null ? found : bidiOther;
|
|
395
396
|
}
|
|
396
|
-
var bidiOrdering =
|
|
397
|
+
var bidiOrdering = function() {
|
|
397
398
|
var lowTypes = "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN";
|
|
398
399
|
var arabicTypes = "nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";
|
|
399
400
|
function charType(code) {
|
|
@@ -1023,18 +1024,19 @@ function requireCodemirror() {
|
|
|
1023
1024
|
}
|
|
1024
1025
|
function lineAtHeight(chunk, h) {
|
|
1025
1026
|
var n = chunk.first;
|
|
1026
|
-
outer:
|
|
1027
|
-
|
|
1028
|
-
var
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1027
|
+
outer:
|
|
1028
|
+
do {
|
|
1029
|
+
for (var i$12 = 0; i$12 < chunk.children.length; ++i$12) {
|
|
1030
|
+
var child = chunk.children[i$12], ch = child.height;
|
|
1031
|
+
if (h < ch) {
|
|
1032
|
+
chunk = child;
|
|
1033
|
+
continue outer;
|
|
1034
|
+
}
|
|
1035
|
+
h -= ch;
|
|
1036
|
+
n += child.chunkSize();
|
|
1032
1037
|
}
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
}
|
|
1036
|
-
return n;
|
|
1037
|
-
} while (!chunk.lines);
|
|
1038
|
+
return n;
|
|
1039
|
+
} while (!chunk.lines);
|
|
1038
1040
|
var i2 = 0;
|
|
1039
1041
|
for (; i2 < chunk.lines.length; ++i2) {
|
|
1040
1042
|
var line = chunk.lines[i2], lh = line.height;
|
|
@@ -1052,7 +1054,8 @@ function requireCodemirror() {
|
|
|
1052
1054
|
return String(options.lineNumberFormatter(i2 + options.firstLineNumber));
|
|
1053
1055
|
}
|
|
1054
1056
|
function Pos(line, ch, sticky) {
|
|
1055
|
-
if (sticky === void 0)
|
|
1057
|
+
if (sticky === void 0)
|
|
1058
|
+
sticky = null;
|
|
1056
1059
|
if (!(this instanceof Pos)) {
|
|
1057
1060
|
return new Pos(line, ch, sticky);
|
|
1058
1061
|
}
|
|
@@ -1199,7 +1202,8 @@ function requireCodemirror() {
|
|
|
1199
1202
|
context.baseTokens = null;
|
|
1200
1203
|
context.baseTokenPos = 1;
|
|
1201
1204
|
};
|
|
1202
|
-
for (var o = 0; o < cm.state.overlays.length; ++o)
|
|
1205
|
+
for (var o = 0; o < cm.state.overlays.length; ++o)
|
|
1206
|
+
loop(o);
|
|
1203
1207
|
return { styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null };
|
|
1204
1208
|
}
|
|
1205
1209
|
function getLineStyles(cm, line, updateFrontier) {
|
|
@@ -3341,7 +3345,8 @@ function requireCodemirror() {
|
|
|
3341
3345
|
cm.display.input.showSelection(cm.display.input.prepareSelection());
|
|
3342
3346
|
}
|
|
3343
3347
|
function prepareSelection(cm, primary) {
|
|
3344
|
-
if (primary === void 0)
|
|
3348
|
+
if (primary === void 0)
|
|
3349
|
+
primary = true;
|
|
3345
3350
|
var doc2 = cm.doc, result = {};
|
|
3346
3351
|
var curFragment = result.cursors = document.createDocumentFragment();
|
|
3347
3352
|
var selFragment = result.selection = document.createDocumentFragment();
|
|
@@ -4474,7 +4479,8 @@ function requireCodemirror() {
|
|
|
4474
4479
|
var view = display.view, lineN = display.viewFrom;
|
|
4475
4480
|
for (var i2 = 0; i2 < view.length; i2++) {
|
|
4476
4481
|
var lineView = view[i2];
|
|
4477
|
-
if (lineView.hidden)
|
|
4482
|
+
if (lineView.hidden)
|
|
4483
|
+
;
|
|
4478
4484
|
else if (!lineView.node || lineView.node.parentNode != container) {
|
|
4479
4485
|
var node = buildLineElement(cm, lineView, lineN, dims);
|
|
4480
4486
|
container.insertBefore(node, cur);
|
|
@@ -4733,14 +4739,15 @@ function requireCodemirror() {
|
|
|
4733
4739
|
return;
|
|
4734
4740
|
}
|
|
4735
4741
|
if (dy && mac && webkit) {
|
|
4736
|
-
outer:
|
|
4737
|
-
for (var
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4742
|
+
outer:
|
|
4743
|
+
for (var cur = e.target, view = display.view; cur != scroll; cur = cur.parentNode) {
|
|
4744
|
+
for (var i2 = 0; i2 < view.length; i2++) {
|
|
4745
|
+
if (view[i2].node == cur) {
|
|
4746
|
+
cm.display.currentWheelTarget = cur;
|
|
4747
|
+
break outer;
|
|
4748
|
+
}
|
|
4741
4749
|
}
|
|
4742
4750
|
}
|
|
4743
|
-
}
|
|
4744
4751
|
}
|
|
4745
4752
|
if (dx && !gecko && !presto && pixelsPerUnit != null) {
|
|
4746
4753
|
if (dy && canScrollY) {
|
|
@@ -5201,15 +5208,16 @@ function requireCodemirror() {
|
|
|
5201
5208
|
for (var i2 = 0; i2 < old.length; ++i2) {
|
|
5202
5209
|
var oldCur = old[i2], stretchCur = stretched[i2];
|
|
5203
5210
|
if (oldCur && stretchCur) {
|
|
5204
|
-
spans:
|
|
5205
|
-
var
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
|
|
5211
|
+
spans:
|
|
5212
|
+
for (var j = 0; j < stretchCur.length; ++j) {
|
|
5213
|
+
var span = stretchCur[j];
|
|
5214
|
+
for (var k = 0; k < oldCur.length; ++k) {
|
|
5215
|
+
if (oldCur[k].marker == span.marker) {
|
|
5216
|
+
continue spans;
|
|
5217
|
+
}
|
|
5209
5218
|
}
|
|
5219
|
+
oldCur.push(span);
|
|
5210
5220
|
}
|
|
5211
|
-
oldCur.push(span);
|
|
5212
|
-
}
|
|
5213
5221
|
} else if (stretchCur) {
|
|
5214
5222
|
old[i2] = stretchCur;
|
|
5215
5223
|
}
|
|
@@ -5573,7 +5581,8 @@ function requireCodemirror() {
|
|
|
5573
5581
|
};
|
|
5574
5582
|
for (var i$12 = event.changes.length - 1; i$12 >= 0; --i$12) {
|
|
5575
5583
|
var returned = loop(i$12);
|
|
5576
|
-
if (returned)
|
|
5584
|
+
if (returned)
|
|
5585
|
+
return returned.v;
|
|
5577
5586
|
}
|
|
5578
5587
|
}
|
|
5579
5588
|
function shiftDoc(doc2, distance) {
|
|
@@ -6309,7 +6318,8 @@ function requireCodemirror() {
|
|
|
6309
6318
|
}
|
|
6310
6319
|
}
|
|
6311
6320
|
};
|
|
6312
|
-
for (var i2 = 0; i2 < markers.length; i2++)
|
|
6321
|
+
for (var i2 = 0; i2 < markers.length; i2++)
|
|
6322
|
+
loop(i2);
|
|
6313
6323
|
}
|
|
6314
6324
|
var nextDocId = 0;
|
|
6315
6325
|
var Doc = function(text, mode, firstLine, lineSep, direction) {
|
|
@@ -10706,7 +10716,7 @@ function requireCodemirror() {
|
|
|
10706
10716
|
var dontDelegate = "iter insert remove copy getEditor constructor".split(" ");
|
|
10707
10717
|
for (var prop in Doc.prototype) {
|
|
10708
10718
|
if (Doc.prototype.hasOwnProperty(prop) && indexOf(dontDelegate, prop) < 0) {
|
|
10709
|
-
CodeMirror.prototype[prop] =
|
|
10719
|
+
CodeMirror.prototype[prop] = function(method) {
|
|
10710
10720
|
return function() {
|
|
10711
10721
|
return method.apply(this.doc, arguments);
|
|
10712
10722
|
};
|
|
@@ -10739,11 +10749,12 @@ function requireCodemirror() {
|
|
|
10739
10749
|
CodeMirror.version = "5.65.15";
|
|
10740
10750
|
return CodeMirror;
|
|
10741
10751
|
});
|
|
10742
|
-
})(codemirror$
|
|
10743
|
-
return codemirror$
|
|
10752
|
+
})(codemirror$2);
|
|
10753
|
+
return codemirror$2.exports;
|
|
10744
10754
|
}
|
|
10745
10755
|
var codemirrorExports = requireCodemirror();
|
|
10746
|
-
const codemirror = /* @__PURE__ */ getDefaultExportFromCjs(codemirrorExports);
|
|
10756
|
+
const codemirror$1 = /* @__PURE__ */ getDefaultExportFromCjs(codemirrorExports);
|
|
10757
|
+
const codemirror = "";
|
|
10747
10758
|
var css = { exports: {} };
|
|
10748
10759
|
(function(module, exports) {
|
|
10749
10760
|
(function(mod) {
|
|
@@ -10751,7 +10762,8 @@ var css = { exports: {} };
|
|
|
10751
10762
|
})(function(CodeMirror) {
|
|
10752
10763
|
CodeMirror.defineMode("css", function(config, parserConfig) {
|
|
10753
10764
|
var inline = parserConfig.inline;
|
|
10754
|
-
if (!parserConfig.propertyKeywords)
|
|
10765
|
+
if (!parserConfig.propertyKeywords)
|
|
10766
|
+
parserConfig = CodeMirror.resolveMode("text/css");
|
|
10755
10767
|
var indentUnit = config.indentUnit, tokenHooks = parserConfig.tokenHooks, documentTypes2 = parserConfig.documentTypes || {}, mediaTypes2 = parserConfig.mediaTypes || {}, mediaFeatures2 = parserConfig.mediaFeatures || {}, mediaValueKeywords2 = parserConfig.mediaValueKeywords || {}, propertyKeywords2 = parserConfig.propertyKeywords || {}, nonStandardPropertyKeywords2 = parserConfig.nonStandardPropertyKeywords || {}, fontProperties2 = parserConfig.fontProperties || {}, counterDescriptors2 = parserConfig.counterDescriptors || {}, colorKeywords2 = parserConfig.colorKeywords || {}, valueKeywords2 = parserConfig.valueKeywords || {}, allowNested = parserConfig.allowNested, lineComment = parserConfig.lineComment, supportsAtComponent = parserConfig.supportsAtComponent === true, highlightNonStandardPropertyKeywords = config.highlightNonStandardPropertyKeywords !== false;
|
|
10756
10768
|
var type, override;
|
|
10757
10769
|
function ret(style, tp) {
|
|
@@ -10762,7 +10774,8 @@ var css = { exports: {} };
|
|
|
10762
10774
|
var ch = stream.next();
|
|
10763
10775
|
if (tokenHooks[ch]) {
|
|
10764
10776
|
var result = tokenHooks[ch](stream, state);
|
|
10765
|
-
if (result !== false)
|
|
10777
|
+
if (result !== false)
|
|
10778
|
+
return result;
|
|
10766
10779
|
}
|
|
10767
10780
|
if (ch == "@") {
|
|
10768
10781
|
stream.eatWhile(/[\w\\\-]/);
|
|
@@ -10816,12 +10829,14 @@ var css = { exports: {} };
|
|
|
10816
10829
|
var escaped = false, ch;
|
|
10817
10830
|
while ((ch = stream.next()) != null) {
|
|
10818
10831
|
if (ch == quote && !escaped) {
|
|
10819
|
-
if (quote == ")")
|
|
10832
|
+
if (quote == ")")
|
|
10833
|
+
stream.backUp(1);
|
|
10820
10834
|
break;
|
|
10821
10835
|
}
|
|
10822
10836
|
escaped = !escaped && ch == "\\";
|
|
10823
10837
|
}
|
|
10824
|
-
if (ch == quote || !escaped && quote != ")")
|
|
10838
|
+
if (ch == quote || !escaped && quote != ")")
|
|
10839
|
+
state.tokenize = null;
|
|
10825
10840
|
return ret("string", "string");
|
|
10826
10841
|
};
|
|
10827
10842
|
}
|
|
@@ -10924,14 +10939,19 @@ var css = { exports: {} };
|
|
|
10924
10939
|
}
|
|
10925
10940
|
};
|
|
10926
10941
|
states.maybeprop = function(type2, stream, state) {
|
|
10927
|
-
if (type2 == ":")
|
|
10942
|
+
if (type2 == ":")
|
|
10943
|
+
return pushContext(state, stream, "prop");
|
|
10928
10944
|
return pass(type2, stream, state);
|
|
10929
10945
|
};
|
|
10930
10946
|
states.prop = function(type2, stream, state) {
|
|
10931
|
-
if (type2 == ";")
|
|
10932
|
-
|
|
10933
|
-
if (type2 == "
|
|
10934
|
-
|
|
10947
|
+
if (type2 == ";")
|
|
10948
|
+
return popContext(state);
|
|
10949
|
+
if (type2 == "{" && allowNested)
|
|
10950
|
+
return pushContext(state, stream, "propBlock");
|
|
10951
|
+
if (type2 == "}" || type2 == "{")
|
|
10952
|
+
return popAndPass(type2, stream, state);
|
|
10953
|
+
if (type2 == "(")
|
|
10954
|
+
return pushContext(state, stream, "parens");
|
|
10935
10955
|
if (type2 == "hash" && !/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(stream.current())) {
|
|
10936
10956
|
override += " error";
|
|
10937
10957
|
} else if (type2 == "word") {
|
|
@@ -10942,7 +10962,8 @@ var css = { exports: {} };
|
|
|
10942
10962
|
return "prop";
|
|
10943
10963
|
};
|
|
10944
10964
|
states.propBlock = function(type2, _stream, state) {
|
|
10945
|
-
if (type2 == "}")
|
|
10965
|
+
if (type2 == "}")
|
|
10966
|
+
return popContext(state);
|
|
10946
10967
|
if (type2 == "word") {
|
|
10947
10968
|
override = "property";
|
|
10948
10969
|
return "maybeprop";
|
|
@@ -10950,15 +10971,21 @@ var css = { exports: {} };
|
|
|
10950
10971
|
return state.context.type;
|
|
10951
10972
|
};
|
|
10952
10973
|
states.parens = function(type2, stream, state) {
|
|
10953
|
-
if (type2 == "{" || type2 == "}")
|
|
10954
|
-
|
|
10955
|
-
if (type2 == "
|
|
10956
|
-
|
|
10957
|
-
if (type2 == "
|
|
10974
|
+
if (type2 == "{" || type2 == "}")
|
|
10975
|
+
return popAndPass(type2, stream, state);
|
|
10976
|
+
if (type2 == ")")
|
|
10977
|
+
return popContext(state);
|
|
10978
|
+
if (type2 == "(")
|
|
10979
|
+
return pushContext(state, stream, "parens");
|
|
10980
|
+
if (type2 == "interpolation")
|
|
10981
|
+
return pushContext(state, stream, "interpolation");
|
|
10982
|
+
if (type2 == "word")
|
|
10983
|
+
wordAsValue(stream);
|
|
10958
10984
|
return "parens";
|
|
10959
10985
|
};
|
|
10960
10986
|
states.pseudo = function(type2, stream, state) {
|
|
10961
|
-
if (type2 == "meta")
|
|
10987
|
+
if (type2 == "meta")
|
|
10988
|
+
return "pseudo";
|
|
10962
10989
|
if (type2 == "word") {
|
|
10963
10990
|
override = "variable-3";
|
|
10964
10991
|
return state.context.type;
|
|
@@ -10974,10 +11001,14 @@ var css = { exports: {} };
|
|
|
10974
11001
|
}
|
|
10975
11002
|
};
|
|
10976
11003
|
states.atBlock = function(type2, stream, state) {
|
|
10977
|
-
if (type2 == "(")
|
|
10978
|
-
|
|
10979
|
-
if (type2 == "
|
|
10980
|
-
|
|
11004
|
+
if (type2 == "(")
|
|
11005
|
+
return pushContext(state, stream, "atBlock_parens");
|
|
11006
|
+
if (type2 == "}" || type2 == ";")
|
|
11007
|
+
return popAndPass(type2, stream, state);
|
|
11008
|
+
if (type2 == "{")
|
|
11009
|
+
return popContext(state) && pushContext(state, stream, allowNested ? "block" : "top");
|
|
11010
|
+
if (type2 == "interpolation")
|
|
11011
|
+
return pushContext(state, stream, "interpolation");
|
|
10981
11012
|
if (type2 == "word") {
|
|
10982
11013
|
var word = stream.current().toLowerCase();
|
|
10983
11014
|
if (word == "only" || word == "not" || word == "and" || word == "or")
|
|
@@ -11011,8 +11042,10 @@ var css = { exports: {} };
|
|
|
11011
11042
|
return state.context.type;
|
|
11012
11043
|
};
|
|
11013
11044
|
states.atBlock_parens = function(type2, stream, state) {
|
|
11014
|
-
if (type2 == ")")
|
|
11015
|
-
|
|
11045
|
+
if (type2 == ")")
|
|
11046
|
+
return popContext(state);
|
|
11047
|
+
if (type2 == "{" || type2 == "}")
|
|
11048
|
+
return popAndPass(type2, stream, state, 2);
|
|
11016
11049
|
return states.atBlock(type2, stream, state);
|
|
11017
11050
|
};
|
|
11018
11051
|
states.restricted_atBlock_before = function(type2, stream, state) {
|
|
@@ -11043,21 +11076,30 @@ var css = { exports: {} };
|
|
|
11043
11076
|
override = "variable";
|
|
11044
11077
|
return "keyframes";
|
|
11045
11078
|
}
|
|
11046
|
-
if (type2 == "{")
|
|
11079
|
+
if (type2 == "{")
|
|
11080
|
+
return pushContext(state, stream, "top");
|
|
11047
11081
|
return pass(type2, stream, state);
|
|
11048
11082
|
};
|
|
11049
11083
|
states.at = function(type2, stream, state) {
|
|
11050
|
-
if (type2 == ";")
|
|
11051
|
-
|
|
11052
|
-
if (type2 == "
|
|
11053
|
-
|
|
11084
|
+
if (type2 == ";")
|
|
11085
|
+
return popContext(state);
|
|
11086
|
+
if (type2 == "{" || type2 == "}")
|
|
11087
|
+
return popAndPass(type2, stream, state);
|
|
11088
|
+
if (type2 == "word")
|
|
11089
|
+
override = "tag";
|
|
11090
|
+
else if (type2 == "hash")
|
|
11091
|
+
override = "builtin";
|
|
11054
11092
|
return "at";
|
|
11055
11093
|
};
|
|
11056
11094
|
states.interpolation = function(type2, stream, state) {
|
|
11057
|
-
if (type2 == "}")
|
|
11058
|
-
|
|
11059
|
-
if (type2 == "
|
|
11060
|
-
|
|
11095
|
+
if (type2 == "}")
|
|
11096
|
+
return popContext(state);
|
|
11097
|
+
if (type2 == "{" || type2 == ";")
|
|
11098
|
+
return popAndPass(type2, stream, state);
|
|
11099
|
+
if (type2 == "word")
|
|
11100
|
+
override = "variable";
|
|
11101
|
+
else if (type2 != "variable" && type2 != "(" && type2 != ")")
|
|
11102
|
+
override = "error";
|
|
11061
11103
|
return "interpolation";
|
|
11062
11104
|
};
|
|
11063
11105
|
return {
|
|
@@ -11070,7 +11112,8 @@ var css = { exports: {} };
|
|
|
11070
11112
|
};
|
|
11071
11113
|
},
|
|
11072
11114
|
token: function(stream, state) {
|
|
11073
|
-
if (!state.tokenize && stream.eatSpace())
|
|
11115
|
+
if (!state.tokenize && stream.eatSpace())
|
|
11116
|
+
return null;
|
|
11074
11117
|
var style = (state.tokenize || tokenBase)(stream, state);
|
|
11075
11118
|
if (style && typeof style == "object") {
|
|
11076
11119
|
type = style[1];
|
|
@@ -11084,7 +11127,8 @@ var css = { exports: {} };
|
|
|
11084
11127
|
indent: function(state, textAfter) {
|
|
11085
11128
|
var cx = state.context, ch = textAfter && textAfter.charAt(0);
|
|
11086
11129
|
var indent = cx.indent;
|
|
11087
|
-
if (cx.type == "prop" && (ch == "}" || ch == ")"))
|
|
11130
|
+
if (cx.type == "prop" && (ch == "}" || ch == ")"))
|
|
11131
|
+
cx = cx.prev;
|
|
11088
11132
|
if (cx.prev) {
|
|
11089
11133
|
if (ch == "}" && (cx.type == "block" || cx.type == "top" || cx.type == "interpolation" || cx.type == "restricted_atBlock")) {
|
|
11090
11134
|
cx = cx.prev;
|
|
@@ -12413,7 +12457,8 @@ var css = { exports: {} };
|
|
|
12413
12457
|
valueKeywords,
|
|
12414
12458
|
tokenHooks: {
|
|
12415
12459
|
"/": function(stream, state) {
|
|
12416
|
-
if (!stream.eat("*"))
|
|
12460
|
+
if (!stream.eat("*"))
|
|
12461
|
+
return false;
|
|
12417
12462
|
state.tokenize = tokenCComment;
|
|
12418
12463
|
return tokenCComment(stream, state);
|
|
12419
12464
|
}
|
|
@@ -12455,7 +12500,8 @@ var css = { exports: {} };
|
|
|
12455
12500
|
return ["variable-2", "variable"];
|
|
12456
12501
|
},
|
|
12457
12502
|
"#": function(stream) {
|
|
12458
|
-
if (!stream.eat("{"))
|
|
12503
|
+
if (!stream.eat("{"))
|
|
12504
|
+
return false;
|
|
12459
12505
|
return [null, "interpolation"];
|
|
12460
12506
|
}
|
|
12461
12507
|
},
|
|
@@ -12486,8 +12532,10 @@ var css = { exports: {} };
|
|
|
12486
12532
|
}
|
|
12487
12533
|
},
|
|
12488
12534
|
"@": function(stream) {
|
|
12489
|
-
if (stream.eat("{"))
|
|
12490
|
-
|
|
12535
|
+
if (stream.eat("{"))
|
|
12536
|
+
return [null, "interpolation"];
|
|
12537
|
+
if (stream.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i, false))
|
|
12538
|
+
return false;
|
|
12491
12539
|
stream.eatWhile(/[\w\\\-]/);
|
|
12492
12540
|
if (stream.match(/^\s*:/, false))
|
|
12493
12541
|
return ["variable-2", "variable-definition"];
|
|
@@ -12513,7 +12561,8 @@ var css = { exports: {} };
|
|
|
12513
12561
|
supportsAtComponent: true,
|
|
12514
12562
|
tokenHooks: {
|
|
12515
12563
|
"/": function(stream, state) {
|
|
12516
|
-
if (!stream.eat("*"))
|
|
12564
|
+
if (!stream.eat("*"))
|
|
12565
|
+
return false;
|
|
12517
12566
|
state.tokenize = tokenCComment;
|
|
12518
12567
|
return tokenCComment(stream, state);
|
|
12519
12568
|
}
|
|
@@ -12527,7 +12576,8 @@ var cssExports = css.exports;
|
|
|
12527
12576
|
var xml = { exports: {} };
|
|
12528
12577
|
var hasRequiredXml;
|
|
12529
12578
|
function requireXml() {
|
|
12530
|
-
if (hasRequiredXml)
|
|
12579
|
+
if (hasRequiredXml)
|
|
12580
|
+
return xml.exports;
|
|
12531
12581
|
hasRequiredXml = 1;
|
|
12532
12582
|
(function(module, exports) {
|
|
12533
12583
|
(function(mod) {
|
|
@@ -12631,8 +12681,10 @@ function requireXml() {
|
|
|
12631
12681
|
var indentUnit = editorConf.indentUnit;
|
|
12632
12682
|
var config = {};
|
|
12633
12683
|
var defaults = config_.htmlMode ? htmlConfig : xmlConfig;
|
|
12634
|
-
for (var prop in defaults)
|
|
12635
|
-
|
|
12684
|
+
for (var prop in defaults)
|
|
12685
|
+
config[prop] = defaults[prop];
|
|
12686
|
+
for (var prop in config_)
|
|
12687
|
+
config[prop] = config_[prop];
|
|
12636
12688
|
var type, setStyle;
|
|
12637
12689
|
function inText(stream, state) {
|
|
12638
12690
|
function chain(parser) {
|
|
@@ -12643,8 +12695,10 @@ function requireXml() {
|
|
|
12643
12695
|
if (ch == "<") {
|
|
12644
12696
|
if (stream.eat("!")) {
|
|
12645
12697
|
if (stream.eat("[")) {
|
|
12646
|
-
if (stream.match("CDATA["))
|
|
12647
|
-
|
|
12698
|
+
if (stream.match("CDATA["))
|
|
12699
|
+
return chain(inBlock("atom", "]]>"));
|
|
12700
|
+
else
|
|
12701
|
+
return null;
|
|
12648
12702
|
} else if (stream.match("--")) {
|
|
12649
12703
|
return chain(inBlock("comment", "-->"));
|
|
12650
12704
|
} else if (stream.match("DOCTYPE", true, true)) {
|
|
@@ -12761,7 +12815,8 @@ function requireXml() {
|
|
|
12761
12815
|
this.noIndent = true;
|
|
12762
12816
|
}
|
|
12763
12817
|
function popContext(state) {
|
|
12764
|
-
if (state.context)
|
|
12818
|
+
if (state.context)
|
|
12819
|
+
state.context = state.context.prev;
|
|
12765
12820
|
}
|
|
12766
12821
|
function maybePopContext(state, nextTagName) {
|
|
12767
12822
|
var parentTagName;
|
|
@@ -12850,12 +12905,15 @@ function requireXml() {
|
|
|
12850
12905
|
return attrState;
|
|
12851
12906
|
}
|
|
12852
12907
|
function attrEqState(type2, stream, state) {
|
|
12853
|
-
if (type2 == "equals")
|
|
12854
|
-
|
|
12908
|
+
if (type2 == "equals")
|
|
12909
|
+
return attrValueState;
|
|
12910
|
+
if (!config.allowMissing)
|
|
12911
|
+
setStyle = "error";
|
|
12855
12912
|
return attrState(type2, stream, state);
|
|
12856
12913
|
}
|
|
12857
12914
|
function attrValueState(type2, stream, state) {
|
|
12858
|
-
if (type2 == "string")
|
|
12915
|
+
if (type2 == "string")
|
|
12916
|
+
return attrContinuedState;
|
|
12859
12917
|
if (type2 == "word" && config.allowUnquoted) {
|
|
12860
12918
|
setStyle = "string";
|
|
12861
12919
|
return attrState;
|
|
@@ -12864,7 +12922,8 @@ function requireXml() {
|
|
|
12864
12922
|
return attrState(type2, stream, state);
|
|
12865
12923
|
}
|
|
12866
12924
|
function attrContinuedState(type2, stream, state) {
|
|
12867
|
-
if (type2 == "string")
|
|
12925
|
+
if (type2 == "string")
|
|
12926
|
+
return attrContinuedState;
|
|
12868
12927
|
return attrState(type2, stream, state);
|
|
12869
12928
|
}
|
|
12870
12929
|
return {
|
|
@@ -12877,13 +12936,15 @@ function requireXml() {
|
|
|
12877
12936
|
tagStart: null,
|
|
12878
12937
|
context: null
|
|
12879
12938
|
};
|
|
12880
|
-
if (baseIndent != null)
|
|
12939
|
+
if (baseIndent != null)
|
|
12940
|
+
state.baseIndent = baseIndent;
|
|
12881
12941
|
return state;
|
|
12882
12942
|
},
|
|
12883
12943
|
token: function(stream, state) {
|
|
12884
12944
|
if (!state.tagName && stream.sol())
|
|
12885
12945
|
state.indented = stream.indentation();
|
|
12886
|
-
if (stream.eatSpace())
|
|
12946
|
+
if (stream.eatSpace())
|
|
12947
|
+
return null;
|
|
12887
12948
|
type = null;
|
|
12888
12949
|
var style = state.tokenize(stream, state);
|
|
12889
12950
|
if ((style || type) && style != "comment") {
|
|
@@ -12902,7 +12963,8 @@ function requireXml() {
|
|
|
12902
12963
|
else
|
|
12903
12964
|
return state.indented + indentUnit;
|
|
12904
12965
|
}
|
|
12905
|
-
if (context && context.noIndent)
|
|
12966
|
+
if (context && context.noIndent)
|
|
12967
|
+
return CodeMirror.Pass;
|
|
12906
12968
|
if (state.tokenize != inTag && state.tokenize != inText)
|
|
12907
12969
|
return fullLine ? fullLine.match(/^(\s*)/)[0].length : 0;
|
|
12908
12970
|
if (state.tagName) {
|
|
@@ -12911,7 +12973,8 @@ function requireXml() {
|
|
|
12911
12973
|
else
|
|
12912
12974
|
return state.tagStart + indentUnit * (config.multilineTagIndentFactor || 1);
|
|
12913
12975
|
}
|
|
12914
|
-
if (config.alignCDATA && /<!\[CDATA\[/.test(textAfter))
|
|
12976
|
+
if (config.alignCDATA && /<!\[CDATA\[/.test(textAfter))
|
|
12977
|
+
return 0;
|
|
12915
12978
|
var tagAfter = textAfter && /^<(\/)?([\w_:\.-]*)/.exec(textAfter);
|
|
12916
12979
|
if (tagAfter && tagAfter[1]) {
|
|
12917
12980
|
while (context) {
|
|
@@ -12935,8 +12998,10 @@ function requireXml() {
|
|
|
12935
12998
|
}
|
|
12936
12999
|
while (context && context.prev && !context.startOfLine)
|
|
12937
13000
|
context = context.prev;
|
|
12938
|
-
if (context)
|
|
12939
|
-
|
|
13001
|
+
if (context)
|
|
13002
|
+
return context.indent + indentUnit;
|
|
13003
|
+
else
|
|
13004
|
+
return state.baseIndent || 0;
|
|
12940
13005
|
},
|
|
12941
13006
|
electricInput: /<\/[\s\w:]+>$/,
|
|
12942
13007
|
blockCommentStart: "<!--",
|
|
@@ -13035,9 +13100,12 @@ var javascript = { exports: {} };
|
|
|
13035
13100
|
var escaped = false, next, inSet = false;
|
|
13036
13101
|
while ((next = stream.next()) != null) {
|
|
13037
13102
|
if (!escaped) {
|
|
13038
|
-
if (next == "/" && !inSet)
|
|
13039
|
-
|
|
13040
|
-
|
|
13103
|
+
if (next == "/" && !inSet)
|
|
13104
|
+
return;
|
|
13105
|
+
if (next == "[")
|
|
13106
|
+
inSet = true;
|
|
13107
|
+
else if (inSet && next == "]")
|
|
13108
|
+
inSet = false;
|
|
13041
13109
|
}
|
|
13042
13110
|
escaped = !escaped && next == "\\";
|
|
13043
13111
|
}
|
|
@@ -13095,13 +13163,16 @@ var javascript = { exports: {} };
|
|
|
13095
13163
|
} else if (isOperatorChar.test(ch)) {
|
|
13096
13164
|
if (ch != ">" || !state.lexical || state.lexical.type != ">") {
|
|
13097
13165
|
if (stream.eat("=")) {
|
|
13098
|
-
if (ch == "!" || ch == "=")
|
|
13166
|
+
if (ch == "!" || ch == "=")
|
|
13167
|
+
stream.eat("=");
|
|
13099
13168
|
} else if (/[<>*+\-|&?]/.test(ch)) {
|
|
13100
13169
|
stream.eat(ch);
|
|
13101
|
-
if (ch == ">")
|
|
13170
|
+
if (ch == ">")
|
|
13171
|
+
stream.eat(ch);
|
|
13102
13172
|
}
|
|
13103
13173
|
}
|
|
13104
|
-
if (ch == "?" && stream.eat("."))
|
|
13174
|
+
if (ch == "?" && stream.eat("."))
|
|
13175
|
+
return ret(".");
|
|
13105
13176
|
return ret("operator", "operator", stream.current());
|
|
13106
13177
|
} else if (wordRE.test(ch)) {
|
|
13107
13178
|
stream.eatWhile(wordRE);
|
|
@@ -13125,10 +13196,12 @@ var javascript = { exports: {} };
|
|
|
13125
13196
|
return ret("jsonld-keyword", "meta");
|
|
13126
13197
|
}
|
|
13127
13198
|
while ((next = stream.next()) != null) {
|
|
13128
|
-
if (next == quote && !escaped)
|
|
13199
|
+
if (next == quote && !escaped)
|
|
13200
|
+
break;
|
|
13129
13201
|
escaped = !escaped && next == "\\";
|
|
13130
13202
|
}
|
|
13131
|
-
if (!escaped)
|
|
13203
|
+
if (!escaped)
|
|
13204
|
+
state.tokenize = tokenBase;
|
|
13132
13205
|
return ret("string", "string");
|
|
13133
13206
|
};
|
|
13134
13207
|
}
|
|
@@ -13156,12 +13229,15 @@ var javascript = { exports: {} };
|
|
|
13156
13229
|
}
|
|
13157
13230
|
var brackets = "([{}])";
|
|
13158
13231
|
function findFatArrow(stream, state) {
|
|
13159
|
-
if (state.fatArrowAt)
|
|
13232
|
+
if (state.fatArrowAt)
|
|
13233
|
+
state.fatArrowAt = null;
|
|
13160
13234
|
var arrow = stream.string.indexOf("=>", stream.start);
|
|
13161
|
-
if (arrow < 0)
|
|
13235
|
+
if (arrow < 0)
|
|
13236
|
+
return;
|
|
13162
13237
|
if (isTS) {
|
|
13163
13238
|
var m = /:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(stream.string.slice(stream.start, arrow));
|
|
13164
|
-
if (m)
|
|
13239
|
+
if (m)
|
|
13240
|
+
arrow = m.index;
|
|
13165
13241
|
}
|
|
13166
13242
|
var depth = 0, sawSomething = false;
|
|
13167
13243
|
for (var pos = arrow - 1; pos >= 0; --pos) {
|
|
@@ -13173,7 +13249,8 @@ var javascript = { exports: {} };
|
|
|
13173
13249
|
break;
|
|
13174
13250
|
}
|
|
13175
13251
|
if (--depth == 0) {
|
|
13176
|
-
if (ch == "(")
|
|
13252
|
+
if (ch == "(")
|
|
13253
|
+
sawSomething = true;
|
|
13177
13254
|
break;
|
|
13178
13255
|
}
|
|
13179
13256
|
} else if (bracket >= 3 && bracket < 6) {
|
|
@@ -13182,7 +13259,8 @@ var javascript = { exports: {} };
|
|
|
13182
13259
|
sawSomething = true;
|
|
13183
13260
|
} else if (/["'\/`]/.test(ch)) {
|
|
13184
13261
|
for (; ; --pos) {
|
|
13185
|
-
if (pos == 0)
|
|
13262
|
+
if (pos == 0)
|
|
13263
|
+
return;
|
|
13186
13264
|
var next = stream.string.charAt(pos - 1);
|
|
13187
13265
|
if (next == ch && stream.string.charAt(pos - 2) != "\\") {
|
|
13188
13266
|
pos--;
|
|
@@ -13194,7 +13272,8 @@ var javascript = { exports: {} };
|
|
|
13194
13272
|
break;
|
|
13195
13273
|
}
|
|
13196
13274
|
}
|
|
13197
|
-
if (sawSomething && !depth)
|
|
13275
|
+
if (sawSomething && !depth)
|
|
13276
|
+
state.fatArrowAt = pos;
|
|
13198
13277
|
}
|
|
13199
13278
|
var atomicTypes = {
|
|
13200
13279
|
"atom": true,
|
|
@@ -13212,15 +13291,19 @@ var javascript = { exports: {} };
|
|
|
13212
13291
|
this.type = type2;
|
|
13213
13292
|
this.prev = prev;
|
|
13214
13293
|
this.info = info;
|
|
13215
|
-
if (align != null)
|
|
13294
|
+
if (align != null)
|
|
13295
|
+
this.align = align;
|
|
13216
13296
|
}
|
|
13217
13297
|
function inScope(state, varname) {
|
|
13218
|
-
if (!trackScope)
|
|
13298
|
+
if (!trackScope)
|
|
13299
|
+
return false;
|
|
13219
13300
|
for (var v = state.localVars; v; v = v.next)
|
|
13220
|
-
if (v.name == varname)
|
|
13301
|
+
if (v.name == varname)
|
|
13302
|
+
return true;
|
|
13221
13303
|
for (var cx2 = state.context; cx2; cx2 = cx2.prev) {
|
|
13222
13304
|
for (var v = cx2.vars; v; v = v.next)
|
|
13223
|
-
if (v.name == varname)
|
|
13305
|
+
if (v.name == varname)
|
|
13306
|
+
return true;
|
|
13224
13307
|
}
|
|
13225
13308
|
}
|
|
13226
13309
|
function parseJS(state, style, type2, content2, stream) {
|
|
@@ -13236,28 +13319,34 @@ var javascript = { exports: {} };
|
|
|
13236
13319
|
if (combinator(type2, content2)) {
|
|
13237
13320
|
while (cc.length && cc[cc.length - 1].lex)
|
|
13238
13321
|
cc.pop()();
|
|
13239
|
-
if (cx.marked)
|
|
13240
|
-
|
|
13322
|
+
if (cx.marked)
|
|
13323
|
+
return cx.marked;
|
|
13324
|
+
if (type2 == "variable" && inScope(state, content2))
|
|
13325
|
+
return "variable-2";
|
|
13241
13326
|
return style;
|
|
13242
13327
|
}
|
|
13243
13328
|
}
|
|
13244
13329
|
}
|
|
13245
13330
|
var cx = { state: null, column: null, marked: null, cc: null };
|
|
13246
13331
|
function pass() {
|
|
13247
|
-
for (var i = arguments.length - 1; i >= 0; i--)
|
|
13332
|
+
for (var i = arguments.length - 1; i >= 0; i--)
|
|
13333
|
+
cx.cc.push(arguments[i]);
|
|
13248
13334
|
}
|
|
13249
13335
|
function cont() {
|
|
13250
13336
|
pass.apply(null, arguments);
|
|
13251
13337
|
return true;
|
|
13252
13338
|
}
|
|
13253
13339
|
function inList(name, list) {
|
|
13254
|
-
for (var v = list; v; v = v.next)
|
|
13340
|
+
for (var v = list; v; v = v.next)
|
|
13341
|
+
if (v.name == name)
|
|
13342
|
+
return true;
|
|
13255
13343
|
return false;
|
|
13256
13344
|
}
|
|
13257
13345
|
function register(varname) {
|
|
13258
13346
|
var state = cx.state;
|
|
13259
13347
|
cx.marked = "def";
|
|
13260
|
-
if (!trackScope)
|
|
13348
|
+
if (!trackScope)
|
|
13349
|
+
return;
|
|
13261
13350
|
if (state.context) {
|
|
13262
13351
|
if (state.lexical.info == "var" && state.context && state.context.block) {
|
|
13263
13352
|
var newContext = registerVarScoped(varname, state.context);
|
|
@@ -13278,8 +13367,10 @@ var javascript = { exports: {} };
|
|
|
13278
13367
|
return null;
|
|
13279
13368
|
} else if (context.block) {
|
|
13280
13369
|
var inner = registerVarScoped(varname, context.prev);
|
|
13281
|
-
if (!inner)
|
|
13282
|
-
|
|
13370
|
+
if (!inner)
|
|
13371
|
+
return null;
|
|
13372
|
+
if (inner == context.prev)
|
|
13373
|
+
return context;
|
|
13283
13374
|
return new Context(inner, context.vars, true);
|
|
13284
13375
|
} else if (inList(varname, context.vars)) {
|
|
13285
13376
|
return context;
|
|
@@ -13317,9 +13408,11 @@ var javascript = { exports: {} };
|
|
|
13317
13408
|
function pushlex(type2, info) {
|
|
13318
13409
|
var result = function() {
|
|
13319
13410
|
var state = cx.state, indent = state.indented;
|
|
13320
|
-
if (state.lexical.type == "stat")
|
|
13321
|
-
|
|
13322
|
-
|
|
13411
|
+
if (state.lexical.type == "stat")
|
|
13412
|
+
indent = state.lexical.indented;
|
|
13413
|
+
else
|
|
13414
|
+
for (var outer = state.lexical; outer && outer.type == ")" && outer.align; outer = outer.prev)
|
|
13415
|
+
indent = outer.indented;
|
|
13323
13416
|
state.lexical = new JSLexical(indent, cx.stream.column(), type2, null, state.lexical, info);
|
|
13324
13417
|
};
|
|
13325
13418
|
result.lex = true;
|
|
@@ -13336,27 +13429,39 @@ var javascript = { exports: {} };
|
|
|
13336
13429
|
poplex.lex = true;
|
|
13337
13430
|
function expect(wanted) {
|
|
13338
13431
|
function exp(type2) {
|
|
13339
|
-
if (type2 == wanted)
|
|
13340
|
-
|
|
13341
|
-
else
|
|
13432
|
+
if (type2 == wanted)
|
|
13433
|
+
return cont();
|
|
13434
|
+
else if (wanted == ";" || type2 == "}" || type2 == ")" || type2 == "]")
|
|
13435
|
+
return pass();
|
|
13436
|
+
else
|
|
13437
|
+
return cont(exp);
|
|
13342
13438
|
}
|
|
13343
13439
|
return exp;
|
|
13344
13440
|
}
|
|
13345
13441
|
function statement(type2, value) {
|
|
13346
|
-
if (type2 == "var")
|
|
13347
|
-
|
|
13348
|
-
if (type2 == "keyword
|
|
13349
|
-
|
|
13350
|
-
if (type2 == "
|
|
13351
|
-
|
|
13352
|
-
if (type2 == "
|
|
13442
|
+
if (type2 == "var")
|
|
13443
|
+
return cont(pushlex("vardef", value), vardef, expect(";"), poplex);
|
|
13444
|
+
if (type2 == "keyword a")
|
|
13445
|
+
return cont(pushlex("form"), parenExpr, statement, poplex);
|
|
13446
|
+
if (type2 == "keyword b")
|
|
13447
|
+
return cont(pushlex("form"), statement, poplex);
|
|
13448
|
+
if (type2 == "keyword d")
|
|
13449
|
+
return cx.stream.match(/^\s*$/, false) ? cont() : cont(pushlex("stat"), maybeexpression, expect(";"), poplex);
|
|
13450
|
+
if (type2 == "debugger")
|
|
13451
|
+
return cont(expect(";"));
|
|
13452
|
+
if (type2 == "{")
|
|
13453
|
+
return cont(pushlex("}"), pushblockcontext, block, poplex, popcontext);
|
|
13454
|
+
if (type2 == ";")
|
|
13455
|
+
return cont();
|
|
13353
13456
|
if (type2 == "if") {
|
|
13354
13457
|
if (cx.state.lexical.info == "else" && cx.state.cc[cx.state.cc.length - 1] == poplex)
|
|
13355
13458
|
cx.state.cc.pop()();
|
|
13356
13459
|
return cont(pushlex("form"), parenExpr, statement, poplex, maybeelse);
|
|
13357
13460
|
}
|
|
13358
|
-
if (type2 == "function")
|
|
13359
|
-
|
|
13461
|
+
if (type2 == "function")
|
|
13462
|
+
return cont(functiondef);
|
|
13463
|
+
if (type2 == "for")
|
|
13464
|
+
return cont(pushlex("form"), pushblockcontext, forspec, statement, popcontext, poplex);
|
|
13360
13465
|
if (type2 == "class" || isTS && value == "interface") {
|
|
13361
13466
|
cx.marked = "keyword";
|
|
13362
13467
|
return cont(pushlex("form", type2 == "class" ? type2 : value), className, poplex);
|
|
@@ -13367,9 +13472,12 @@ var javascript = { exports: {} };
|
|
|
13367
13472
|
return cont(statement);
|
|
13368
13473
|
} else if (isTS && (value == "module" || value == "enum" || value == "type") && cx.stream.match(/^\s*\w/, false)) {
|
|
13369
13474
|
cx.marked = "keyword";
|
|
13370
|
-
if (value == "enum")
|
|
13371
|
-
|
|
13372
|
-
else
|
|
13475
|
+
if (value == "enum")
|
|
13476
|
+
return cont(enumdef);
|
|
13477
|
+
else if (value == "type")
|
|
13478
|
+
return cont(typename, expect("operator"), typeexpr, expect(";"));
|
|
13479
|
+
else
|
|
13480
|
+
return cont(pushlex("form"), pattern, expect("{"), pushlex("}"), block, poplex, poplex);
|
|
13373
13481
|
} else if (isTS && value == "namespace") {
|
|
13374
13482
|
cx.marked = "keyword";
|
|
13375
13483
|
return cont(pushlex("form"), expression, statement, poplex);
|
|
@@ -13380,28 +13488,37 @@ var javascript = { exports: {} };
|
|
|
13380
13488
|
return cont(pushlex("stat"), maybelabel);
|
|
13381
13489
|
}
|
|
13382
13490
|
}
|
|
13383
|
-
if (type2 == "switch")
|
|
13384
|
-
|
|
13385
|
-
|
|
13386
|
-
|
|
13387
|
-
|
|
13388
|
-
|
|
13389
|
-
|
|
13390
|
-
|
|
13391
|
-
|
|
13392
|
-
|
|
13393
|
-
|
|
13394
|
-
|
|
13395
|
-
if (type2 == "
|
|
13396
|
-
|
|
13397
|
-
if (type2 == "
|
|
13398
|
-
|
|
13399
|
-
if (type2 == "
|
|
13400
|
-
|
|
13491
|
+
if (type2 == "switch")
|
|
13492
|
+
return cont(
|
|
13493
|
+
pushlex("form"),
|
|
13494
|
+
parenExpr,
|
|
13495
|
+
expect("{"),
|
|
13496
|
+
pushlex("}", "switch"),
|
|
13497
|
+
pushblockcontext,
|
|
13498
|
+
block,
|
|
13499
|
+
poplex,
|
|
13500
|
+
poplex,
|
|
13501
|
+
popcontext
|
|
13502
|
+
);
|
|
13503
|
+
if (type2 == "case")
|
|
13504
|
+
return cont(expression, expect(":"));
|
|
13505
|
+
if (type2 == "default")
|
|
13506
|
+
return cont(expect(":"));
|
|
13507
|
+
if (type2 == "catch")
|
|
13508
|
+
return cont(pushlex("form"), pushcontext, maybeCatchBinding, statement, poplex, popcontext);
|
|
13509
|
+
if (type2 == "export")
|
|
13510
|
+
return cont(pushlex("stat"), afterExport, poplex);
|
|
13511
|
+
if (type2 == "import")
|
|
13512
|
+
return cont(pushlex("stat"), afterImport, poplex);
|
|
13513
|
+
if (type2 == "async")
|
|
13514
|
+
return cont(statement);
|
|
13515
|
+
if (value == "@")
|
|
13516
|
+
return cont(expression, statement);
|
|
13401
13517
|
return pass(pushlex("stat"), expression, expect(";"), poplex);
|
|
13402
13518
|
}
|
|
13403
13519
|
function maybeCatchBinding(type2) {
|
|
13404
|
-
if (type2 == "(")
|
|
13520
|
+
if (type2 == "(")
|
|
13521
|
+
return cont(funarg, expect(")"));
|
|
13405
13522
|
}
|
|
13406
13523
|
function expression(type2, value) {
|
|
13407
13524
|
return expressionInner(type2, value, false);
|
|
@@ -13410,57 +13527,78 @@ var javascript = { exports: {} };
|
|
|
13410
13527
|
return expressionInner(type2, value, true);
|
|
13411
13528
|
}
|
|
13412
13529
|
function parenExpr(type2) {
|
|
13413
|
-
if (type2 != "(")
|
|
13530
|
+
if (type2 != "(")
|
|
13531
|
+
return pass();
|
|
13414
13532
|
return cont(pushlex(")"), maybeexpression, expect(")"), poplex);
|
|
13415
13533
|
}
|
|
13416
13534
|
function expressionInner(type2, value, noComma) {
|
|
13417
13535
|
if (cx.state.fatArrowAt == cx.stream.start) {
|
|
13418
13536
|
var body = noComma ? arrowBodyNoComma : arrowBody;
|
|
13419
|
-
if (type2 == "(")
|
|
13420
|
-
|
|
13537
|
+
if (type2 == "(")
|
|
13538
|
+
return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, expect("=>"), body, popcontext);
|
|
13539
|
+
else if (type2 == "variable")
|
|
13540
|
+
return pass(pushcontext, pattern, expect("=>"), body, popcontext);
|
|
13421
13541
|
}
|
|
13422
13542
|
var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma;
|
|
13423
|
-
if (atomicTypes.hasOwnProperty(type2))
|
|
13424
|
-
|
|
13543
|
+
if (atomicTypes.hasOwnProperty(type2))
|
|
13544
|
+
return cont(maybeop);
|
|
13545
|
+
if (type2 == "function")
|
|
13546
|
+
return cont(functiondef, maybeop);
|
|
13425
13547
|
if (type2 == "class" || isTS && value == "interface") {
|
|
13426
13548
|
cx.marked = "keyword";
|
|
13427
13549
|
return cont(pushlex("form"), classExpression, poplex);
|
|
13428
13550
|
}
|
|
13429
|
-
if (type2 == "keyword c" || type2 == "async")
|
|
13430
|
-
|
|
13431
|
-
if (type2 == "
|
|
13432
|
-
|
|
13433
|
-
if (type2 == "
|
|
13434
|
-
|
|
13435
|
-
if (type2 == "
|
|
13551
|
+
if (type2 == "keyword c" || type2 == "async")
|
|
13552
|
+
return cont(noComma ? expressionNoComma : expression);
|
|
13553
|
+
if (type2 == "(")
|
|
13554
|
+
return cont(pushlex(")"), maybeexpression, expect(")"), poplex, maybeop);
|
|
13555
|
+
if (type2 == "operator" || type2 == "spread")
|
|
13556
|
+
return cont(noComma ? expressionNoComma : expression);
|
|
13557
|
+
if (type2 == "[")
|
|
13558
|
+
return cont(pushlex("]"), arrayLiteral, poplex, maybeop);
|
|
13559
|
+
if (type2 == "{")
|
|
13560
|
+
return contCommasep(objprop, "}", null, maybeop);
|
|
13561
|
+
if (type2 == "quasi")
|
|
13562
|
+
return pass(quasi, maybeop);
|
|
13563
|
+
if (type2 == "new")
|
|
13564
|
+
return cont(maybeTarget(noComma));
|
|
13436
13565
|
return cont();
|
|
13437
13566
|
}
|
|
13438
13567
|
function maybeexpression(type2) {
|
|
13439
|
-
if (type2.match(/[;\}\)\],]/))
|
|
13568
|
+
if (type2.match(/[;\}\)\],]/))
|
|
13569
|
+
return pass();
|
|
13440
13570
|
return pass(expression);
|
|
13441
13571
|
}
|
|
13442
13572
|
function maybeoperatorComma(type2, value) {
|
|
13443
|
-
if (type2 == ",")
|
|
13573
|
+
if (type2 == ",")
|
|
13574
|
+
return cont(maybeexpression);
|
|
13444
13575
|
return maybeoperatorNoComma(type2, value, false);
|
|
13445
13576
|
}
|
|
13446
13577
|
function maybeoperatorNoComma(type2, value, noComma) {
|
|
13447
13578
|
var me = noComma == false ? maybeoperatorComma : maybeoperatorNoComma;
|
|
13448
13579
|
var expr = noComma == false ? expression : expressionNoComma;
|
|
13449
|
-
if (type2 == "=>")
|
|
13580
|
+
if (type2 == "=>")
|
|
13581
|
+
return cont(pushcontext, noComma ? arrowBodyNoComma : arrowBody, popcontext);
|
|
13450
13582
|
if (type2 == "operator") {
|
|
13451
|
-
if (/\+\+|--/.test(value) || isTS && value == "!")
|
|
13583
|
+
if (/\+\+|--/.test(value) || isTS && value == "!")
|
|
13584
|
+
return cont(me);
|
|
13452
13585
|
if (isTS && value == "<" && cx.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/, false))
|
|
13453
13586
|
return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, me);
|
|
13454
|
-
if (value == "?")
|
|
13587
|
+
if (value == "?")
|
|
13588
|
+
return cont(expression, expect(":"), expr);
|
|
13455
13589
|
return cont(expr);
|
|
13456
13590
|
}
|
|
13457
13591
|
if (type2 == "quasi") {
|
|
13458
13592
|
return pass(quasi, me);
|
|
13459
13593
|
}
|
|
13460
|
-
if (type2 == ";")
|
|
13461
|
-
|
|
13462
|
-
if (type2 == "
|
|
13463
|
-
|
|
13594
|
+
if (type2 == ";")
|
|
13595
|
+
return;
|
|
13596
|
+
if (type2 == "(")
|
|
13597
|
+
return contCommasep(expressionNoComma, ")", "call", me);
|
|
13598
|
+
if (type2 == ".")
|
|
13599
|
+
return cont(property, me);
|
|
13600
|
+
if (type2 == "[")
|
|
13601
|
+
return cont(pushlex("]"), maybeexpression, expect("]"), poplex, me);
|
|
13464
13602
|
if (isTS && value == "as") {
|
|
13465
13603
|
cx.marked = "keyword";
|
|
13466
13604
|
return cont(typeexpr, me);
|
|
@@ -13472,8 +13610,10 @@ var javascript = { exports: {} };
|
|
|
13472
13610
|
}
|
|
13473
13611
|
}
|
|
13474
13612
|
function quasi(type2, value) {
|
|
13475
|
-
if (type2 != "quasi")
|
|
13476
|
-
|
|
13613
|
+
if (type2 != "quasi")
|
|
13614
|
+
return pass();
|
|
13615
|
+
if (value.slice(value.length - 2) != "${")
|
|
13616
|
+
return cont(quasi);
|
|
13477
13617
|
return cont(maybeexpression, continueQuasi);
|
|
13478
13618
|
}
|
|
13479
13619
|
function continueQuasi(type2) {
|
|
@@ -13493,9 +13633,12 @@ var javascript = { exports: {} };
|
|
|
13493
13633
|
}
|
|
13494
13634
|
function maybeTarget(noComma) {
|
|
13495
13635
|
return function(type2) {
|
|
13496
|
-
if (type2 == ".")
|
|
13497
|
-
|
|
13498
|
-
else
|
|
13636
|
+
if (type2 == ".")
|
|
13637
|
+
return cont(noComma ? targetNoComma : target);
|
|
13638
|
+
else if (type2 == "variable" && isTS)
|
|
13639
|
+
return cont(maybeTypeArgs, noComma ? maybeoperatorNoComma : maybeoperatorComma);
|
|
13640
|
+
else
|
|
13641
|
+
return pass(noComma ? expressionNoComma : expression);
|
|
13499
13642
|
};
|
|
13500
13643
|
}
|
|
13501
13644
|
function target(_, value) {
|
|
@@ -13511,7 +13654,8 @@ var javascript = { exports: {} };
|
|
|
13511
13654
|
}
|
|
13512
13655
|
}
|
|
13513
13656
|
function maybelabel(type2) {
|
|
13514
|
-
if (type2 == ":")
|
|
13657
|
+
if (type2 == ":")
|
|
13658
|
+
return cont(poplex, statement);
|
|
13515
13659
|
return pass(maybeoperatorComma, expect(";"), poplex);
|
|
13516
13660
|
}
|
|
13517
13661
|
function property(type2) {
|
|
@@ -13526,7 +13670,8 @@ var javascript = { exports: {} };
|
|
|
13526
13670
|
return cont(objprop);
|
|
13527
13671
|
} else if (type2 == "variable" || cx.style == "keyword") {
|
|
13528
13672
|
cx.marked = "property";
|
|
13529
|
-
if (value == "get" || value == "set")
|
|
13673
|
+
if (value == "get" || value == "set")
|
|
13674
|
+
return cont(getterSetter);
|
|
13530
13675
|
var m;
|
|
13531
13676
|
if (isTS && cx.state.fatArrowAt == cx.stream.start && (m = cx.stream.match(/^\s*:\s*/, false)))
|
|
13532
13677
|
cx.state.fatArrowAt = cx.stream.pos + m[0].length;
|
|
@@ -13551,30 +13696,38 @@ var javascript = { exports: {} };
|
|
|
13551
13696
|
}
|
|
13552
13697
|
}
|
|
13553
13698
|
function getterSetter(type2) {
|
|
13554
|
-
if (type2 != "variable")
|
|
13699
|
+
if (type2 != "variable")
|
|
13700
|
+
return pass(afterprop);
|
|
13555
13701
|
cx.marked = "property";
|
|
13556
13702
|
return cont(functiondef);
|
|
13557
13703
|
}
|
|
13558
13704
|
function afterprop(type2) {
|
|
13559
|
-
if (type2 == ":")
|
|
13560
|
-
|
|
13705
|
+
if (type2 == ":")
|
|
13706
|
+
return cont(expressionNoComma);
|
|
13707
|
+
if (type2 == "(")
|
|
13708
|
+
return pass(functiondef);
|
|
13561
13709
|
}
|
|
13562
13710
|
function commasep(what, end, sep) {
|
|
13563
13711
|
function proceed(type2, value) {
|
|
13564
13712
|
if (sep ? sep.indexOf(type2) > -1 : type2 == ",") {
|
|
13565
13713
|
var lex = cx.state.lexical;
|
|
13566
|
-
if (lex.info == "call")
|
|
13714
|
+
if (lex.info == "call")
|
|
13715
|
+
lex.pos = (lex.pos || 0) + 1;
|
|
13567
13716
|
return cont(function(type3, value2) {
|
|
13568
|
-
if (type3 == end || value2 == end)
|
|
13717
|
+
if (type3 == end || value2 == end)
|
|
13718
|
+
return pass();
|
|
13569
13719
|
return pass(what);
|
|
13570
13720
|
}, proceed);
|
|
13571
13721
|
}
|
|
13572
|
-
if (type2 == end || value == end)
|
|
13573
|
-
|
|
13722
|
+
if (type2 == end || value == end)
|
|
13723
|
+
return cont();
|
|
13724
|
+
if (sep && sep.indexOf(";") > -1)
|
|
13725
|
+
return pass(what);
|
|
13574
13726
|
return cont(expect(end));
|
|
13575
13727
|
}
|
|
13576
13728
|
return function(type2, value) {
|
|
13577
|
-
if (type2 == end || value == end)
|
|
13729
|
+
if (type2 == end || value == end)
|
|
13730
|
+
return cont();
|
|
13578
13731
|
return pass(what, proceed);
|
|
13579
13732
|
};
|
|
13580
13733
|
}
|
|
@@ -13584,22 +13737,28 @@ var javascript = { exports: {} };
|
|
|
13584
13737
|
return cont(pushlex(end, info), commasep(what, end), poplex);
|
|
13585
13738
|
}
|
|
13586
13739
|
function block(type2) {
|
|
13587
|
-
if (type2 == "}")
|
|
13740
|
+
if (type2 == "}")
|
|
13741
|
+
return cont();
|
|
13588
13742
|
return pass(statement, block);
|
|
13589
13743
|
}
|
|
13590
13744
|
function maybetype(type2, value) {
|
|
13591
13745
|
if (isTS) {
|
|
13592
|
-
if (type2 == ":")
|
|
13593
|
-
|
|
13746
|
+
if (type2 == ":")
|
|
13747
|
+
return cont(typeexpr);
|
|
13748
|
+
if (value == "?")
|
|
13749
|
+
return cont(maybetype);
|
|
13594
13750
|
}
|
|
13595
13751
|
}
|
|
13596
13752
|
function maybetypeOrIn(type2, value) {
|
|
13597
|
-
if (isTS && (type2 == ":" || value == "in"))
|
|
13753
|
+
if (isTS && (type2 == ":" || value == "in"))
|
|
13754
|
+
return cont(typeexpr);
|
|
13598
13755
|
}
|
|
13599
13756
|
function mayberettype(type2) {
|
|
13600
13757
|
if (isTS && type2 == ":") {
|
|
13601
|
-
if (cx.stream.match(/^\s*\w+\s+is\b/, false))
|
|
13602
|
-
|
|
13758
|
+
if (cx.stream.match(/^\s*\w+\s+is\b/, false))
|
|
13759
|
+
return cont(expression, isKW, typeexpr);
|
|
13760
|
+
else
|
|
13761
|
+
return cont(typeexpr);
|
|
13603
13762
|
}
|
|
13604
13763
|
}
|
|
13605
13764
|
function isKW(_, value) {
|
|
@@ -13617,22 +13776,31 @@ var javascript = { exports: {} };
|
|
|
13617
13776
|
cx.marked = "type";
|
|
13618
13777
|
return cont(afterType);
|
|
13619
13778
|
}
|
|
13620
|
-
if (value == "|" || value == "&")
|
|
13621
|
-
|
|
13622
|
-
if (type2 == "
|
|
13623
|
-
|
|
13624
|
-
if (type2 == "
|
|
13625
|
-
|
|
13779
|
+
if (value == "|" || value == "&")
|
|
13780
|
+
return cont(typeexpr);
|
|
13781
|
+
if (type2 == "string" || type2 == "number" || type2 == "atom")
|
|
13782
|
+
return cont(afterType);
|
|
13783
|
+
if (type2 == "[")
|
|
13784
|
+
return cont(pushlex("]"), commasep(typeexpr, "]", ","), poplex, afterType);
|
|
13785
|
+
if (type2 == "{")
|
|
13786
|
+
return cont(pushlex("}"), typeprops, poplex, afterType);
|
|
13787
|
+
if (type2 == "(")
|
|
13788
|
+
return cont(commasep(typearg, ")"), maybeReturnType, afterType);
|
|
13789
|
+
if (type2 == "<")
|
|
13790
|
+
return cont(commasep(typeexpr, ">"), typeexpr);
|
|
13626
13791
|
if (type2 == "quasi") {
|
|
13627
13792
|
return pass(quasiType, afterType);
|
|
13628
13793
|
}
|
|
13629
13794
|
}
|
|
13630
13795
|
function maybeReturnType(type2) {
|
|
13631
|
-
if (type2 == "=>")
|
|
13796
|
+
if (type2 == "=>")
|
|
13797
|
+
return cont(typeexpr);
|
|
13632
13798
|
}
|
|
13633
13799
|
function typeprops(type2) {
|
|
13634
|
-
if (type2.match(/[\}\)\]]/))
|
|
13635
|
-
|
|
13800
|
+
if (type2.match(/[\}\)\]]/))
|
|
13801
|
+
return cont();
|
|
13802
|
+
if (type2 == "," || type2 == ";")
|
|
13803
|
+
return cont(typeprops);
|
|
13636
13804
|
return pass(typeprop, typeprops);
|
|
13637
13805
|
}
|
|
13638
13806
|
function typeprop(type2, value) {
|
|
@@ -13652,8 +13820,10 @@ var javascript = { exports: {} };
|
|
|
13652
13820
|
}
|
|
13653
13821
|
}
|
|
13654
13822
|
function quasiType(type2, value) {
|
|
13655
|
-
if (type2 != "quasi")
|
|
13656
|
-
|
|
13823
|
+
if (type2 != "quasi")
|
|
13824
|
+
return pass();
|
|
13825
|
+
if (value.slice(value.length - 2) != "${")
|
|
13826
|
+
return cont(quasiType);
|
|
13657
13827
|
return cont(typeexpr, continueQuasiType);
|
|
13658
13828
|
}
|
|
13659
13829
|
function continueQuasiType(type2) {
|
|
@@ -13664,29 +13834,38 @@ var javascript = { exports: {} };
|
|
|
13664
13834
|
}
|
|
13665
13835
|
}
|
|
13666
13836
|
function typearg(type2, value) {
|
|
13667
|
-
if (type2 == "variable" && cx.stream.match(/^\s*[?:]/, false) || value == "?")
|
|
13668
|
-
|
|
13669
|
-
if (type2 == "
|
|
13837
|
+
if (type2 == "variable" && cx.stream.match(/^\s*[?:]/, false) || value == "?")
|
|
13838
|
+
return cont(typearg);
|
|
13839
|
+
if (type2 == ":")
|
|
13840
|
+
return cont(typeexpr);
|
|
13841
|
+
if (type2 == "spread")
|
|
13842
|
+
return cont(typearg);
|
|
13670
13843
|
return pass(typeexpr);
|
|
13671
13844
|
}
|
|
13672
13845
|
function afterType(type2, value) {
|
|
13673
|
-
if (value == "<")
|
|
13674
|
-
|
|
13675
|
-
if (type2 == "
|
|
13846
|
+
if (value == "<")
|
|
13847
|
+
return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType);
|
|
13848
|
+
if (value == "|" || type2 == "." || value == "&")
|
|
13849
|
+
return cont(typeexpr);
|
|
13850
|
+
if (type2 == "[")
|
|
13851
|
+
return cont(typeexpr, expect("]"), afterType);
|
|
13676
13852
|
if (value == "extends" || value == "implements") {
|
|
13677
13853
|
cx.marked = "keyword";
|
|
13678
13854
|
return cont(typeexpr);
|
|
13679
13855
|
}
|
|
13680
|
-
if (value == "?")
|
|
13856
|
+
if (value == "?")
|
|
13857
|
+
return cont(typeexpr, expect(":"), typeexpr);
|
|
13681
13858
|
}
|
|
13682
13859
|
function maybeTypeArgs(_, value) {
|
|
13683
|
-
if (value == "<")
|
|
13860
|
+
if (value == "<")
|
|
13861
|
+
return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType);
|
|
13684
13862
|
}
|
|
13685
13863
|
function typeparam() {
|
|
13686
13864
|
return pass(typeexpr, maybeTypeDefault);
|
|
13687
13865
|
}
|
|
13688
13866
|
function maybeTypeDefault(_, value) {
|
|
13689
|
-
if (value == "=")
|
|
13867
|
+
if (value == "=")
|
|
13868
|
+
return cont(typeexpr);
|
|
13690
13869
|
}
|
|
13691
13870
|
function vardef(_, value) {
|
|
13692
13871
|
if (value == "enum") {
|
|
@@ -13704,45 +13883,61 @@ var javascript = { exports: {} };
|
|
|
13704
13883
|
register(value);
|
|
13705
13884
|
return cont();
|
|
13706
13885
|
}
|
|
13707
|
-
if (type2 == "spread")
|
|
13708
|
-
|
|
13709
|
-
if (type2 == "
|
|
13886
|
+
if (type2 == "spread")
|
|
13887
|
+
return cont(pattern);
|
|
13888
|
+
if (type2 == "[")
|
|
13889
|
+
return contCommasep(eltpattern, "]");
|
|
13890
|
+
if (type2 == "{")
|
|
13891
|
+
return contCommasep(proppattern, "}");
|
|
13710
13892
|
}
|
|
13711
13893
|
function proppattern(type2, value) {
|
|
13712
13894
|
if (type2 == "variable" && !cx.stream.match(/^\s*:/, false)) {
|
|
13713
13895
|
register(value);
|
|
13714
13896
|
return cont(maybeAssign);
|
|
13715
13897
|
}
|
|
13716
|
-
if (type2 == "variable")
|
|
13717
|
-
|
|
13718
|
-
if (type2 == "
|
|
13719
|
-
|
|
13898
|
+
if (type2 == "variable")
|
|
13899
|
+
cx.marked = "property";
|
|
13900
|
+
if (type2 == "spread")
|
|
13901
|
+
return cont(pattern);
|
|
13902
|
+
if (type2 == "}")
|
|
13903
|
+
return pass();
|
|
13904
|
+
if (type2 == "[")
|
|
13905
|
+
return cont(expression, expect("]"), expect(":"), proppattern);
|
|
13720
13906
|
return cont(expect(":"), pattern, maybeAssign);
|
|
13721
13907
|
}
|
|
13722
13908
|
function eltpattern() {
|
|
13723
13909
|
return pass(pattern, maybeAssign);
|
|
13724
13910
|
}
|
|
13725
13911
|
function maybeAssign(_type, value) {
|
|
13726
|
-
if (value == "=")
|
|
13912
|
+
if (value == "=")
|
|
13913
|
+
return cont(expressionNoComma);
|
|
13727
13914
|
}
|
|
13728
13915
|
function vardefCont(type2) {
|
|
13729
|
-
if (type2 == ",")
|
|
13916
|
+
if (type2 == ",")
|
|
13917
|
+
return cont(vardef);
|
|
13730
13918
|
}
|
|
13731
13919
|
function maybeelse(type2, value) {
|
|
13732
|
-
if (type2 == "keyword b" && value == "else")
|
|
13920
|
+
if (type2 == "keyword b" && value == "else")
|
|
13921
|
+
return cont(pushlex("form", "else"), statement, poplex);
|
|
13733
13922
|
}
|
|
13734
13923
|
function forspec(type2, value) {
|
|
13735
|
-
if (value == "await")
|
|
13736
|
-
|
|
13924
|
+
if (value == "await")
|
|
13925
|
+
return cont(forspec);
|
|
13926
|
+
if (type2 == "(")
|
|
13927
|
+
return cont(pushlex(")"), forspec1, poplex);
|
|
13737
13928
|
}
|
|
13738
13929
|
function forspec1(type2) {
|
|
13739
|
-
if (type2 == "var")
|
|
13740
|
-
|
|
13930
|
+
if (type2 == "var")
|
|
13931
|
+
return cont(vardef, forspec2);
|
|
13932
|
+
if (type2 == "variable")
|
|
13933
|
+
return cont(forspec2);
|
|
13741
13934
|
return pass(forspec2);
|
|
13742
13935
|
}
|
|
13743
13936
|
function forspec2(type2, value) {
|
|
13744
|
-
if (type2 == ")")
|
|
13745
|
-
|
|
13937
|
+
if (type2 == ")")
|
|
13938
|
+
return cont();
|
|
13939
|
+
if (type2 == ";")
|
|
13940
|
+
return cont(forspec2);
|
|
13746
13941
|
if (value == "in" || value == "of") {
|
|
13747
13942
|
cx.marked = "keyword";
|
|
13748
13943
|
return cont(expression, forspec2);
|
|
@@ -13758,8 +13953,10 @@ var javascript = { exports: {} };
|
|
|
13758
13953
|
register(value);
|
|
13759
13954
|
return cont(functiondef);
|
|
13760
13955
|
}
|
|
13761
|
-
if (type2 == "(")
|
|
13762
|
-
|
|
13956
|
+
if (type2 == "(")
|
|
13957
|
+
return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, mayberettype, statement, popcontext);
|
|
13958
|
+
if (isTS && value == "<")
|
|
13959
|
+
return cont(pushlex(">"), commasep(typeparam, ">"), poplex, functiondef);
|
|
13763
13960
|
}
|
|
13764
13961
|
function functiondecl(type2, value) {
|
|
13765
13962
|
if (value == "*") {
|
|
@@ -13770,8 +13967,10 @@ var javascript = { exports: {} };
|
|
|
13770
13967
|
register(value);
|
|
13771
13968
|
return cont(functiondecl);
|
|
13772
13969
|
}
|
|
13773
|
-
if (type2 == "(")
|
|
13774
|
-
|
|
13970
|
+
if (type2 == "(")
|
|
13971
|
+
return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, mayberettype, popcontext);
|
|
13972
|
+
if (isTS && value == "<")
|
|
13973
|
+
return cont(pushlex(">"), commasep(typeparam, ">"), poplex, functiondecl);
|
|
13775
13974
|
}
|
|
13776
13975
|
function typename(type2, value) {
|
|
13777
13976
|
if (type2 == "keyword" || type2 == "variable") {
|
|
@@ -13782,17 +13981,21 @@ var javascript = { exports: {} };
|
|
|
13782
13981
|
}
|
|
13783
13982
|
}
|
|
13784
13983
|
function funarg(type2, value) {
|
|
13785
|
-
if (value == "@")
|
|
13786
|
-
|
|
13984
|
+
if (value == "@")
|
|
13985
|
+
cont(expression, funarg);
|
|
13986
|
+
if (type2 == "spread")
|
|
13987
|
+
return cont(funarg);
|
|
13787
13988
|
if (isTS && isModifier(value)) {
|
|
13788
13989
|
cx.marked = "keyword";
|
|
13789
13990
|
return cont(funarg);
|
|
13790
13991
|
}
|
|
13791
|
-
if (isTS && type2 == "this")
|
|
13992
|
+
if (isTS && type2 == "this")
|
|
13993
|
+
return cont(maybetype, maybeAssign);
|
|
13792
13994
|
return pass(pattern, maybetype, maybeAssign);
|
|
13793
13995
|
}
|
|
13794
13996
|
function classExpression(type2, value) {
|
|
13795
|
-
if (type2 == "variable")
|
|
13997
|
+
if (type2 == "variable")
|
|
13998
|
+
return className(type2, value);
|
|
13796
13999
|
return classNameAfter(type2, value);
|
|
13797
14000
|
}
|
|
13798
14001
|
function className(type2, value) {
|
|
@@ -13802,12 +14005,15 @@ var javascript = { exports: {} };
|
|
|
13802
14005
|
}
|
|
13803
14006
|
}
|
|
13804
14007
|
function classNameAfter(type2, value) {
|
|
13805
|
-
if (value == "<")
|
|
14008
|
+
if (value == "<")
|
|
14009
|
+
return cont(pushlex(">"), commasep(typeparam, ">"), poplex, classNameAfter);
|
|
13806
14010
|
if (value == "extends" || value == "implements" || isTS && type2 == ",") {
|
|
13807
|
-
if (value == "implements")
|
|
14011
|
+
if (value == "implements")
|
|
14012
|
+
cx.marked = "keyword";
|
|
13808
14013
|
return cont(isTS ? typeexpr : expression, classNameAfter);
|
|
13809
14014
|
}
|
|
13810
|
-
if (type2 == "{")
|
|
14015
|
+
if (type2 == "{")
|
|
14016
|
+
return cont(pushlex("}"), classBody, poplex);
|
|
13811
14017
|
}
|
|
13812
14018
|
function classBody(type2, value) {
|
|
13813
14019
|
if (type2 == "async" || type2 == "variable" && (value == "static" || value == "get" || value == "set" || isTS && isModifier(value)) && cx.stream.match(/^\s+#?[\w$\xa1-\uffff]/, false)) {
|
|
@@ -13818,23 +14024,32 @@ var javascript = { exports: {} };
|
|
|
13818
14024
|
cx.marked = "property";
|
|
13819
14025
|
return cont(classfield, classBody);
|
|
13820
14026
|
}
|
|
13821
|
-
if (type2 == "number" || type2 == "string")
|
|
14027
|
+
if (type2 == "number" || type2 == "string")
|
|
14028
|
+
return cont(classfield, classBody);
|
|
13822
14029
|
if (type2 == "[")
|
|
13823
14030
|
return cont(expression, maybetype, expect("]"), classfield, classBody);
|
|
13824
14031
|
if (value == "*") {
|
|
13825
14032
|
cx.marked = "keyword";
|
|
13826
14033
|
return cont(classBody);
|
|
13827
14034
|
}
|
|
13828
|
-
if (isTS && type2 == "(")
|
|
13829
|
-
|
|
13830
|
-
if (type2 == "
|
|
13831
|
-
|
|
14035
|
+
if (isTS && type2 == "(")
|
|
14036
|
+
return pass(functiondecl, classBody);
|
|
14037
|
+
if (type2 == ";" || type2 == ",")
|
|
14038
|
+
return cont(classBody);
|
|
14039
|
+
if (type2 == "}")
|
|
14040
|
+
return cont();
|
|
14041
|
+
if (value == "@")
|
|
14042
|
+
return cont(expression, classBody);
|
|
13832
14043
|
}
|
|
13833
14044
|
function classfield(type2, value) {
|
|
13834
|
-
if (value == "!")
|
|
13835
|
-
|
|
13836
|
-
if (
|
|
13837
|
-
|
|
14045
|
+
if (value == "!")
|
|
14046
|
+
return cont(classfield);
|
|
14047
|
+
if (value == "?")
|
|
14048
|
+
return cont(classfield);
|
|
14049
|
+
if (type2 == ":")
|
|
14050
|
+
return cont(typeexpr, maybeAssign);
|
|
14051
|
+
if (value == "=")
|
|
14052
|
+
return cont(expressionNoComma);
|
|
13838
14053
|
var context = cx.state.lexical.prev, isInterface = context && context.info == "interface";
|
|
13839
14054
|
return pass(isInterface ? functiondecl : functiondef);
|
|
13840
14055
|
}
|
|
@@ -13847,7 +14062,8 @@ var javascript = { exports: {} };
|
|
|
13847
14062
|
cx.marked = "keyword";
|
|
13848
14063
|
return cont(expression, expect(";"));
|
|
13849
14064
|
}
|
|
13850
|
-
if (type2 == "{")
|
|
14065
|
+
if (type2 == "{")
|
|
14066
|
+
return cont(commasep(exportField, "}"), maybeFrom, expect(";"));
|
|
13851
14067
|
return pass(statement);
|
|
13852
14068
|
}
|
|
13853
14069
|
function exportField(type2, value) {
|
|
@@ -13855,22 +14071,30 @@ var javascript = { exports: {} };
|
|
|
13855
14071
|
cx.marked = "keyword";
|
|
13856
14072
|
return cont(expect("variable"));
|
|
13857
14073
|
}
|
|
13858
|
-
if (type2 == "variable")
|
|
14074
|
+
if (type2 == "variable")
|
|
14075
|
+
return pass(expressionNoComma, exportField);
|
|
13859
14076
|
}
|
|
13860
14077
|
function afterImport(type2) {
|
|
13861
|
-
if (type2 == "string")
|
|
13862
|
-
|
|
13863
|
-
if (type2 == "
|
|
14078
|
+
if (type2 == "string")
|
|
14079
|
+
return cont();
|
|
14080
|
+
if (type2 == "(")
|
|
14081
|
+
return pass(expression);
|
|
14082
|
+
if (type2 == ".")
|
|
14083
|
+
return pass(maybeoperatorComma);
|
|
13864
14084
|
return pass(importSpec, maybeMoreImports, maybeFrom);
|
|
13865
14085
|
}
|
|
13866
14086
|
function importSpec(type2, value) {
|
|
13867
|
-
if (type2 == "{")
|
|
13868
|
-
|
|
13869
|
-
if (
|
|
14087
|
+
if (type2 == "{")
|
|
14088
|
+
return contCommasep(importSpec, "}");
|
|
14089
|
+
if (type2 == "variable")
|
|
14090
|
+
register(value);
|
|
14091
|
+
if (value == "*")
|
|
14092
|
+
cx.marked = "keyword";
|
|
13870
14093
|
return cont(maybeAs);
|
|
13871
14094
|
}
|
|
13872
14095
|
function maybeMoreImports(type2) {
|
|
13873
|
-
if (type2 == ",")
|
|
14096
|
+
if (type2 == ",")
|
|
14097
|
+
return cont(importSpec, maybeMoreImports);
|
|
13874
14098
|
}
|
|
13875
14099
|
function maybeAs(_type, value) {
|
|
13876
14100
|
if (value == "as") {
|
|
@@ -13885,7 +14109,8 @@ var javascript = { exports: {} };
|
|
|
13885
14109
|
}
|
|
13886
14110
|
}
|
|
13887
14111
|
function arrayLiteral(type2) {
|
|
13888
|
-
if (type2 == "]")
|
|
14112
|
+
if (type2 == "]")
|
|
14113
|
+
return cont();
|
|
13889
14114
|
return pass(commasep(expressionNoComma, "]"));
|
|
13890
14115
|
}
|
|
13891
14116
|
function enumdef() {
|
|
@@ -13922,35 +14147,47 @@ var javascript = { exports: {} };
|
|
|
13922
14147
|
state.indented = stream.indentation();
|
|
13923
14148
|
findFatArrow(stream, state);
|
|
13924
14149
|
}
|
|
13925
|
-
if (state.tokenize != tokenComment && stream.eatSpace())
|
|
14150
|
+
if (state.tokenize != tokenComment && stream.eatSpace())
|
|
14151
|
+
return null;
|
|
13926
14152
|
var style = state.tokenize(stream, state);
|
|
13927
|
-
if (type == "comment")
|
|
14153
|
+
if (type == "comment")
|
|
14154
|
+
return style;
|
|
13928
14155
|
state.lastType = type == "operator" && (content == "++" || content == "--") ? "incdec" : type;
|
|
13929
14156
|
return parseJS(state, style, type, content, stream);
|
|
13930
14157
|
},
|
|
13931
14158
|
indent: function(state, textAfter) {
|
|
13932
|
-
if (state.tokenize == tokenComment || state.tokenize == tokenQuasi)
|
|
13933
|
-
|
|
14159
|
+
if (state.tokenize == tokenComment || state.tokenize == tokenQuasi)
|
|
14160
|
+
return CodeMirror.Pass;
|
|
14161
|
+
if (state.tokenize != tokenBase)
|
|
14162
|
+
return 0;
|
|
13934
14163
|
var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical, top;
|
|
13935
|
-
if (!/^\s*else\b/.test(textAfter))
|
|
13936
|
-
var
|
|
13937
|
-
|
|
13938
|
-
|
|
13939
|
-
|
|
14164
|
+
if (!/^\s*else\b/.test(textAfter))
|
|
14165
|
+
for (var i = state.cc.length - 1; i >= 0; --i) {
|
|
14166
|
+
var c = state.cc[i];
|
|
14167
|
+
if (c == poplex)
|
|
14168
|
+
lexical = lexical.prev;
|
|
14169
|
+
else if (c != maybeelse && c != popcontext)
|
|
14170
|
+
break;
|
|
14171
|
+
}
|
|
13940
14172
|
while ((lexical.type == "stat" || lexical.type == "form") && (firstChar == "}" || (top = state.cc[state.cc.length - 1]) && (top == maybeoperatorComma || top == maybeoperatorNoComma) && !/^[,\.=+\-*:?[\(]/.test(textAfter)))
|
|
13941
14173
|
lexical = lexical.prev;
|
|
13942
14174
|
if (statementIndent && lexical.type == ")" && lexical.prev.type == "stat")
|
|
13943
14175
|
lexical = lexical.prev;
|
|
13944
14176
|
var type2 = lexical.type, closing = firstChar == type2;
|
|
13945
|
-
if (type2 == "vardef")
|
|
13946
|
-
|
|
13947
|
-
else if (type2 == "form"
|
|
14177
|
+
if (type2 == "vardef")
|
|
14178
|
+
return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? lexical.info.length + 1 : 0);
|
|
14179
|
+
else if (type2 == "form" && firstChar == "{")
|
|
14180
|
+
return lexical.indented;
|
|
14181
|
+
else if (type2 == "form")
|
|
14182
|
+
return lexical.indented + indentUnit;
|
|
13948
14183
|
else if (type2 == "stat")
|
|
13949
14184
|
return lexical.indented + (isContinuedStatement(state, textAfter) ? statementIndent || indentUnit : 0);
|
|
13950
14185
|
else if (lexical.info == "switch" && !closing && parserConfig.doubleIndentSwitch != false)
|
|
13951
14186
|
return lexical.indented + (/^(?:case|default)\b/.test(textAfter) ? indentUnit : 2 * indentUnit);
|
|
13952
|
-
else if (lexical.align)
|
|
13953
|
-
|
|
14187
|
+
else if (lexical.align)
|
|
14188
|
+
return lexical.column + (closing ? 0 : 1);
|
|
14189
|
+
else
|
|
14190
|
+
return lexical.indented + (closing ? 0 : indentUnit);
|
|
13954
14191
|
},
|
|
13955
14192
|
electricInput: /^\s*(?:case .*?:|default:|\{|\})$/,
|
|
13956
14193
|
blockCommentStart: jsonMode ? null : "/*",
|
|
@@ -14007,14 +14244,16 @@ var javascriptExports = javascript.exports;
|
|
|
14007
14244
|
stream.backUp(cur.length - close);
|
|
14008
14245
|
} else if (cur.match(/<\/?$/)) {
|
|
14009
14246
|
stream.backUp(cur.length);
|
|
14010
|
-
if (!stream.match(pat, false))
|
|
14247
|
+
if (!stream.match(pat, false))
|
|
14248
|
+
stream.match(cur);
|
|
14011
14249
|
}
|
|
14012
14250
|
return style;
|
|
14013
14251
|
}
|
|
14014
14252
|
var attrRegexpCache = {};
|
|
14015
14253
|
function getAttrRegexp(attr) {
|
|
14016
14254
|
var regexp = attrRegexpCache[attr];
|
|
14017
|
-
if (regexp)
|
|
14255
|
+
if (regexp)
|
|
14256
|
+
return regexp;
|
|
14018
14257
|
return attrRegexpCache[attr] = new RegExp("\\s+" + attr + `\\s*=\\s*('|")?([^'"]+)('|")?\\s*`);
|
|
14019
14258
|
}
|
|
14020
14259
|
function getAttrValue(text, attr) {
|
|
@@ -14035,7 +14274,8 @@ var javascriptExports = javascript.exports;
|
|
|
14035
14274
|
function findMatchingMode(tagInfo, tagText) {
|
|
14036
14275
|
for (var i = 0; i < tagInfo.length; i++) {
|
|
14037
14276
|
var spec = tagInfo[i];
|
|
14038
|
-
if (!spec[0] || spec[1].test(getAttrValue(tagText, spec[0])))
|
|
14277
|
+
if (!spec[0] || spec[1].test(getAttrValue(tagText, spec[0])))
|
|
14278
|
+
return spec[2];
|
|
14039
14279
|
}
|
|
14040
14280
|
}
|
|
14041
14281
|
CodeMirror.defineMode("htmlmixed", function(config, parserConfig) {
|
|
@@ -14049,9 +14289,11 @@ var javascriptExports = javascript.exports;
|
|
|
14049
14289
|
var tags = {};
|
|
14050
14290
|
var configTags = parserConfig && parserConfig.tags, configScript = parserConfig && parserConfig.scriptTypes;
|
|
14051
14291
|
addTags(defaultTags, tags);
|
|
14052
|
-
if (configTags)
|
|
14053
|
-
|
|
14054
|
-
|
|
14292
|
+
if (configTags)
|
|
14293
|
+
addTags(configTags, tags);
|
|
14294
|
+
if (configScript)
|
|
14295
|
+
for (var i = configScript.length - 1; i >= 0; i--)
|
|
14296
|
+
tags.script.unshift(["type", configScript[i].matches, configScript[i].mode]);
|
|
14055
14297
|
function html(stream, state) {
|
|
14056
14298
|
var style = htmlMode.token(stream, state.htmlState), tag = /\btag\b/.test(style), tagName;
|
|
14057
14299
|
if (tag && !/[<>\s\/]/.test(stream.current()) && (tagName = state.htmlState.tagName && state.htmlState.tagName.toLowerCase()) && tags.hasOwnProperty(tagName)) {
|
|
@@ -14074,7 +14316,8 @@ var javascriptExports = javascript.exports;
|
|
|
14074
14316
|
state.localState = CodeMirror.startState(mode, htmlMode.indent(state.htmlState, "", ""));
|
|
14075
14317
|
} else if (state.inTag) {
|
|
14076
14318
|
state.inTag += stream.current();
|
|
14077
|
-
if (stream.eol())
|
|
14319
|
+
if (stream.eol())
|
|
14320
|
+
state.inTag += " ";
|
|
14078
14321
|
}
|
|
14079
14322
|
return style;
|
|
14080
14323
|
}
|
|
@@ -14235,7 +14478,9 @@ var javascriptExports = javascript.exports;
|
|
|
14235
14478
|
parserConf.tripleDelimiters,
|
|
14236
14479
|
parserConf.operators || /^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@]|\.\.\.)/
|
|
14237
14480
|
];
|
|
14238
|
-
for (var i = 0; i < operators.length; i++)
|
|
14481
|
+
for (var i = 0; i < operators.length; i++)
|
|
14482
|
+
if (!operators[i])
|
|
14483
|
+
operators.splice(i--, 1);
|
|
14239
14484
|
var hangingIndent = parserConf.hangingIndent || conf.indentUnit;
|
|
14240
14485
|
var myKeywords = commonKeywords, myBuiltins = commonBuiltins;
|
|
14241
14486
|
if (parserConf.extra_keywords != void 0)
|
|
@@ -14275,7 +14520,8 @@ var javascriptExports = javascript.exports;
|
|
|
14275
14520
|
var builtins = wordRegexp(myBuiltins);
|
|
14276
14521
|
function tokenBase(stream, state) {
|
|
14277
14522
|
var sol = stream.sol() && state.lastToken != "\\";
|
|
14278
|
-
if (sol)
|
|
14523
|
+
if (sol)
|
|
14524
|
+
state.indent = stream.indentation();
|
|
14279
14525
|
if (sol && top(state).type == "py") {
|
|
14280
14526
|
var scopeOffset = top(state).offset;
|
|
14281
14527
|
if (stream.eatSpace()) {
|
|
@@ -14295,8 +14541,10 @@ var javascriptExports = javascript.exports;
|
|
|
14295
14541
|
return tokenBaseInner(stream, state);
|
|
14296
14542
|
}
|
|
14297
14543
|
function tokenBaseInner(stream, state, inFormat) {
|
|
14298
|
-
if (stream.eatSpace())
|
|
14299
|
-
|
|
14544
|
+
if (stream.eatSpace())
|
|
14545
|
+
return null;
|
|
14546
|
+
if (!inFormat && stream.match(/^#.*/))
|
|
14547
|
+
return "comment";
|
|
14300
14548
|
if (stream.match(/^[0-9\.]/, false)) {
|
|
14301
14549
|
var floatLiteral = false;
|
|
14302
14550
|
if (stream.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)) {
|
|
@@ -14313,14 +14561,18 @@ var javascriptExports = javascript.exports;
|
|
|
14313
14561
|
return "number";
|
|
14314
14562
|
}
|
|
14315
14563
|
var intLiteral = false;
|
|
14316
|
-
if (stream.match(/^0x[0-9a-f_]+/i))
|
|
14317
|
-
|
|
14318
|
-
if (stream.match(/^
|
|
14564
|
+
if (stream.match(/^0x[0-9a-f_]+/i))
|
|
14565
|
+
intLiteral = true;
|
|
14566
|
+
if (stream.match(/^0b[01_]+/i))
|
|
14567
|
+
intLiteral = true;
|
|
14568
|
+
if (stream.match(/^0o[0-7_]+/i))
|
|
14569
|
+
intLiteral = true;
|
|
14319
14570
|
if (stream.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)) {
|
|
14320
14571
|
stream.eat(/J/i);
|
|
14321
14572
|
intLiteral = true;
|
|
14322
14573
|
}
|
|
14323
|
-
if (stream.match(/^0(?![\dx])/i))
|
|
14574
|
+
if (stream.match(/^0(?![\dx])/i))
|
|
14575
|
+
intLiteral = true;
|
|
14324
14576
|
if (intLiteral) {
|
|
14325
14577
|
stream.eat(/L/i);
|
|
14326
14578
|
return "number";
|
|
@@ -14337,8 +14589,10 @@ var javascriptExports = javascript.exports;
|
|
|
14337
14589
|
}
|
|
14338
14590
|
}
|
|
14339
14591
|
for (var i2 = 0; i2 < operators.length; i2++)
|
|
14340
|
-
if (stream.match(operators[i2]))
|
|
14341
|
-
|
|
14592
|
+
if (stream.match(operators[i2]))
|
|
14593
|
+
return "operator";
|
|
14594
|
+
if (stream.match(delimiters))
|
|
14595
|
+
return "punctuation";
|
|
14342
14596
|
if (state.lastToken == "." && stream.match(identifiers))
|
|
14343
14597
|
return "property";
|
|
14344
14598
|
if (stream.match(keywords) || stream.match(wordOperators))
|
|
@@ -14367,8 +14621,10 @@ var javascriptExports = javascript.exports;
|
|
|
14367
14621
|
if (stream.current() == "{") {
|
|
14368
14622
|
state.tokenize = tokenNestedExpr(depth + 1);
|
|
14369
14623
|
} else if (stream.current() == "}") {
|
|
14370
|
-
if (depth > 1)
|
|
14371
|
-
|
|
14624
|
+
if (depth > 1)
|
|
14625
|
+
state.tokenize = tokenNestedExpr(depth - 1);
|
|
14626
|
+
else
|
|
14627
|
+
state.tokenize = tokenString;
|
|
14372
14628
|
}
|
|
14373
14629
|
}
|
|
14374
14630
|
return inner;
|
|
@@ -14388,8 +14644,10 @@ var javascriptExports = javascript.exports;
|
|
|
14388
14644
|
return OUTCLASS;
|
|
14389
14645
|
} else if (stream.match("{", false)) {
|
|
14390
14646
|
state.tokenize = tokenNestedExpr(0);
|
|
14391
|
-
if (stream.current())
|
|
14392
|
-
|
|
14647
|
+
if (stream.current())
|
|
14648
|
+
return OUTCLASS;
|
|
14649
|
+
else
|
|
14650
|
+
return state.tokenize(stream, state);
|
|
14393
14651
|
} else if (stream.match("}}")) {
|
|
14394
14652
|
return OUTCLASS;
|
|
14395
14653
|
} else if (stream.match("}")) {
|
|
@@ -14440,7 +14698,8 @@ var javascriptExports = javascript.exports;
|
|
|
14440
14698
|
return tokenString;
|
|
14441
14699
|
}
|
|
14442
14700
|
function pushPyScope(state) {
|
|
14443
|
-
while (top(state).type != "py")
|
|
14701
|
+
while (top(state).type != "py")
|
|
14702
|
+
state.scopes.pop();
|
|
14444
14703
|
state.scopes.push({
|
|
14445
14704
|
offset: top(state).offset + conf.indentUnit,
|
|
14446
14705
|
type: "py",
|
|
@@ -14458,7 +14717,8 @@ var javascriptExports = javascript.exports;
|
|
|
14458
14717
|
function dedent(stream, state) {
|
|
14459
14718
|
var indented = stream.indentation();
|
|
14460
14719
|
while (state.scopes.length > 1 && top(state).offset > indented) {
|
|
14461
|
-
if (top(state).type != "py")
|
|
14720
|
+
if (top(state).type != "py")
|
|
14721
|
+
return true;
|
|
14462
14722
|
state.scopes.pop();
|
|
14463
14723
|
}
|
|
14464
14724
|
return top(state).offset != indented;
|
|
@@ -14472,12 +14732,14 @@ var javascriptExports = javascript.exports;
|
|
|
14472
14732
|
var current = stream.current();
|
|
14473
14733
|
if (state.beginningOfLine && current == "@")
|
|
14474
14734
|
return stream.match(identifiers, false) ? "meta" : py3 ? "operator" : ERRORCLASS;
|
|
14475
|
-
if (/\S/.test(current))
|
|
14735
|
+
if (/\S/.test(current))
|
|
14736
|
+
state.beginningOfLine = false;
|
|
14476
14737
|
if ((style == "variable" || style == "builtin") && state.lastToken == "meta")
|
|
14477
14738
|
style = "meta";
|
|
14478
14739
|
if (current == "pass" || current == "return")
|
|
14479
14740
|
state.dedent = true;
|
|
14480
|
-
if (current == "lambda")
|
|
14741
|
+
if (current == "lambda")
|
|
14742
|
+
state.lambda = true;
|
|
14481
14743
|
if (current == ":" && !state.lambda && top(state).type == "py" && stream.match(/^\s*(?:#|$)/, false))
|
|
14482
14744
|
pushPyScope(state);
|
|
14483
14745
|
if (current.length == 1 && !/string|comment/.test(style)) {
|
|
@@ -14486,8 +14748,10 @@ var javascriptExports = javascript.exports;
|
|
|
14486
14748
|
pushBracketScope(stream, state, "])}".slice(delimiter_index, delimiter_index + 1));
|
|
14487
14749
|
delimiter_index = "])}".indexOf(current);
|
|
14488
14750
|
if (delimiter_index != -1) {
|
|
14489
|
-
if (top(state).type == current)
|
|
14490
|
-
|
|
14751
|
+
if (top(state).type == current)
|
|
14752
|
+
state.indent = state.scopes.pop().offset - hangingIndent;
|
|
14753
|
+
else
|
|
14754
|
+
return ERRORCLASS;
|
|
14491
14755
|
}
|
|
14492
14756
|
}
|
|
14493
14757
|
if (state.dedent && stream.eol() && top(state).type == "py" && state.scopes.length > 1)
|
|
@@ -14507,11 +14771,13 @@ var javascriptExports = javascript.exports;
|
|
|
14507
14771
|
},
|
|
14508
14772
|
token: function(stream, state) {
|
|
14509
14773
|
var addErr = state.errorToken;
|
|
14510
|
-
if (addErr)
|
|
14774
|
+
if (addErr)
|
|
14775
|
+
state.errorToken = false;
|
|
14511
14776
|
var style = tokenLexer(stream, state);
|
|
14512
14777
|
if (style && style != "comment")
|
|
14513
14778
|
state.lastToken = style == "keyword" || style == "punctuation" ? stream.current() : style;
|
|
14514
|
-
if (style == "punctuation")
|
|
14779
|
+
if (style == "punctuation")
|
|
14780
|
+
style = null;
|
|
14515
14781
|
if (stream.eol() && state.lambda)
|
|
14516
14782
|
state.lambda = false;
|
|
14517
14783
|
return addErr ? style + " " + ERRORCLASS : style;
|
|
@@ -14568,14 +14834,19 @@ var javascriptExports = javascript.exports;
|
|
|
14568
14834
|
return state.context = state.context.prev;
|
|
14569
14835
|
}
|
|
14570
14836
|
function typeBefore(stream, state, pos) {
|
|
14571
|
-
if (state.prevToken == "variable" || state.prevToken == "type")
|
|
14572
|
-
|
|
14573
|
-
if (
|
|
14837
|
+
if (state.prevToken == "variable" || state.prevToken == "type")
|
|
14838
|
+
return true;
|
|
14839
|
+
if (/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(stream.string.slice(0, pos)))
|
|
14840
|
+
return true;
|
|
14841
|
+
if (state.typeAtEndOfLine && stream.column() == stream.indentation())
|
|
14842
|
+
return true;
|
|
14574
14843
|
}
|
|
14575
14844
|
function isTopScope(context) {
|
|
14576
14845
|
for (; ; ) {
|
|
14577
|
-
if (!context || context.type == "top")
|
|
14578
|
-
|
|
14846
|
+
if (!context || context.type == "top")
|
|
14847
|
+
return true;
|
|
14848
|
+
if (context.type == "}" && context.prev.info != "namespace")
|
|
14849
|
+
return false;
|
|
14579
14850
|
context = context.prev;
|
|
14580
14851
|
}
|
|
14581
14852
|
}
|
|
@@ -14586,7 +14857,8 @@ var javascriptExports = javascript.exports;
|
|
|
14586
14857
|
var ch = stream.next();
|
|
14587
14858
|
if (hooks[ch]) {
|
|
14588
14859
|
var result = hooks[ch](stream, state);
|
|
14589
|
-
if (result !== false)
|
|
14860
|
+
if (result !== false)
|
|
14861
|
+
return result;
|
|
14590
14862
|
}
|
|
14591
14863
|
if (ch == '"' || ch == "'") {
|
|
14592
14864
|
state.tokenize = tokenString(ch);
|
|
@@ -14594,7 +14866,8 @@ var javascriptExports = javascript.exports;
|
|
|
14594
14866
|
}
|
|
14595
14867
|
if (numberStart.test(ch)) {
|
|
14596
14868
|
stream.backUp(1);
|
|
14597
|
-
if (stream.match(number))
|
|
14869
|
+
if (stream.match(number))
|
|
14870
|
+
return "number";
|
|
14598
14871
|
stream.next();
|
|
14599
14872
|
}
|
|
14600
14873
|
if (isPunctuationChar.test(ch)) {
|
|
@@ -14617,20 +14890,26 @@ var javascriptExports = javascript.exports;
|
|
|
14617
14890
|
return "operator";
|
|
14618
14891
|
}
|
|
14619
14892
|
stream.eatWhile(isIdentifierChar);
|
|
14620
|
-
if (namespaceSeparator)
|
|
14621
|
-
stream.
|
|
14893
|
+
if (namespaceSeparator)
|
|
14894
|
+
while (stream.match(namespaceSeparator))
|
|
14895
|
+
stream.eatWhile(isIdentifierChar);
|
|
14622
14896
|
var cur = stream.current();
|
|
14623
14897
|
if (contains(keywords, cur)) {
|
|
14624
|
-
if (contains(blockKeywords, cur))
|
|
14625
|
-
|
|
14898
|
+
if (contains(blockKeywords, cur))
|
|
14899
|
+
curPunc = "newstatement";
|
|
14900
|
+
if (contains(defKeywords, cur))
|
|
14901
|
+
isDefKeyword = true;
|
|
14626
14902
|
return "keyword";
|
|
14627
14903
|
}
|
|
14628
|
-
if (contains(types, cur))
|
|
14904
|
+
if (contains(types, cur))
|
|
14905
|
+
return "type";
|
|
14629
14906
|
if (contains(builtin, cur) || isReservedIdentifier && isReservedIdentifier(cur)) {
|
|
14630
|
-
if (contains(blockKeywords, cur))
|
|
14907
|
+
if (contains(blockKeywords, cur))
|
|
14908
|
+
curPunc = "newstatement";
|
|
14631
14909
|
return "builtin";
|
|
14632
14910
|
}
|
|
14633
|
-
if (contains(atoms, cur))
|
|
14911
|
+
if (contains(atoms, cur))
|
|
14912
|
+
return "atom";
|
|
14634
14913
|
return "variable";
|
|
14635
14914
|
}
|
|
14636
14915
|
function tokenString(quote) {
|
|
@@ -14676,7 +14955,8 @@ var javascriptExports = javascript.exports;
|
|
|
14676
14955
|
token: function(stream, state) {
|
|
14677
14956
|
var ctx = state.context;
|
|
14678
14957
|
if (stream.sol()) {
|
|
14679
|
-
if (ctx.align == null)
|
|
14958
|
+
if (ctx.align == null)
|
|
14959
|
+
ctx.align = false;
|
|
14680
14960
|
state.indented = stream.indentation();
|
|
14681
14961
|
state.startOfLine = true;
|
|
14682
14962
|
}
|
|
@@ -14686,18 +14966,28 @@ var javascriptExports = javascript.exports;
|
|
|
14686
14966
|
}
|
|
14687
14967
|
curPunc = isDefKeyword = null;
|
|
14688
14968
|
var style = (state.tokenize || tokenBase)(stream, state);
|
|
14689
|
-
if (style == "comment" || style == "meta")
|
|
14690
|
-
|
|
14969
|
+
if (style == "comment" || style == "meta")
|
|
14970
|
+
return style;
|
|
14971
|
+
if (ctx.align == null)
|
|
14972
|
+
ctx.align = true;
|
|
14691
14973
|
if (curPunc == ";" || curPunc == ":" || curPunc == "," && stream.match(/^\s*(?:\/\/.*)?$/, false))
|
|
14692
|
-
while (state.context.type == "statement")
|
|
14693
|
-
|
|
14694
|
-
else if (curPunc == "
|
|
14695
|
-
|
|
14974
|
+
while (state.context.type == "statement")
|
|
14975
|
+
popContext(state);
|
|
14976
|
+
else if (curPunc == "{")
|
|
14977
|
+
pushContext(state, stream.column(), "}");
|
|
14978
|
+
else if (curPunc == "[")
|
|
14979
|
+
pushContext(state, stream.column(), "]");
|
|
14980
|
+
else if (curPunc == "(")
|
|
14981
|
+
pushContext(state, stream.column(), ")");
|
|
14696
14982
|
else if (curPunc == "}") {
|
|
14697
|
-
while (ctx.type == "statement")
|
|
14698
|
-
|
|
14699
|
-
|
|
14700
|
-
|
|
14983
|
+
while (ctx.type == "statement")
|
|
14984
|
+
ctx = popContext(state);
|
|
14985
|
+
if (ctx.type == "}")
|
|
14986
|
+
ctx = popContext(state);
|
|
14987
|
+
while (ctx.type == "statement")
|
|
14988
|
+
ctx = popContext(state);
|
|
14989
|
+
} else if (curPunc == ctx.type)
|
|
14990
|
+
popContext(state);
|
|
14701
14991
|
else if (indentStatements && ((ctx.type == "}" || ctx.type == "top") && curPunc != ";" || ctx.type == "statement" && curPunc == "newstatement")) {
|
|
14702
14992
|
pushContext(state, stream.column(), "statement", stream.current());
|
|
14703
14993
|
}
|
|
@@ -14705,9 +14995,11 @@ var javascriptExports = javascript.exports;
|
|
|
14705
14995
|
style = "def";
|
|
14706
14996
|
if (hooks.token) {
|
|
14707
14997
|
var result = hooks.token(stream, state, style);
|
|
14708
|
-
if (result !== void 0)
|
|
14998
|
+
if (result !== void 0)
|
|
14999
|
+
style = result;
|
|
14709
15000
|
}
|
|
14710
|
-
if (style == "def" && parserConfig.styleDefs === false)
|
|
15001
|
+
if (style == "def" && parserConfig.styleDefs === false)
|
|
15002
|
+
style = "variable";
|
|
14711
15003
|
state.startOfLine = false;
|
|
14712
15004
|
state.prevToken = isDefKeyword ? "def" : style || curPunc;
|
|
14713
15005
|
maybeEOL(stream, state);
|
|
@@ -14718,17 +15010,20 @@ var javascriptExports = javascript.exports;
|
|
|
14718
15010
|
return CodeMirror.Pass;
|
|
14719
15011
|
var ctx = state.context, firstChar = textAfter && textAfter.charAt(0);
|
|
14720
15012
|
var closing = firstChar == ctx.type;
|
|
14721
|
-
if (ctx.type == "statement" && firstChar == "}")
|
|
15013
|
+
if (ctx.type == "statement" && firstChar == "}")
|
|
15014
|
+
ctx = ctx.prev;
|
|
14722
15015
|
if (parserConfig.dontIndentStatements)
|
|
14723
15016
|
while (ctx.type == "statement" && parserConfig.dontIndentStatements.test(ctx.info))
|
|
14724
15017
|
ctx = ctx.prev;
|
|
14725
15018
|
if (hooks.indent) {
|
|
14726
15019
|
var hook = hooks.indent(state, ctx, textAfter, indentUnit);
|
|
14727
|
-
if (typeof hook == "number")
|
|
15020
|
+
if (typeof hook == "number")
|
|
15021
|
+
return hook;
|
|
14728
15022
|
}
|
|
14729
15023
|
var switchBlock = ctx.prev && ctx.prev.info == "switch";
|
|
14730
15024
|
if (parserConfig.allmanIndentation && /[{(]/.test(firstChar)) {
|
|
14731
|
-
while (ctx.type != "top" && ctx.type != "}")
|
|
15025
|
+
while (ctx.type != "top" && ctx.type != "}")
|
|
15026
|
+
ctx = ctx.prev;
|
|
14732
15027
|
return ctx.indented;
|
|
14733
15028
|
}
|
|
14734
15029
|
if (ctx.type == "statement")
|
|
@@ -14749,7 +15044,8 @@ var javascriptExports = javascript.exports;
|
|
|
14749
15044
|
});
|
|
14750
15045
|
function words(str) {
|
|
14751
15046
|
var obj = {}, words2 = str.split(" ");
|
|
14752
|
-
for (var i = 0; i < words2.length; ++i)
|
|
15047
|
+
for (var i = 0; i < words2.length; ++i)
|
|
15048
|
+
obj[words2[i]] = true;
|
|
14753
15049
|
return obj;
|
|
14754
15050
|
}
|
|
14755
15051
|
function contains(words2, word) {
|
|
@@ -14774,7 +15070,8 @@ var javascriptExports = javascript.exports;
|
|
|
14774
15070
|
var cBlockKeywords = "case do else for if switch while struct enum union";
|
|
14775
15071
|
var cDefKeywords = "struct enum union";
|
|
14776
15072
|
function cppHook(stream, state) {
|
|
14777
|
-
if (!state.startOfLine)
|
|
15073
|
+
if (!state.startOfLine)
|
|
15074
|
+
return false;
|
|
14778
15075
|
for (var ch, next = null; ch = stream.peek(); ) {
|
|
14779
15076
|
if (ch == "\\" && stream.match(/^.$/)) {
|
|
14780
15077
|
next = cppHook;
|
|
@@ -14788,12 +15085,15 @@ var javascriptExports = javascript.exports;
|
|
|
14788
15085
|
return "meta";
|
|
14789
15086
|
}
|
|
14790
15087
|
function pointerHook(_stream, state) {
|
|
14791
|
-
if (state.prevToken == "type")
|
|
15088
|
+
if (state.prevToken == "type")
|
|
15089
|
+
return "type";
|
|
14792
15090
|
return false;
|
|
14793
15091
|
}
|
|
14794
15092
|
function cIsReservedIdentifier(token) {
|
|
14795
|
-
if (!token || token.length < 2)
|
|
14796
|
-
|
|
15093
|
+
if (!token || token.length < 2)
|
|
15094
|
+
return false;
|
|
15095
|
+
if (token[0] != "_")
|
|
15096
|
+
return false;
|
|
14797
15097
|
return token[1] == "_" || token[1] !== token[1].toLowerCase();
|
|
14798
15098
|
}
|
|
14799
15099
|
function cpp14Literal(stream) {
|
|
@@ -14848,12 +15148,14 @@ var javascriptExports = javascript.exports;
|
|
|
14848
15148
|
return "string";
|
|
14849
15149
|
}
|
|
14850
15150
|
function def(mimes, mode) {
|
|
14851
|
-
if (typeof mimes == "string")
|
|
15151
|
+
if (typeof mimes == "string")
|
|
15152
|
+
mimes = [mimes];
|
|
14852
15153
|
var words2 = [];
|
|
14853
15154
|
function add(obj) {
|
|
14854
15155
|
if (obj) {
|
|
14855
|
-
for (var prop in obj)
|
|
14856
|
-
|
|
15156
|
+
for (var prop in obj)
|
|
15157
|
+
if (obj.hasOwnProperty(prop))
|
|
15158
|
+
words2.push(prop);
|
|
14857
15159
|
}
|
|
14858
15160
|
}
|
|
14859
15161
|
add(mode.keywords);
|
|
@@ -14929,12 +15231,14 @@ var javascriptExports = javascript.exports;
|
|
|
14929
15231
|
number: /^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,
|
|
14930
15232
|
hooks: {
|
|
14931
15233
|
"@": function(stream) {
|
|
14932
|
-
if (stream.match("interface", false))
|
|
15234
|
+
if (stream.match("interface", false))
|
|
15235
|
+
return false;
|
|
14933
15236
|
stream.eatWhile(/[\w\$_]/);
|
|
14934
15237
|
return "meta";
|
|
14935
15238
|
},
|
|
14936
15239
|
'"': function(stream, state) {
|
|
14937
|
-
if (!stream.match(/""$/))
|
|
15240
|
+
if (!stream.match(/""$/))
|
|
15241
|
+
return false;
|
|
14938
15242
|
state.tokenize = tokenTripleString;
|
|
14939
15243
|
return state.tokenize(stream, state);
|
|
14940
15244
|
}
|
|
@@ -15013,12 +15317,14 @@ var javascriptExports = javascript.exports;
|
|
|
15013
15317
|
return "meta";
|
|
15014
15318
|
},
|
|
15015
15319
|
'"': function(stream, state) {
|
|
15016
|
-
if (!stream.match('""'))
|
|
15320
|
+
if (!stream.match('""'))
|
|
15321
|
+
return false;
|
|
15017
15322
|
state.tokenize = tokenTripleString;
|
|
15018
15323
|
return state.tokenize(stream, state);
|
|
15019
15324
|
},
|
|
15020
15325
|
"'": function(stream) {
|
|
15021
|
-
if (stream.match(/^(\\[^'\s]+|[^\\'])'/))
|
|
15326
|
+
if (stream.match(/^(\\[^'\s]+|[^\\'])'/))
|
|
15327
|
+
return "string-2";
|
|
15022
15328
|
stream.eatWhile(/[\w\$_\xa1-\uffff]/);
|
|
15023
15329
|
return "atom";
|
|
15024
15330
|
},
|
|
@@ -15032,7 +15338,8 @@ var javascriptExports = javascript.exports;
|
|
|
15032
15338
|
}
|
|
15033
15339
|
},
|
|
15034
15340
|
"/": function(stream, state) {
|
|
15035
|
-
if (!stream.eat("*"))
|
|
15341
|
+
if (!stream.eat("*"))
|
|
15342
|
+
return false;
|
|
15036
15343
|
state.tokenize = tokenNestedComment(1);
|
|
15037
15344
|
return state.tokenize(stream, state);
|
|
15038
15345
|
}
|
|
@@ -15091,7 +15398,8 @@ var javascriptExports = javascript.exports;
|
|
|
15091
15398
|
return state.tokenize(stream, state);
|
|
15092
15399
|
},
|
|
15093
15400
|
"/": function(stream, state) {
|
|
15094
|
-
if (!stream.eat("*"))
|
|
15401
|
+
if (!stream.eat("*"))
|
|
15402
|
+
return false;
|
|
15095
15403
|
state.tokenize = tokenNestedComment(1);
|
|
15096
15404
|
return state.tokenize(stream, state);
|
|
15097
15405
|
},
|
|
@@ -15242,7 +15550,8 @@ var javascriptExports = javascript.exports;
|
|
|
15242
15550
|
return state.tokenize(stream, state);
|
|
15243
15551
|
},
|
|
15244
15552
|
"`": function(stream, state) {
|
|
15245
|
-
if (!stringTokenizer || !stream.match("`"))
|
|
15553
|
+
if (!stringTokenizer || !stream.match("`"))
|
|
15554
|
+
return false;
|
|
15246
15555
|
state.tokenize = stringTokenizer;
|
|
15247
15556
|
stringTokenizer = null;
|
|
15248
15557
|
return state.tokenize(stream, state);
|
|
@@ -15264,1174 +15573,7 @@ var javascriptExports = javascript.exports;
|
|
|
15264
15573
|
});
|
|
15265
15574
|
});
|
|
15266
15575
|
})();
|
|
15267
|
-
var meta = { exports: {} };
|
|
15268
|
-
var hasRequiredMeta;
|
|
15269
|
-
function requireMeta() {
|
|
15270
|
-
if (hasRequiredMeta) return meta.exports;
|
|
15271
|
-
hasRequiredMeta = 1;
|
|
15272
|
-
(function(module, exports) {
|
|
15273
|
-
(function(mod) {
|
|
15274
|
-
mod(requireCodemirror());
|
|
15275
|
-
})(function(CodeMirror) {
|
|
15276
|
-
CodeMirror.modeInfo = [
|
|
15277
|
-
{ name: "APL", mime: "text/apl", mode: "apl", ext: ["dyalog", "apl"] },
|
|
15278
|
-
{ name: "PGP", mimes: ["application/pgp", "application/pgp-encrypted", "application/pgp-keys", "application/pgp-signature"], mode: "asciiarmor", ext: ["asc", "pgp", "sig"] },
|
|
15279
|
-
{ name: "ASN.1", mime: "text/x-ttcn-asn", mode: "asn.1", ext: ["asn", "asn1"] },
|
|
15280
|
-
{ name: "Asterisk", mime: "text/x-asterisk", mode: "asterisk", file: /^extensions\.conf$/i },
|
|
15281
|
-
{ name: "Brainfuck", mime: "text/x-brainfuck", mode: "brainfuck", ext: ["b", "bf"] },
|
|
15282
|
-
{ name: "C", mime: "text/x-csrc", mode: "clike", ext: ["c", "h", "ino"] },
|
|
15283
|
-
{ name: "C++", mime: "text/x-c++src", mode: "clike", ext: ["cpp", "c++", "cc", "cxx", "hpp", "h++", "hh", "hxx"], alias: ["cpp"] },
|
|
15284
|
-
{ name: "Cobol", mime: "text/x-cobol", mode: "cobol", ext: ["cob", "cpy", "cbl"] },
|
|
15285
|
-
{ name: "C#", mime: "text/x-csharp", mode: "clike", ext: ["cs"], alias: ["csharp", "cs"] },
|
|
15286
|
-
{ name: "Clojure", mime: "text/x-clojure", mode: "clojure", ext: ["clj", "cljc", "cljx"] },
|
|
15287
|
-
{ name: "ClojureScript", mime: "text/x-clojurescript", mode: "clojure", ext: ["cljs"] },
|
|
15288
|
-
{ name: "Closure Stylesheets (GSS)", mime: "text/x-gss", mode: "css", ext: ["gss"] },
|
|
15289
|
-
{ name: "CMake", mime: "text/x-cmake", mode: "cmake", ext: ["cmake", "cmake.in"], file: /^CMakeLists\.txt$/ },
|
|
15290
|
-
{ name: "CoffeeScript", mimes: ["application/vnd.coffeescript", "text/coffeescript", "text/x-coffeescript"], mode: "coffeescript", ext: ["coffee"], alias: ["coffee", "coffee-script"] },
|
|
15291
|
-
{ name: "Common Lisp", mime: "text/x-common-lisp", mode: "commonlisp", ext: ["cl", "lisp", "el"], alias: ["lisp"] },
|
|
15292
|
-
{ name: "Cypher", mime: "application/x-cypher-query", mode: "cypher", ext: ["cyp", "cypher"] },
|
|
15293
|
-
{ name: "Cython", mime: "text/x-cython", mode: "python", ext: ["pyx", "pxd", "pxi"] },
|
|
15294
|
-
{ name: "Crystal", mime: "text/x-crystal", mode: "crystal", ext: ["cr"] },
|
|
15295
|
-
{ name: "CSS", mime: "text/css", mode: "css", ext: ["css"] },
|
|
15296
|
-
{ name: "CQL", mime: "text/x-cassandra", mode: "sql", ext: ["cql"] },
|
|
15297
|
-
{ name: "D", mime: "text/x-d", mode: "d", ext: ["d"] },
|
|
15298
|
-
{ name: "Dart", mimes: ["application/dart", "text/x-dart"], mode: "dart", ext: ["dart"] },
|
|
15299
|
-
{ name: "diff", mime: "text/x-diff", mode: "diff", ext: ["diff", "patch"] },
|
|
15300
|
-
{ name: "Django", mime: "text/x-django", mode: "django" },
|
|
15301
|
-
{ name: "Dockerfile", mime: "text/x-dockerfile", mode: "dockerfile", file: /^Dockerfile$/ },
|
|
15302
|
-
{ name: "DTD", mime: "application/xml-dtd", mode: "dtd", ext: ["dtd"] },
|
|
15303
|
-
{ name: "Dylan", mime: "text/x-dylan", mode: "dylan", ext: ["dylan", "dyl", "intr"] },
|
|
15304
|
-
{ name: "EBNF", mime: "text/x-ebnf", mode: "ebnf" },
|
|
15305
|
-
{ name: "ECL", mime: "text/x-ecl", mode: "ecl", ext: ["ecl"] },
|
|
15306
|
-
{ name: "edn", mime: "application/edn", mode: "clojure", ext: ["edn"] },
|
|
15307
|
-
{ name: "Eiffel", mime: "text/x-eiffel", mode: "eiffel", ext: ["e"] },
|
|
15308
|
-
{ name: "Elm", mime: "text/x-elm", mode: "elm", ext: ["elm"] },
|
|
15309
|
-
{ name: "Embedded JavaScript", mime: "application/x-ejs", mode: "htmlembedded", ext: ["ejs"] },
|
|
15310
|
-
{ name: "Embedded Ruby", mime: "application/x-erb", mode: "htmlembedded", ext: ["erb"] },
|
|
15311
|
-
{ name: "Erlang", mime: "text/x-erlang", mode: "erlang", ext: ["erl"] },
|
|
15312
|
-
{ name: "Esper", mime: "text/x-esper", mode: "sql" },
|
|
15313
|
-
{ name: "Factor", mime: "text/x-factor", mode: "factor", ext: ["factor"] },
|
|
15314
|
-
{ name: "FCL", mime: "text/x-fcl", mode: "fcl" },
|
|
15315
|
-
{ name: "Forth", mime: "text/x-forth", mode: "forth", ext: ["forth", "fth", "4th"] },
|
|
15316
|
-
{ name: "Fortran", mime: "text/x-fortran", mode: "fortran", ext: ["f", "for", "f77", "f90", "f95"] },
|
|
15317
|
-
{ name: "F#", mime: "text/x-fsharp", mode: "mllike", ext: ["fs"], alias: ["fsharp"] },
|
|
15318
|
-
{ name: "Gas", mime: "text/x-gas", mode: "gas", ext: ["s"] },
|
|
15319
|
-
{ name: "Gherkin", mime: "text/x-feature", mode: "gherkin", ext: ["feature"] },
|
|
15320
|
-
{ name: "GitHub Flavored Markdown", mime: "text/x-gfm", mode: "gfm", file: /^(readme|contributing|history)\.md$/i },
|
|
15321
|
-
{ name: "Go", mime: "text/x-go", mode: "go", ext: ["go"] },
|
|
15322
|
-
{ name: "Groovy", mime: "text/x-groovy", mode: "groovy", ext: ["groovy", "gradle"], file: /^Jenkinsfile$/ },
|
|
15323
|
-
{ name: "HAML", mime: "text/x-haml", mode: "haml", ext: ["haml"] },
|
|
15324
|
-
{ name: "Haskell", mime: "text/x-haskell", mode: "haskell", ext: ["hs"] },
|
|
15325
|
-
{ name: "Haskell (Literate)", mime: "text/x-literate-haskell", mode: "haskell-literate", ext: ["lhs"] },
|
|
15326
|
-
{ name: "Haxe", mime: "text/x-haxe", mode: "haxe", ext: ["hx"] },
|
|
15327
|
-
{ name: "HXML", mime: "text/x-hxml", mode: "haxe", ext: ["hxml"] },
|
|
15328
|
-
{ name: "ASP.NET", mime: "application/x-aspx", mode: "htmlembedded", ext: ["aspx"], alias: ["asp", "aspx"] },
|
|
15329
|
-
{ name: "HTML", mime: "text/html", mode: "htmlmixed", ext: ["html", "htm", "handlebars", "hbs"], alias: ["xhtml"] },
|
|
15330
|
-
{ name: "HTTP", mime: "message/http", mode: "http" },
|
|
15331
|
-
{ name: "IDL", mime: "text/x-idl", mode: "idl", ext: ["pro"] },
|
|
15332
|
-
{ name: "Pug", mime: "text/x-pug", mode: "pug", ext: ["jade", "pug"], alias: ["jade"] },
|
|
15333
|
-
{ name: "Java", mime: "text/x-java", mode: "clike", ext: ["java"] },
|
|
15334
|
-
{ name: "Java Server Pages", mime: "application/x-jsp", mode: "htmlembedded", ext: ["jsp"], alias: ["jsp"] },
|
|
15335
|
-
{
|
|
15336
|
-
name: "JavaScript",
|
|
15337
|
-
mimes: ["text/javascript", "text/ecmascript", "application/javascript", "application/x-javascript", "application/ecmascript"],
|
|
15338
|
-
mode: "javascript",
|
|
15339
|
-
ext: ["js"],
|
|
15340
|
-
alias: ["ecmascript", "js", "node"]
|
|
15341
|
-
},
|
|
15342
|
-
{ name: "JSON", mimes: ["application/json", "application/x-json"], mode: "javascript", ext: ["json", "map"], alias: ["json5"] },
|
|
15343
|
-
{ name: "JSON-LD", mime: "application/ld+json", mode: "javascript", ext: ["jsonld"], alias: ["jsonld"] },
|
|
15344
|
-
{ name: "JSX", mime: "text/jsx", mode: "jsx", ext: ["jsx"] },
|
|
15345
|
-
{ name: "Jinja2", mime: "text/jinja2", mode: "jinja2", ext: ["j2", "jinja", "jinja2"] },
|
|
15346
|
-
{ name: "Julia", mime: "text/x-julia", mode: "julia", ext: ["jl"], alias: ["jl"] },
|
|
15347
|
-
{ name: "Kotlin", mime: "text/x-kotlin", mode: "clike", ext: ["kt"] },
|
|
15348
|
-
{ name: "LESS", mime: "text/x-less", mode: "css", ext: ["less"] },
|
|
15349
|
-
{ name: "LiveScript", mime: "text/x-livescript", mode: "livescript", ext: ["ls"], alias: ["ls"] },
|
|
15350
|
-
{ name: "Lua", mime: "text/x-lua", mode: "lua", ext: ["lua"] },
|
|
15351
|
-
{ name: "Markdown", mime: "text/x-markdown", mode: "markdown", ext: ["markdown", "md", "mkd"] },
|
|
15352
|
-
{ name: "mIRC", mime: "text/mirc", mode: "mirc" },
|
|
15353
|
-
{ name: "MariaDB SQL", mime: "text/x-mariadb", mode: "sql" },
|
|
15354
|
-
{ name: "Mathematica", mime: "text/x-mathematica", mode: "mathematica", ext: ["m", "nb", "wl", "wls"] },
|
|
15355
|
-
{ name: "Modelica", mime: "text/x-modelica", mode: "modelica", ext: ["mo"] },
|
|
15356
|
-
{ name: "MUMPS", mime: "text/x-mumps", mode: "mumps", ext: ["mps"] },
|
|
15357
|
-
{ name: "MS SQL", mime: "text/x-mssql", mode: "sql" },
|
|
15358
|
-
{ name: "mbox", mime: "application/mbox", mode: "mbox", ext: ["mbox"] },
|
|
15359
|
-
{ name: "MySQL", mime: "text/x-mysql", mode: "sql" },
|
|
15360
|
-
{ name: "Nginx", mime: "text/x-nginx-conf", mode: "nginx", file: /nginx.*\.conf$/i },
|
|
15361
|
-
{ name: "NSIS", mime: "text/x-nsis", mode: "nsis", ext: ["nsh", "nsi"] },
|
|
15362
|
-
{
|
|
15363
|
-
name: "NTriples",
|
|
15364
|
-
mimes: ["application/n-triples", "application/n-quads", "text/n-triples"],
|
|
15365
|
-
mode: "ntriples",
|
|
15366
|
-
ext: ["nt", "nq"]
|
|
15367
|
-
},
|
|
15368
|
-
{ name: "Objective-C", mime: "text/x-objectivec", mode: "clike", ext: ["m"], alias: ["objective-c", "objc"] },
|
|
15369
|
-
{ name: "Objective-C++", mime: "text/x-objectivec++", mode: "clike", ext: ["mm"], alias: ["objective-c++", "objc++"] },
|
|
15370
|
-
{ name: "OCaml", mime: "text/x-ocaml", mode: "mllike", ext: ["ml", "mli", "mll", "mly"] },
|
|
15371
|
-
{ name: "Octave", mime: "text/x-octave", mode: "octave", ext: ["m"] },
|
|
15372
|
-
{ name: "Oz", mime: "text/x-oz", mode: "oz", ext: ["oz"] },
|
|
15373
|
-
{ name: "Pascal", mime: "text/x-pascal", mode: "pascal", ext: ["p", "pas"] },
|
|
15374
|
-
{ name: "PEG.js", mime: "null", mode: "pegjs", ext: ["jsonld"] },
|
|
15375
|
-
{ name: "Perl", mime: "text/x-perl", mode: "perl", ext: ["pl", "pm"] },
|
|
15376
|
-
{ name: "PHP", mimes: ["text/x-php", "application/x-httpd-php", "application/x-httpd-php-open"], mode: "php", ext: ["php", "php3", "php4", "php5", "php7", "phtml"] },
|
|
15377
|
-
{ name: "Pig", mime: "text/x-pig", mode: "pig", ext: ["pig"] },
|
|
15378
|
-
{ name: "Plain Text", mime: "text/plain", mode: "null", ext: ["txt", "text", "conf", "def", "list", "log"] },
|
|
15379
|
-
{ name: "PLSQL", mime: "text/x-plsql", mode: "sql", ext: ["pls"] },
|
|
15380
|
-
{ name: "PostgreSQL", mime: "text/x-pgsql", mode: "sql" },
|
|
15381
|
-
{ name: "PowerShell", mime: "application/x-powershell", mode: "powershell", ext: ["ps1", "psd1", "psm1"] },
|
|
15382
|
-
{ name: "Properties files", mime: "text/x-properties", mode: "properties", ext: ["properties", "ini", "in"], alias: ["ini", "properties"] },
|
|
15383
|
-
{ name: "ProtoBuf", mime: "text/x-protobuf", mode: "protobuf", ext: ["proto"] },
|
|
15384
|
-
{ name: "Python", mime: "text/x-python", mode: "python", ext: ["BUILD", "bzl", "py", "pyw"], file: /^(BUCK|BUILD)$/ },
|
|
15385
|
-
{ name: "Puppet", mime: "text/x-puppet", mode: "puppet", ext: ["pp"] },
|
|
15386
|
-
{ name: "Q", mime: "text/x-q", mode: "q", ext: ["q"] },
|
|
15387
|
-
{ name: "R", mime: "text/x-rsrc", mode: "r", ext: ["r", "R"], alias: ["rscript"] },
|
|
15388
|
-
{ name: "reStructuredText", mime: "text/x-rst", mode: "rst", ext: ["rst"], alias: ["rst"] },
|
|
15389
|
-
{ name: "RPM Changes", mime: "text/x-rpm-changes", mode: "rpm" },
|
|
15390
|
-
{ name: "RPM Spec", mime: "text/x-rpm-spec", mode: "rpm", ext: ["spec"] },
|
|
15391
|
-
{ name: "Ruby", mime: "text/x-ruby", mode: "ruby", ext: ["rb"], alias: ["jruby", "macruby", "rake", "rb", "rbx"] },
|
|
15392
|
-
{ name: "Rust", mime: "text/x-rustsrc", mode: "rust", ext: ["rs"] },
|
|
15393
|
-
{ name: "SAS", mime: "text/x-sas", mode: "sas", ext: ["sas"] },
|
|
15394
|
-
{ name: "Sass", mime: "text/x-sass", mode: "sass", ext: ["sass"] },
|
|
15395
|
-
{ name: "Scala", mime: "text/x-scala", mode: "clike", ext: ["scala"] },
|
|
15396
|
-
{ name: "Scheme", mime: "text/x-scheme", mode: "scheme", ext: ["scm", "ss"] },
|
|
15397
|
-
{ name: "SCSS", mime: "text/x-scss", mode: "css", ext: ["scss"] },
|
|
15398
|
-
{ name: "Shell", mimes: ["text/x-sh", "application/x-sh"], mode: "shell", ext: ["sh", "ksh", "bash"], alias: ["bash", "sh", "zsh"], file: /^PKGBUILD$/ },
|
|
15399
|
-
{ name: "Sieve", mime: "application/sieve", mode: "sieve", ext: ["siv", "sieve"] },
|
|
15400
|
-
{ name: "Slim", mimes: ["text/x-slim", "application/x-slim"], mode: "slim", ext: ["slim"] },
|
|
15401
|
-
{ name: "Smalltalk", mime: "text/x-stsrc", mode: "smalltalk", ext: ["st"] },
|
|
15402
|
-
{ name: "Smarty", mime: "text/x-smarty", mode: "smarty", ext: ["tpl"] },
|
|
15403
|
-
{ name: "Solr", mime: "text/x-solr", mode: "solr" },
|
|
15404
|
-
{ name: "SML", mime: "text/x-sml", mode: "mllike", ext: ["sml", "sig", "fun", "smackspec"] },
|
|
15405
|
-
{ name: "Soy", mime: "text/x-soy", mode: "soy", ext: ["soy"], alias: ["closure template"] },
|
|
15406
|
-
{ name: "SPARQL", mime: "application/sparql-query", mode: "sparql", ext: ["rq", "sparql"], alias: ["sparul"] },
|
|
15407
|
-
{ name: "Spreadsheet", mime: "text/x-spreadsheet", mode: "spreadsheet", alias: ["excel", "formula"] },
|
|
15408
|
-
{ name: "SQL", mime: "text/x-sql", mode: "sql", ext: ["sql"] },
|
|
15409
|
-
{ name: "SQLite", mime: "text/x-sqlite", mode: "sql" },
|
|
15410
|
-
{ name: "Squirrel", mime: "text/x-squirrel", mode: "clike", ext: ["nut"] },
|
|
15411
|
-
{ name: "Stylus", mime: "text/x-styl", mode: "stylus", ext: ["styl"] },
|
|
15412
|
-
{ name: "Swift", mime: "text/x-swift", mode: "swift", ext: ["swift"] },
|
|
15413
|
-
{ name: "sTeX", mime: "text/x-stex", mode: "stex" },
|
|
15414
|
-
{ name: "LaTeX", mime: "text/x-latex", mode: "stex", ext: ["text", "ltx", "tex"], alias: ["tex"] },
|
|
15415
|
-
{ name: "SystemVerilog", mime: "text/x-systemverilog", mode: "verilog", ext: ["v", "sv", "svh"] },
|
|
15416
|
-
{ name: "Tcl", mime: "text/x-tcl", mode: "tcl", ext: ["tcl"] },
|
|
15417
|
-
{ name: "Textile", mime: "text/x-textile", mode: "textile", ext: ["textile"] },
|
|
15418
|
-
{ name: "TiddlyWiki", mime: "text/x-tiddlywiki", mode: "tiddlywiki" },
|
|
15419
|
-
{ name: "Tiki wiki", mime: "text/tiki", mode: "tiki" },
|
|
15420
|
-
{ name: "TOML", mime: "text/x-toml", mode: "toml", ext: ["toml"] },
|
|
15421
|
-
{ name: "Tornado", mime: "text/x-tornado", mode: "tornado" },
|
|
15422
|
-
{ name: "troff", mime: "text/troff", mode: "troff", ext: ["1", "2", "3", "4", "5", "6", "7", "8", "9"] },
|
|
15423
|
-
{ name: "TTCN", mime: "text/x-ttcn", mode: "ttcn", ext: ["ttcn", "ttcn3", "ttcnpp"] },
|
|
15424
|
-
{ name: "TTCN_CFG", mime: "text/x-ttcn-cfg", mode: "ttcn-cfg", ext: ["cfg"] },
|
|
15425
|
-
{ name: "Turtle", mime: "text/turtle", mode: "turtle", ext: ["ttl"] },
|
|
15426
|
-
{ name: "TypeScript", mime: "application/typescript", mode: "javascript", ext: ["ts"], alias: ["ts"] },
|
|
15427
|
-
{ name: "TypeScript-JSX", mime: "text/typescript-jsx", mode: "jsx", ext: ["tsx"], alias: ["tsx"] },
|
|
15428
|
-
{ name: "Twig", mime: "text/x-twig", mode: "twig" },
|
|
15429
|
-
{ name: "Web IDL", mime: "text/x-webidl", mode: "webidl", ext: ["webidl"] },
|
|
15430
|
-
{ name: "VB.NET", mime: "text/x-vb", mode: "vb", ext: ["vb"] },
|
|
15431
|
-
{ name: "VBScript", mime: "text/vbscript", mode: "vbscript", ext: ["vbs"] },
|
|
15432
|
-
{ name: "Velocity", mime: "text/velocity", mode: "velocity", ext: ["vtl"] },
|
|
15433
|
-
{ name: "Verilog", mime: "text/x-verilog", mode: "verilog", ext: ["v"] },
|
|
15434
|
-
{ name: "VHDL", mime: "text/x-vhdl", mode: "vhdl", ext: ["vhd", "vhdl"] },
|
|
15435
|
-
{ name: "Vue.js Component", mimes: ["script/x-vue", "text/x-vue"], mode: "vue", ext: ["vue"] },
|
|
15436
|
-
{ name: "XML", mimes: ["application/xml", "text/xml"], mode: "xml", ext: ["xml", "xsl", "xsd", "svg"], alias: ["rss", "wsdl", "xsd"] },
|
|
15437
|
-
{ name: "XQuery", mime: "application/xquery", mode: "xquery", ext: ["xy", "xquery"] },
|
|
15438
|
-
{ name: "Yacas", mime: "text/x-yacas", mode: "yacas", ext: ["ys"] },
|
|
15439
|
-
{ name: "YAML", mimes: ["text/x-yaml", "text/yaml"], mode: "yaml", ext: ["yaml", "yml"], alias: ["yml"] },
|
|
15440
|
-
{ name: "Z80", mime: "text/x-z80", mode: "z80", ext: ["z80"] },
|
|
15441
|
-
{ name: "mscgen", mime: "text/x-mscgen", mode: "mscgen", ext: ["mscgen", "mscin", "msc"] },
|
|
15442
|
-
{ name: "xu", mime: "text/x-xu", mode: "mscgen", ext: ["xu"] },
|
|
15443
|
-
{ name: "msgenny", mime: "text/x-msgenny", mode: "mscgen", ext: ["msgenny"] },
|
|
15444
|
-
{ name: "WebAssembly", mime: "text/webassembly", mode: "wast", ext: ["wat", "wast"] }
|
|
15445
|
-
];
|
|
15446
|
-
for (var i = 0; i < CodeMirror.modeInfo.length; i++) {
|
|
15447
|
-
var info = CodeMirror.modeInfo[i];
|
|
15448
|
-
if (info.mimes) info.mime = info.mimes[0];
|
|
15449
|
-
}
|
|
15450
|
-
CodeMirror.findModeByMIME = function(mime) {
|
|
15451
|
-
mime = mime.toLowerCase();
|
|
15452
|
-
for (var i2 = 0; i2 < CodeMirror.modeInfo.length; i2++) {
|
|
15453
|
-
var info2 = CodeMirror.modeInfo[i2];
|
|
15454
|
-
if (info2.mime == mime) return info2;
|
|
15455
|
-
if (info2.mimes) {
|
|
15456
|
-
for (var j = 0; j < info2.mimes.length; j++)
|
|
15457
|
-
if (info2.mimes[j] == mime) return info2;
|
|
15458
|
-
}
|
|
15459
|
-
}
|
|
15460
|
-
if (/\+xml$/.test(mime)) return CodeMirror.findModeByMIME("application/xml");
|
|
15461
|
-
if (/\+json$/.test(mime)) return CodeMirror.findModeByMIME("application/json");
|
|
15462
|
-
};
|
|
15463
|
-
CodeMirror.findModeByExtension = function(ext) {
|
|
15464
|
-
ext = ext.toLowerCase();
|
|
15465
|
-
for (var i2 = 0; i2 < CodeMirror.modeInfo.length; i2++) {
|
|
15466
|
-
var info2 = CodeMirror.modeInfo[i2];
|
|
15467
|
-
if (info2.ext) {
|
|
15468
|
-
for (var j = 0; j < info2.ext.length; j++)
|
|
15469
|
-
if (info2.ext[j] == ext) return info2;
|
|
15470
|
-
}
|
|
15471
|
-
}
|
|
15472
|
-
};
|
|
15473
|
-
CodeMirror.findModeByFileName = function(filename) {
|
|
15474
|
-
for (var i2 = 0; i2 < CodeMirror.modeInfo.length; i2++) {
|
|
15475
|
-
var info2 = CodeMirror.modeInfo[i2];
|
|
15476
|
-
if (info2.file && info2.file.test(filename)) return info2;
|
|
15477
|
-
}
|
|
15478
|
-
var dot = filename.lastIndexOf(".");
|
|
15479
|
-
var ext = dot > -1 && filename.substring(dot + 1, filename.length);
|
|
15480
|
-
if (ext) return CodeMirror.findModeByExtension(ext);
|
|
15481
|
-
};
|
|
15482
|
-
CodeMirror.findModeByName = function(name) {
|
|
15483
|
-
name = name.toLowerCase();
|
|
15484
|
-
for (var i2 = 0; i2 < CodeMirror.modeInfo.length; i2++) {
|
|
15485
|
-
var info2 = CodeMirror.modeInfo[i2];
|
|
15486
|
-
if (info2.name.toLowerCase() == name) return info2;
|
|
15487
|
-
if (info2.alias) {
|
|
15488
|
-
for (var j = 0; j < info2.alias.length; j++)
|
|
15489
|
-
if (info2.alias[j].toLowerCase() == name) return info2;
|
|
15490
|
-
}
|
|
15491
|
-
}
|
|
15492
|
-
};
|
|
15493
|
-
});
|
|
15494
|
-
})();
|
|
15495
|
-
return meta.exports;
|
|
15496
|
-
}
|
|
15497
|
-
(function(module, exports) {
|
|
15498
|
-
(function(mod) {
|
|
15499
|
-
mod(requireCodemirror(), requireXml(), requireMeta());
|
|
15500
|
-
})(function(CodeMirror) {
|
|
15501
|
-
CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) {
|
|
15502
|
-
var htmlMode = CodeMirror.getMode(cmCfg, "text/html");
|
|
15503
|
-
var htmlModeMissing = htmlMode.name == "null";
|
|
15504
|
-
function getMode(name) {
|
|
15505
|
-
if (CodeMirror.findModeByName) {
|
|
15506
|
-
var found = CodeMirror.findModeByName(name);
|
|
15507
|
-
if (found) name = found.mime || found.mimes[0];
|
|
15508
|
-
}
|
|
15509
|
-
var mode2 = CodeMirror.getMode(cmCfg, name);
|
|
15510
|
-
return mode2.name == "null" ? null : mode2;
|
|
15511
|
-
}
|
|
15512
|
-
if (modeCfg.highlightFormatting === void 0)
|
|
15513
|
-
modeCfg.highlightFormatting = false;
|
|
15514
|
-
if (modeCfg.maxBlockquoteDepth === void 0)
|
|
15515
|
-
modeCfg.maxBlockquoteDepth = 0;
|
|
15516
|
-
if (modeCfg.taskLists === void 0) modeCfg.taskLists = false;
|
|
15517
|
-
if (modeCfg.strikethrough === void 0)
|
|
15518
|
-
modeCfg.strikethrough = false;
|
|
15519
|
-
if (modeCfg.emoji === void 0)
|
|
15520
|
-
modeCfg.emoji = false;
|
|
15521
|
-
if (modeCfg.fencedCodeBlockHighlighting === void 0)
|
|
15522
|
-
modeCfg.fencedCodeBlockHighlighting = true;
|
|
15523
|
-
if (modeCfg.fencedCodeBlockDefaultMode === void 0)
|
|
15524
|
-
modeCfg.fencedCodeBlockDefaultMode = "text/plain";
|
|
15525
|
-
if (modeCfg.xml === void 0)
|
|
15526
|
-
modeCfg.xml = true;
|
|
15527
|
-
if (modeCfg.tokenTypeOverrides === void 0)
|
|
15528
|
-
modeCfg.tokenTypeOverrides = {};
|
|
15529
|
-
var tokenTypes = {
|
|
15530
|
-
header: "header",
|
|
15531
|
-
code: "comment",
|
|
15532
|
-
quote: "quote",
|
|
15533
|
-
list1: "variable-2",
|
|
15534
|
-
list2: "variable-3",
|
|
15535
|
-
list3: "keyword",
|
|
15536
|
-
hr: "hr",
|
|
15537
|
-
image: "image",
|
|
15538
|
-
imageAltText: "image-alt-text",
|
|
15539
|
-
imageMarker: "image-marker",
|
|
15540
|
-
formatting: "formatting",
|
|
15541
|
-
linkInline: "link",
|
|
15542
|
-
linkEmail: "link",
|
|
15543
|
-
linkText: "link",
|
|
15544
|
-
linkHref: "string",
|
|
15545
|
-
em: "em",
|
|
15546
|
-
strong: "strong",
|
|
15547
|
-
strikethrough: "strikethrough",
|
|
15548
|
-
emoji: "builtin"
|
|
15549
|
-
};
|
|
15550
|
-
for (var tokenType in tokenTypes) {
|
|
15551
|
-
if (tokenTypes.hasOwnProperty(tokenType) && modeCfg.tokenTypeOverrides[tokenType]) {
|
|
15552
|
-
tokenTypes[tokenType] = modeCfg.tokenTypeOverrides[tokenType];
|
|
15553
|
-
}
|
|
15554
|
-
}
|
|
15555
|
-
var hrRE = /^([*\-_])(?:\s*\1){2,}\s*$/, listRE = /^(?:[*\-+]|^[0-9]+([.)]))\s+/, taskListRE = /^\[(x| )\](?=\s)/i, atxHeaderRE = modeCfg.allowAtxHeaderWithoutSpace ? /^(#+)/ : /^(#+)(?: |$)/, setextHeaderRE = /^ {0,3}(?:\={1,}|-{2,})\s*$/, textRE = /^[^#!\[\]*_\\<>` "'(~:]+/, fencedCodeRE = /^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/, linkDefRE = /^\s*\[[^\]]+?\]:.*$/, punctuation = /[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/, expandedTab = " ";
|
|
15556
|
-
function switchInline(stream, state, f) {
|
|
15557
|
-
state.f = state.inline = f;
|
|
15558
|
-
return f(stream, state);
|
|
15559
|
-
}
|
|
15560
|
-
function switchBlock(stream, state, f) {
|
|
15561
|
-
state.f = state.block = f;
|
|
15562
|
-
return f(stream, state);
|
|
15563
|
-
}
|
|
15564
|
-
function lineIsEmpty(line) {
|
|
15565
|
-
return !line || !/\S/.test(line.string);
|
|
15566
|
-
}
|
|
15567
|
-
function blankLine(state) {
|
|
15568
|
-
state.linkTitle = false;
|
|
15569
|
-
state.linkHref = false;
|
|
15570
|
-
state.linkText = false;
|
|
15571
|
-
state.em = false;
|
|
15572
|
-
state.strong = false;
|
|
15573
|
-
state.strikethrough = false;
|
|
15574
|
-
state.quote = 0;
|
|
15575
|
-
state.indentedCode = false;
|
|
15576
|
-
if (state.f == htmlBlock) {
|
|
15577
|
-
var exit = htmlModeMissing;
|
|
15578
|
-
if (!exit) {
|
|
15579
|
-
var inner = CodeMirror.innerMode(htmlMode, state.htmlState);
|
|
15580
|
-
exit = inner.mode.name == "xml" && inner.state.tagStart === null && (!inner.state.context && inner.state.tokenize.isInText);
|
|
15581
|
-
}
|
|
15582
|
-
if (exit) {
|
|
15583
|
-
state.f = inlineNormal;
|
|
15584
|
-
state.block = blockNormal;
|
|
15585
|
-
state.htmlState = null;
|
|
15586
|
-
}
|
|
15587
|
-
}
|
|
15588
|
-
state.trailingSpace = 0;
|
|
15589
|
-
state.trailingSpaceNewLine = false;
|
|
15590
|
-
state.prevLine = state.thisLine;
|
|
15591
|
-
state.thisLine = { stream: null };
|
|
15592
|
-
return null;
|
|
15593
|
-
}
|
|
15594
|
-
function blockNormal(stream, state) {
|
|
15595
|
-
var firstTokenOnLine = stream.column() === state.indentation;
|
|
15596
|
-
var prevLineLineIsEmpty = lineIsEmpty(state.prevLine.stream);
|
|
15597
|
-
var prevLineIsIndentedCode = state.indentedCode;
|
|
15598
|
-
var prevLineIsHr = state.prevLine.hr;
|
|
15599
|
-
var prevLineIsList = state.list !== false;
|
|
15600
|
-
var maxNonCodeIndentation = (state.listStack[state.listStack.length - 1] || 0) + 3;
|
|
15601
|
-
state.indentedCode = false;
|
|
15602
|
-
var lineIndentation = state.indentation;
|
|
15603
|
-
if (state.indentationDiff === null) {
|
|
15604
|
-
state.indentationDiff = state.indentation;
|
|
15605
|
-
if (prevLineIsList) {
|
|
15606
|
-
state.list = null;
|
|
15607
|
-
while (lineIndentation < state.listStack[state.listStack.length - 1]) {
|
|
15608
|
-
state.listStack.pop();
|
|
15609
|
-
if (state.listStack.length) {
|
|
15610
|
-
state.indentation = state.listStack[state.listStack.length - 1];
|
|
15611
|
-
} else {
|
|
15612
|
-
state.list = false;
|
|
15613
|
-
}
|
|
15614
|
-
}
|
|
15615
|
-
if (state.list !== false) {
|
|
15616
|
-
state.indentationDiff = lineIndentation - state.listStack[state.listStack.length - 1];
|
|
15617
|
-
}
|
|
15618
|
-
}
|
|
15619
|
-
}
|
|
15620
|
-
var allowsInlineContinuation = !prevLineLineIsEmpty && !prevLineIsHr && !state.prevLine.header && (!prevLineIsList || !prevLineIsIndentedCode) && !state.prevLine.fencedCodeEnd;
|
|
15621
|
-
var isHr = (state.list === false || prevLineIsHr || prevLineLineIsEmpty) && state.indentation <= maxNonCodeIndentation && stream.match(hrRE);
|
|
15622
|
-
var match = null;
|
|
15623
|
-
if (state.indentationDiff >= 4 && (prevLineIsIndentedCode || state.prevLine.fencedCodeEnd || state.prevLine.header || prevLineLineIsEmpty)) {
|
|
15624
|
-
stream.skipToEnd();
|
|
15625
|
-
state.indentedCode = true;
|
|
15626
|
-
return tokenTypes.code;
|
|
15627
|
-
} else if (stream.eatSpace()) {
|
|
15628
|
-
return null;
|
|
15629
|
-
} else if (firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(atxHeaderRE)) && match[1].length <= 6) {
|
|
15630
|
-
state.quote = 0;
|
|
15631
|
-
state.header = match[1].length;
|
|
15632
|
-
state.thisLine.header = true;
|
|
15633
|
-
if (modeCfg.highlightFormatting) state.formatting = "header";
|
|
15634
|
-
state.f = state.inline;
|
|
15635
|
-
return getType(state);
|
|
15636
|
-
} else if (state.indentation <= maxNonCodeIndentation && stream.eat(">")) {
|
|
15637
|
-
state.quote = firstTokenOnLine ? 1 : state.quote + 1;
|
|
15638
|
-
if (modeCfg.highlightFormatting) state.formatting = "quote";
|
|
15639
|
-
stream.eatSpace();
|
|
15640
|
-
return getType(state);
|
|
15641
|
-
} else if (!isHr && !state.setext && firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(listRE))) {
|
|
15642
|
-
var listType = match[1] ? "ol" : "ul";
|
|
15643
|
-
state.indentation = lineIndentation + stream.current().length;
|
|
15644
|
-
state.list = true;
|
|
15645
|
-
state.quote = 0;
|
|
15646
|
-
state.listStack.push(state.indentation);
|
|
15647
|
-
state.em = false;
|
|
15648
|
-
state.strong = false;
|
|
15649
|
-
state.code = false;
|
|
15650
|
-
state.strikethrough = false;
|
|
15651
|
-
if (modeCfg.taskLists && stream.match(taskListRE, false)) {
|
|
15652
|
-
state.taskList = true;
|
|
15653
|
-
}
|
|
15654
|
-
state.f = state.inline;
|
|
15655
|
-
if (modeCfg.highlightFormatting) state.formatting = ["list", "list-" + listType];
|
|
15656
|
-
return getType(state);
|
|
15657
|
-
} else if (firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(fencedCodeRE, true))) {
|
|
15658
|
-
state.quote = 0;
|
|
15659
|
-
state.fencedEndRE = new RegExp(match[1] + "+ *$");
|
|
15660
|
-
state.localMode = modeCfg.fencedCodeBlockHighlighting && getMode(match[2] || modeCfg.fencedCodeBlockDefaultMode);
|
|
15661
|
-
if (state.localMode) state.localState = CodeMirror.startState(state.localMode);
|
|
15662
|
-
state.f = state.block = local;
|
|
15663
|
-
if (modeCfg.highlightFormatting) state.formatting = "code-block";
|
|
15664
|
-
state.code = -1;
|
|
15665
|
-
return getType(state);
|
|
15666
|
-
} else if (
|
|
15667
|
-
// if setext set, indicates line after ---/===
|
|
15668
|
-
state.setext || // line before ---/===
|
|
15669
|
-
(!allowsInlineContinuation || !prevLineIsList) && !state.quote && state.list === false && !state.code && !isHr && !linkDefRE.test(stream.string) && (match = stream.lookAhead(1)) && (match = match.match(setextHeaderRE))
|
|
15670
|
-
) {
|
|
15671
|
-
if (!state.setext) {
|
|
15672
|
-
state.header = match[0].charAt(0) == "=" ? 1 : 2;
|
|
15673
|
-
state.setext = state.header;
|
|
15674
|
-
} else {
|
|
15675
|
-
state.header = state.setext;
|
|
15676
|
-
state.setext = 0;
|
|
15677
|
-
stream.skipToEnd();
|
|
15678
|
-
if (modeCfg.highlightFormatting) state.formatting = "header";
|
|
15679
|
-
}
|
|
15680
|
-
state.thisLine.header = true;
|
|
15681
|
-
state.f = state.inline;
|
|
15682
|
-
return getType(state);
|
|
15683
|
-
} else if (isHr) {
|
|
15684
|
-
stream.skipToEnd();
|
|
15685
|
-
state.hr = true;
|
|
15686
|
-
state.thisLine.hr = true;
|
|
15687
|
-
return tokenTypes.hr;
|
|
15688
|
-
} else if (stream.peek() === "[") {
|
|
15689
|
-
return switchInline(stream, state, footnoteLink);
|
|
15690
|
-
}
|
|
15691
|
-
return switchInline(stream, state, state.inline);
|
|
15692
|
-
}
|
|
15693
|
-
function htmlBlock(stream, state) {
|
|
15694
|
-
var style = htmlMode.token(stream, state.htmlState);
|
|
15695
|
-
if (!htmlModeMissing) {
|
|
15696
|
-
var inner = CodeMirror.innerMode(htmlMode, state.htmlState);
|
|
15697
|
-
if (inner.mode.name == "xml" && inner.state.tagStart === null && (!inner.state.context && inner.state.tokenize.isInText) || state.md_inside && stream.current().indexOf(">") > -1) {
|
|
15698
|
-
state.f = inlineNormal;
|
|
15699
|
-
state.block = blockNormal;
|
|
15700
|
-
state.htmlState = null;
|
|
15701
|
-
}
|
|
15702
|
-
}
|
|
15703
|
-
return style;
|
|
15704
|
-
}
|
|
15705
|
-
function local(stream, state) {
|
|
15706
|
-
var currListInd = state.listStack[state.listStack.length - 1] || 0;
|
|
15707
|
-
var hasExitedList = state.indentation < currListInd;
|
|
15708
|
-
var maxFencedEndInd = currListInd + 3;
|
|
15709
|
-
if (state.fencedEndRE && state.indentation <= maxFencedEndInd && (hasExitedList || stream.match(state.fencedEndRE))) {
|
|
15710
|
-
if (modeCfg.highlightFormatting) state.formatting = "code-block";
|
|
15711
|
-
var returnType;
|
|
15712
|
-
if (!hasExitedList) returnType = getType(state);
|
|
15713
|
-
state.localMode = state.localState = null;
|
|
15714
|
-
state.block = blockNormal;
|
|
15715
|
-
state.f = inlineNormal;
|
|
15716
|
-
state.fencedEndRE = null;
|
|
15717
|
-
state.code = 0;
|
|
15718
|
-
state.thisLine.fencedCodeEnd = true;
|
|
15719
|
-
if (hasExitedList) return switchBlock(stream, state, state.block);
|
|
15720
|
-
return returnType;
|
|
15721
|
-
} else if (state.localMode) {
|
|
15722
|
-
return state.localMode.token(stream, state.localState);
|
|
15723
|
-
} else {
|
|
15724
|
-
stream.skipToEnd();
|
|
15725
|
-
return tokenTypes.code;
|
|
15726
|
-
}
|
|
15727
|
-
}
|
|
15728
|
-
function getType(state) {
|
|
15729
|
-
var styles = [];
|
|
15730
|
-
if (state.formatting) {
|
|
15731
|
-
styles.push(tokenTypes.formatting);
|
|
15732
|
-
if (typeof state.formatting === "string") state.formatting = [state.formatting];
|
|
15733
|
-
for (var i = 0; i < state.formatting.length; i++) {
|
|
15734
|
-
styles.push(tokenTypes.formatting + "-" + state.formatting[i]);
|
|
15735
|
-
if (state.formatting[i] === "header") {
|
|
15736
|
-
styles.push(tokenTypes.formatting + "-" + state.formatting[i] + "-" + state.header);
|
|
15737
|
-
}
|
|
15738
|
-
if (state.formatting[i] === "quote") {
|
|
15739
|
-
if (!modeCfg.maxBlockquoteDepth || modeCfg.maxBlockquoteDepth >= state.quote) {
|
|
15740
|
-
styles.push(tokenTypes.formatting + "-" + state.formatting[i] + "-" + state.quote);
|
|
15741
|
-
} else {
|
|
15742
|
-
styles.push("error");
|
|
15743
|
-
}
|
|
15744
|
-
}
|
|
15745
|
-
}
|
|
15746
|
-
}
|
|
15747
|
-
if (state.taskOpen) {
|
|
15748
|
-
styles.push("meta");
|
|
15749
|
-
return styles.length ? styles.join(" ") : null;
|
|
15750
|
-
}
|
|
15751
|
-
if (state.taskClosed) {
|
|
15752
|
-
styles.push("property");
|
|
15753
|
-
return styles.length ? styles.join(" ") : null;
|
|
15754
|
-
}
|
|
15755
|
-
if (state.linkHref) {
|
|
15756
|
-
styles.push(tokenTypes.linkHref, "url");
|
|
15757
|
-
} else {
|
|
15758
|
-
if (state.strong) {
|
|
15759
|
-
styles.push(tokenTypes.strong);
|
|
15760
|
-
}
|
|
15761
|
-
if (state.em) {
|
|
15762
|
-
styles.push(tokenTypes.em);
|
|
15763
|
-
}
|
|
15764
|
-
if (state.strikethrough) {
|
|
15765
|
-
styles.push(tokenTypes.strikethrough);
|
|
15766
|
-
}
|
|
15767
|
-
if (state.emoji) {
|
|
15768
|
-
styles.push(tokenTypes.emoji);
|
|
15769
|
-
}
|
|
15770
|
-
if (state.linkText) {
|
|
15771
|
-
styles.push(tokenTypes.linkText);
|
|
15772
|
-
}
|
|
15773
|
-
if (state.code) {
|
|
15774
|
-
styles.push(tokenTypes.code);
|
|
15775
|
-
}
|
|
15776
|
-
if (state.image) {
|
|
15777
|
-
styles.push(tokenTypes.image);
|
|
15778
|
-
}
|
|
15779
|
-
if (state.imageAltText) {
|
|
15780
|
-
styles.push(tokenTypes.imageAltText, "link");
|
|
15781
|
-
}
|
|
15782
|
-
if (state.imageMarker) {
|
|
15783
|
-
styles.push(tokenTypes.imageMarker);
|
|
15784
|
-
}
|
|
15785
|
-
}
|
|
15786
|
-
if (state.header) {
|
|
15787
|
-
styles.push(tokenTypes.header, tokenTypes.header + "-" + state.header);
|
|
15788
|
-
}
|
|
15789
|
-
if (state.quote) {
|
|
15790
|
-
styles.push(tokenTypes.quote);
|
|
15791
|
-
if (!modeCfg.maxBlockquoteDepth || modeCfg.maxBlockquoteDepth >= state.quote) {
|
|
15792
|
-
styles.push(tokenTypes.quote + "-" + state.quote);
|
|
15793
|
-
} else {
|
|
15794
|
-
styles.push(tokenTypes.quote + "-" + modeCfg.maxBlockquoteDepth);
|
|
15795
|
-
}
|
|
15796
|
-
}
|
|
15797
|
-
if (state.list !== false) {
|
|
15798
|
-
var listMod = (state.listStack.length - 1) % 3;
|
|
15799
|
-
if (!listMod) {
|
|
15800
|
-
styles.push(tokenTypes.list1);
|
|
15801
|
-
} else if (listMod === 1) {
|
|
15802
|
-
styles.push(tokenTypes.list2);
|
|
15803
|
-
} else {
|
|
15804
|
-
styles.push(tokenTypes.list3);
|
|
15805
|
-
}
|
|
15806
|
-
}
|
|
15807
|
-
if (state.trailingSpaceNewLine) {
|
|
15808
|
-
styles.push("trailing-space-new-line");
|
|
15809
|
-
} else if (state.trailingSpace) {
|
|
15810
|
-
styles.push("trailing-space-" + (state.trailingSpace % 2 ? "a" : "b"));
|
|
15811
|
-
}
|
|
15812
|
-
return styles.length ? styles.join(" ") : null;
|
|
15813
|
-
}
|
|
15814
|
-
function handleText(stream, state) {
|
|
15815
|
-
if (stream.match(textRE, true)) {
|
|
15816
|
-
return getType(state);
|
|
15817
|
-
}
|
|
15818
|
-
return void 0;
|
|
15819
|
-
}
|
|
15820
|
-
function inlineNormal(stream, state) {
|
|
15821
|
-
var style = state.text(stream, state);
|
|
15822
|
-
if (typeof style !== "undefined")
|
|
15823
|
-
return style;
|
|
15824
|
-
if (state.list) {
|
|
15825
|
-
state.list = null;
|
|
15826
|
-
return getType(state);
|
|
15827
|
-
}
|
|
15828
|
-
if (state.taskList) {
|
|
15829
|
-
var taskOpen = stream.match(taskListRE, true)[1] === " ";
|
|
15830
|
-
if (taskOpen) state.taskOpen = true;
|
|
15831
|
-
else state.taskClosed = true;
|
|
15832
|
-
if (modeCfg.highlightFormatting) state.formatting = "task";
|
|
15833
|
-
state.taskList = false;
|
|
15834
|
-
return getType(state);
|
|
15835
|
-
}
|
|
15836
|
-
state.taskOpen = false;
|
|
15837
|
-
state.taskClosed = false;
|
|
15838
|
-
if (state.header && stream.match(/^#+$/, true)) {
|
|
15839
|
-
if (modeCfg.highlightFormatting) state.formatting = "header";
|
|
15840
|
-
return getType(state);
|
|
15841
|
-
}
|
|
15842
|
-
var ch = stream.next();
|
|
15843
|
-
if (state.linkTitle) {
|
|
15844
|
-
state.linkTitle = false;
|
|
15845
|
-
var matchCh = ch;
|
|
15846
|
-
if (ch === "(") {
|
|
15847
|
-
matchCh = ")";
|
|
15848
|
-
}
|
|
15849
|
-
matchCh = (matchCh + "").replace(/([.?*+^\[\]\\(){}|-])/g, "\\$1");
|
|
15850
|
-
var regex = "^\\s*(?:[^" + matchCh + "\\\\]+|\\\\\\\\|\\\\.)" + matchCh;
|
|
15851
|
-
if (stream.match(new RegExp(regex), true)) {
|
|
15852
|
-
return tokenTypes.linkHref;
|
|
15853
|
-
}
|
|
15854
|
-
}
|
|
15855
|
-
if (ch === "`") {
|
|
15856
|
-
var previousFormatting = state.formatting;
|
|
15857
|
-
if (modeCfg.highlightFormatting) state.formatting = "code";
|
|
15858
|
-
stream.eatWhile("`");
|
|
15859
|
-
var count = stream.current().length;
|
|
15860
|
-
if (state.code == 0 && (!state.quote || count == 1)) {
|
|
15861
|
-
state.code = count;
|
|
15862
|
-
return getType(state);
|
|
15863
|
-
} else if (count == state.code) {
|
|
15864
|
-
var t = getType(state);
|
|
15865
|
-
state.code = 0;
|
|
15866
|
-
return t;
|
|
15867
|
-
} else {
|
|
15868
|
-
state.formatting = previousFormatting;
|
|
15869
|
-
return getType(state);
|
|
15870
|
-
}
|
|
15871
|
-
} else if (state.code) {
|
|
15872
|
-
return getType(state);
|
|
15873
|
-
}
|
|
15874
|
-
if (ch === "\\") {
|
|
15875
|
-
stream.next();
|
|
15876
|
-
if (modeCfg.highlightFormatting) {
|
|
15877
|
-
var type = getType(state);
|
|
15878
|
-
var formattingEscape = tokenTypes.formatting + "-escape";
|
|
15879
|
-
return type ? type + " " + formattingEscape : formattingEscape;
|
|
15880
|
-
}
|
|
15881
|
-
}
|
|
15882
|
-
if (ch === "!" && stream.match(/\[[^\]]*\] ?(?:\(|\[)/, false)) {
|
|
15883
|
-
state.imageMarker = true;
|
|
15884
|
-
state.image = true;
|
|
15885
|
-
if (modeCfg.highlightFormatting) state.formatting = "image";
|
|
15886
|
-
return getType(state);
|
|
15887
|
-
}
|
|
15888
|
-
if (ch === "[" && state.imageMarker && stream.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/, false)) {
|
|
15889
|
-
state.imageMarker = false;
|
|
15890
|
-
state.imageAltText = true;
|
|
15891
|
-
if (modeCfg.highlightFormatting) state.formatting = "image";
|
|
15892
|
-
return getType(state);
|
|
15893
|
-
}
|
|
15894
|
-
if (ch === "]" && state.imageAltText) {
|
|
15895
|
-
if (modeCfg.highlightFormatting) state.formatting = "image";
|
|
15896
|
-
var type = getType(state);
|
|
15897
|
-
state.imageAltText = false;
|
|
15898
|
-
state.image = false;
|
|
15899
|
-
state.inline = state.f = linkHref;
|
|
15900
|
-
return type;
|
|
15901
|
-
}
|
|
15902
|
-
if (ch === "[" && !state.image) {
|
|
15903
|
-
if (state.linkText && stream.match(/^.*?\]/)) return getType(state);
|
|
15904
|
-
state.linkText = true;
|
|
15905
|
-
if (modeCfg.highlightFormatting) state.formatting = "link";
|
|
15906
|
-
return getType(state);
|
|
15907
|
-
}
|
|
15908
|
-
if (ch === "]" && state.linkText) {
|
|
15909
|
-
if (modeCfg.highlightFormatting) state.formatting = "link";
|
|
15910
|
-
var type = getType(state);
|
|
15911
|
-
state.linkText = false;
|
|
15912
|
-
state.inline = state.f = stream.match(/\(.*?\)| ?\[.*?\]/, false) ? linkHref : inlineNormal;
|
|
15913
|
-
return type;
|
|
15914
|
-
}
|
|
15915
|
-
if (ch === "<" && stream.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/, false)) {
|
|
15916
|
-
state.f = state.inline = linkInline;
|
|
15917
|
-
if (modeCfg.highlightFormatting) state.formatting = "link";
|
|
15918
|
-
var type = getType(state);
|
|
15919
|
-
if (type) {
|
|
15920
|
-
type += " ";
|
|
15921
|
-
} else {
|
|
15922
|
-
type = "";
|
|
15923
|
-
}
|
|
15924
|
-
return type + tokenTypes.linkInline;
|
|
15925
|
-
}
|
|
15926
|
-
if (ch === "<" && stream.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/, false)) {
|
|
15927
|
-
state.f = state.inline = linkInline;
|
|
15928
|
-
if (modeCfg.highlightFormatting) state.formatting = "link";
|
|
15929
|
-
var type = getType(state);
|
|
15930
|
-
if (type) {
|
|
15931
|
-
type += " ";
|
|
15932
|
-
} else {
|
|
15933
|
-
type = "";
|
|
15934
|
-
}
|
|
15935
|
-
return type + tokenTypes.linkEmail;
|
|
15936
|
-
}
|
|
15937
|
-
if (modeCfg.xml && ch === "<" && stream.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i, false)) {
|
|
15938
|
-
var end = stream.string.indexOf(">", stream.pos);
|
|
15939
|
-
if (end != -1) {
|
|
15940
|
-
var atts = stream.string.substring(stream.start, end);
|
|
15941
|
-
if (/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(atts)) state.md_inside = true;
|
|
15942
|
-
}
|
|
15943
|
-
stream.backUp(1);
|
|
15944
|
-
state.htmlState = CodeMirror.startState(htmlMode);
|
|
15945
|
-
return switchBlock(stream, state, htmlBlock);
|
|
15946
|
-
}
|
|
15947
|
-
if (modeCfg.xml && ch === "<" && stream.match(/^\/\w*?>/)) {
|
|
15948
|
-
state.md_inside = false;
|
|
15949
|
-
return "tag";
|
|
15950
|
-
} else if (ch === "*" || ch === "_") {
|
|
15951
|
-
var len = 1, before = stream.pos == 1 ? " " : stream.string.charAt(stream.pos - 2);
|
|
15952
|
-
while (len < 3 && stream.eat(ch)) len++;
|
|
15953
|
-
var after = stream.peek() || " ";
|
|
15954
|
-
var leftFlanking = !/\s/.test(after) && (!punctuation.test(after) || /\s/.test(before) || punctuation.test(before));
|
|
15955
|
-
var rightFlanking = !/\s/.test(before) && (!punctuation.test(before) || /\s/.test(after) || punctuation.test(after));
|
|
15956
|
-
var setEm = null, setStrong = null;
|
|
15957
|
-
if (len % 2) {
|
|
15958
|
-
if (!state.em && leftFlanking && (ch === "*" || !rightFlanking || punctuation.test(before)))
|
|
15959
|
-
setEm = true;
|
|
15960
|
-
else if (state.em == ch && rightFlanking && (ch === "*" || !leftFlanking || punctuation.test(after)))
|
|
15961
|
-
setEm = false;
|
|
15962
|
-
}
|
|
15963
|
-
if (len > 1) {
|
|
15964
|
-
if (!state.strong && leftFlanking && (ch === "*" || !rightFlanking || punctuation.test(before)))
|
|
15965
|
-
setStrong = true;
|
|
15966
|
-
else if (state.strong == ch && rightFlanking && (ch === "*" || !leftFlanking || punctuation.test(after)))
|
|
15967
|
-
setStrong = false;
|
|
15968
|
-
}
|
|
15969
|
-
if (setStrong != null || setEm != null) {
|
|
15970
|
-
if (modeCfg.highlightFormatting) state.formatting = setEm == null ? "strong" : setStrong == null ? "em" : "strong em";
|
|
15971
|
-
if (setEm === true) state.em = ch;
|
|
15972
|
-
if (setStrong === true) state.strong = ch;
|
|
15973
|
-
var t = getType(state);
|
|
15974
|
-
if (setEm === false) state.em = false;
|
|
15975
|
-
if (setStrong === false) state.strong = false;
|
|
15976
|
-
return t;
|
|
15977
|
-
}
|
|
15978
|
-
} else if (ch === " ") {
|
|
15979
|
-
if (stream.eat("*") || stream.eat("_")) {
|
|
15980
|
-
if (stream.peek() === " ") {
|
|
15981
|
-
return getType(state);
|
|
15982
|
-
} else {
|
|
15983
|
-
stream.backUp(1);
|
|
15984
|
-
}
|
|
15985
|
-
}
|
|
15986
|
-
}
|
|
15987
|
-
if (modeCfg.strikethrough) {
|
|
15988
|
-
if (ch === "~" && stream.eatWhile(ch)) {
|
|
15989
|
-
if (state.strikethrough) {
|
|
15990
|
-
if (modeCfg.highlightFormatting) state.formatting = "strikethrough";
|
|
15991
|
-
var t = getType(state);
|
|
15992
|
-
state.strikethrough = false;
|
|
15993
|
-
return t;
|
|
15994
|
-
} else if (stream.match(/^[^\s]/, false)) {
|
|
15995
|
-
state.strikethrough = true;
|
|
15996
|
-
if (modeCfg.highlightFormatting) state.formatting = "strikethrough";
|
|
15997
|
-
return getType(state);
|
|
15998
|
-
}
|
|
15999
|
-
} else if (ch === " ") {
|
|
16000
|
-
if (stream.match("~~", true)) {
|
|
16001
|
-
if (stream.peek() === " ") {
|
|
16002
|
-
return getType(state);
|
|
16003
|
-
} else {
|
|
16004
|
-
stream.backUp(2);
|
|
16005
|
-
}
|
|
16006
|
-
}
|
|
16007
|
-
}
|
|
16008
|
-
}
|
|
16009
|
-
if (modeCfg.emoji && ch === ":" && stream.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)) {
|
|
16010
|
-
state.emoji = true;
|
|
16011
|
-
if (modeCfg.highlightFormatting) state.formatting = "emoji";
|
|
16012
|
-
var retType = getType(state);
|
|
16013
|
-
state.emoji = false;
|
|
16014
|
-
return retType;
|
|
16015
|
-
}
|
|
16016
|
-
if (ch === " ") {
|
|
16017
|
-
if (stream.match(/^ +$/, false)) {
|
|
16018
|
-
state.trailingSpace++;
|
|
16019
|
-
} else if (state.trailingSpace) {
|
|
16020
|
-
state.trailingSpaceNewLine = true;
|
|
16021
|
-
}
|
|
16022
|
-
}
|
|
16023
|
-
return getType(state);
|
|
16024
|
-
}
|
|
16025
|
-
function linkInline(stream, state) {
|
|
16026
|
-
var ch = stream.next();
|
|
16027
|
-
if (ch === ">") {
|
|
16028
|
-
state.f = state.inline = inlineNormal;
|
|
16029
|
-
if (modeCfg.highlightFormatting) state.formatting = "link";
|
|
16030
|
-
var type = getType(state);
|
|
16031
|
-
if (type) {
|
|
16032
|
-
type += " ";
|
|
16033
|
-
} else {
|
|
16034
|
-
type = "";
|
|
16035
|
-
}
|
|
16036
|
-
return type + tokenTypes.linkInline;
|
|
16037
|
-
}
|
|
16038
|
-
stream.match(/^[^>]+/, true);
|
|
16039
|
-
return tokenTypes.linkInline;
|
|
16040
|
-
}
|
|
16041
|
-
function linkHref(stream, state) {
|
|
16042
|
-
if (stream.eatSpace()) {
|
|
16043
|
-
return null;
|
|
16044
|
-
}
|
|
16045
|
-
var ch = stream.next();
|
|
16046
|
-
if (ch === "(" || ch === "[") {
|
|
16047
|
-
state.f = state.inline = getLinkHrefInside(ch === "(" ? ")" : "]");
|
|
16048
|
-
if (modeCfg.highlightFormatting) state.formatting = "link-string";
|
|
16049
|
-
state.linkHref = true;
|
|
16050
|
-
return getType(state);
|
|
16051
|
-
}
|
|
16052
|
-
return "error";
|
|
16053
|
-
}
|
|
16054
|
-
var linkRE = {
|
|
16055
|
-
")": /^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,
|
|
16056
|
-
"]": /^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/
|
|
16057
|
-
};
|
|
16058
|
-
function getLinkHrefInside(endChar) {
|
|
16059
|
-
return function(stream, state) {
|
|
16060
|
-
var ch = stream.next();
|
|
16061
|
-
if (ch === endChar) {
|
|
16062
|
-
state.f = state.inline = inlineNormal;
|
|
16063
|
-
if (modeCfg.highlightFormatting) state.formatting = "link-string";
|
|
16064
|
-
var returnState = getType(state);
|
|
16065
|
-
state.linkHref = false;
|
|
16066
|
-
return returnState;
|
|
16067
|
-
}
|
|
16068
|
-
stream.match(linkRE[endChar]);
|
|
16069
|
-
state.linkHref = true;
|
|
16070
|
-
return getType(state);
|
|
16071
|
-
};
|
|
16072
|
-
}
|
|
16073
|
-
function footnoteLink(stream, state) {
|
|
16074
|
-
if (stream.match(/^([^\]\\]|\\.)*\]:/, false)) {
|
|
16075
|
-
state.f = footnoteLinkInside;
|
|
16076
|
-
stream.next();
|
|
16077
|
-
if (modeCfg.highlightFormatting) state.formatting = "link";
|
|
16078
|
-
state.linkText = true;
|
|
16079
|
-
return getType(state);
|
|
16080
|
-
}
|
|
16081
|
-
return switchInline(stream, state, inlineNormal);
|
|
16082
|
-
}
|
|
16083
|
-
function footnoteLinkInside(stream, state) {
|
|
16084
|
-
if (stream.match("]:", true)) {
|
|
16085
|
-
state.f = state.inline = footnoteUrl;
|
|
16086
|
-
if (modeCfg.highlightFormatting) state.formatting = "link";
|
|
16087
|
-
var returnType = getType(state);
|
|
16088
|
-
state.linkText = false;
|
|
16089
|
-
return returnType;
|
|
16090
|
-
}
|
|
16091
|
-
stream.match(/^([^\]\\]|\\.)+/, true);
|
|
16092
|
-
return tokenTypes.linkText;
|
|
16093
|
-
}
|
|
16094
|
-
function footnoteUrl(stream, state) {
|
|
16095
|
-
if (stream.eatSpace()) {
|
|
16096
|
-
return null;
|
|
16097
|
-
}
|
|
16098
|
-
stream.match(/^[^\s]+/, true);
|
|
16099
|
-
if (stream.peek() === void 0) {
|
|
16100
|
-
state.linkTitle = true;
|
|
16101
|
-
} else {
|
|
16102
|
-
stream.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/, true);
|
|
16103
|
-
}
|
|
16104
|
-
state.f = state.inline = inlineNormal;
|
|
16105
|
-
return tokenTypes.linkHref + " url";
|
|
16106
|
-
}
|
|
16107
|
-
var mode = {
|
|
16108
|
-
startState: function() {
|
|
16109
|
-
return {
|
|
16110
|
-
f: blockNormal,
|
|
16111
|
-
prevLine: { stream: null },
|
|
16112
|
-
thisLine: { stream: null },
|
|
16113
|
-
block: blockNormal,
|
|
16114
|
-
htmlState: null,
|
|
16115
|
-
indentation: 0,
|
|
16116
|
-
inline: inlineNormal,
|
|
16117
|
-
text: handleText,
|
|
16118
|
-
formatting: false,
|
|
16119
|
-
linkText: false,
|
|
16120
|
-
linkHref: false,
|
|
16121
|
-
linkTitle: false,
|
|
16122
|
-
code: 0,
|
|
16123
|
-
em: false,
|
|
16124
|
-
strong: false,
|
|
16125
|
-
header: 0,
|
|
16126
|
-
setext: 0,
|
|
16127
|
-
hr: false,
|
|
16128
|
-
taskList: false,
|
|
16129
|
-
list: false,
|
|
16130
|
-
listStack: [],
|
|
16131
|
-
quote: 0,
|
|
16132
|
-
trailingSpace: 0,
|
|
16133
|
-
trailingSpaceNewLine: false,
|
|
16134
|
-
strikethrough: false,
|
|
16135
|
-
emoji: false,
|
|
16136
|
-
fencedEndRE: null
|
|
16137
|
-
};
|
|
16138
|
-
},
|
|
16139
|
-
copyState: function(s) {
|
|
16140
|
-
return {
|
|
16141
|
-
f: s.f,
|
|
16142
|
-
prevLine: s.prevLine,
|
|
16143
|
-
thisLine: s.thisLine,
|
|
16144
|
-
block: s.block,
|
|
16145
|
-
htmlState: s.htmlState && CodeMirror.copyState(htmlMode, s.htmlState),
|
|
16146
|
-
indentation: s.indentation,
|
|
16147
|
-
localMode: s.localMode,
|
|
16148
|
-
localState: s.localMode ? CodeMirror.copyState(s.localMode, s.localState) : null,
|
|
16149
|
-
inline: s.inline,
|
|
16150
|
-
text: s.text,
|
|
16151
|
-
formatting: false,
|
|
16152
|
-
linkText: s.linkText,
|
|
16153
|
-
linkTitle: s.linkTitle,
|
|
16154
|
-
linkHref: s.linkHref,
|
|
16155
|
-
code: s.code,
|
|
16156
|
-
em: s.em,
|
|
16157
|
-
strong: s.strong,
|
|
16158
|
-
strikethrough: s.strikethrough,
|
|
16159
|
-
emoji: s.emoji,
|
|
16160
|
-
header: s.header,
|
|
16161
|
-
setext: s.setext,
|
|
16162
|
-
hr: s.hr,
|
|
16163
|
-
taskList: s.taskList,
|
|
16164
|
-
list: s.list,
|
|
16165
|
-
listStack: s.listStack.slice(0),
|
|
16166
|
-
quote: s.quote,
|
|
16167
|
-
indentedCode: s.indentedCode,
|
|
16168
|
-
trailingSpace: s.trailingSpace,
|
|
16169
|
-
trailingSpaceNewLine: s.trailingSpaceNewLine,
|
|
16170
|
-
md_inside: s.md_inside,
|
|
16171
|
-
fencedEndRE: s.fencedEndRE
|
|
16172
|
-
};
|
|
16173
|
-
},
|
|
16174
|
-
token: function(stream, state) {
|
|
16175
|
-
state.formatting = false;
|
|
16176
|
-
if (stream != state.thisLine.stream) {
|
|
16177
|
-
state.header = 0;
|
|
16178
|
-
state.hr = false;
|
|
16179
|
-
if (stream.match(/^\s*$/, true)) {
|
|
16180
|
-
blankLine(state);
|
|
16181
|
-
return null;
|
|
16182
|
-
}
|
|
16183
|
-
state.prevLine = state.thisLine;
|
|
16184
|
-
state.thisLine = { stream };
|
|
16185
|
-
state.taskList = false;
|
|
16186
|
-
state.trailingSpace = 0;
|
|
16187
|
-
state.trailingSpaceNewLine = false;
|
|
16188
|
-
if (!state.localState) {
|
|
16189
|
-
state.f = state.block;
|
|
16190
|
-
if (state.f != htmlBlock) {
|
|
16191
|
-
var indentation = stream.match(/^\s*/, true)[0].replace(/\t/g, expandedTab).length;
|
|
16192
|
-
state.indentation = indentation;
|
|
16193
|
-
state.indentationDiff = null;
|
|
16194
|
-
if (indentation > 0) return null;
|
|
16195
|
-
}
|
|
16196
|
-
}
|
|
16197
|
-
}
|
|
16198
|
-
return state.f(stream, state);
|
|
16199
|
-
},
|
|
16200
|
-
innerMode: function(state) {
|
|
16201
|
-
if (state.block == htmlBlock) return { state: state.htmlState, mode: htmlMode };
|
|
16202
|
-
if (state.localState) return { state: state.localState, mode: state.localMode };
|
|
16203
|
-
return { state, mode };
|
|
16204
|
-
},
|
|
16205
|
-
indent: function(state, textAfter, line) {
|
|
16206
|
-
if (state.block == htmlBlock && htmlMode.indent) return htmlMode.indent(state.htmlState, textAfter, line);
|
|
16207
|
-
if (state.localState && state.localMode.indent) return state.localMode.indent(state.localState, textAfter, line);
|
|
16208
|
-
return CodeMirror.Pass;
|
|
16209
|
-
},
|
|
16210
|
-
blankLine,
|
|
16211
|
-
getType,
|
|
16212
|
-
blockCommentStart: "<!--",
|
|
16213
|
-
blockCommentEnd: "-->",
|
|
16214
|
-
closeBrackets: "()[]{}''\"\"``",
|
|
16215
|
-
fold: "markdown"
|
|
16216
|
-
};
|
|
16217
|
-
return mode;
|
|
16218
|
-
}, "xml");
|
|
16219
|
-
CodeMirror.defineMIME("text/markdown", "markdown");
|
|
16220
|
-
CodeMirror.defineMIME("text/x-markdown", "markdown");
|
|
16221
|
-
});
|
|
16222
|
-
})();
|
|
16223
|
-
(function(module, exports) {
|
|
16224
|
-
(function(mod) {
|
|
16225
|
-
mod(requireCodemirror());
|
|
16226
|
-
})(function(CodeMirror) {
|
|
16227
|
-
CodeMirror.defineSimpleMode = function(name, states) {
|
|
16228
|
-
CodeMirror.defineMode(name, function(config) {
|
|
16229
|
-
return CodeMirror.simpleMode(config, states);
|
|
16230
|
-
});
|
|
16231
|
-
};
|
|
16232
|
-
CodeMirror.simpleMode = function(config, states) {
|
|
16233
|
-
ensureState(states, "start");
|
|
16234
|
-
var states_ = {}, meta2 = states.meta || {}, hasIndentation = false;
|
|
16235
|
-
for (var state in states) if (state != meta2 && states.hasOwnProperty(state)) {
|
|
16236
|
-
var list = states_[state] = [], orig = states[state];
|
|
16237
|
-
for (var i = 0; i < orig.length; i++) {
|
|
16238
|
-
var data = orig[i];
|
|
16239
|
-
list.push(new Rule(data, states));
|
|
16240
|
-
if (data.indent || data.dedent) hasIndentation = true;
|
|
16241
|
-
}
|
|
16242
|
-
}
|
|
16243
|
-
var mode = {
|
|
16244
|
-
startState: function() {
|
|
16245
|
-
return {
|
|
16246
|
-
state: "start",
|
|
16247
|
-
pending: null,
|
|
16248
|
-
local: null,
|
|
16249
|
-
localState: null,
|
|
16250
|
-
indent: hasIndentation ? [] : null
|
|
16251
|
-
};
|
|
16252
|
-
},
|
|
16253
|
-
copyState: function(state2) {
|
|
16254
|
-
var s = {
|
|
16255
|
-
state: state2.state,
|
|
16256
|
-
pending: state2.pending,
|
|
16257
|
-
local: state2.local,
|
|
16258
|
-
localState: null,
|
|
16259
|
-
indent: state2.indent && state2.indent.slice(0)
|
|
16260
|
-
};
|
|
16261
|
-
if (state2.localState)
|
|
16262
|
-
s.localState = CodeMirror.copyState(state2.local.mode, state2.localState);
|
|
16263
|
-
if (state2.stack)
|
|
16264
|
-
s.stack = state2.stack.slice(0);
|
|
16265
|
-
for (var pers = state2.persistentStates; pers; pers = pers.next)
|
|
16266
|
-
s.persistentStates = {
|
|
16267
|
-
mode: pers.mode,
|
|
16268
|
-
spec: pers.spec,
|
|
16269
|
-
state: pers.state == state2.localState ? s.localState : CodeMirror.copyState(pers.mode, pers.state),
|
|
16270
|
-
next: s.persistentStates
|
|
16271
|
-
};
|
|
16272
|
-
return s;
|
|
16273
|
-
},
|
|
16274
|
-
token: tokenFunction(states_, config),
|
|
16275
|
-
innerMode: function(state2) {
|
|
16276
|
-
return state2.local && { mode: state2.local.mode, state: state2.localState };
|
|
16277
|
-
},
|
|
16278
|
-
indent: indentFunction(states_, meta2)
|
|
16279
|
-
};
|
|
16280
|
-
if (meta2) {
|
|
16281
|
-
for (var prop in meta2) if (meta2.hasOwnProperty(prop))
|
|
16282
|
-
mode[prop] = meta2[prop];
|
|
16283
|
-
}
|
|
16284
|
-
return mode;
|
|
16285
|
-
};
|
|
16286
|
-
function ensureState(states, name) {
|
|
16287
|
-
if (!states.hasOwnProperty(name))
|
|
16288
|
-
throw new Error("Undefined state " + name + " in simple mode");
|
|
16289
|
-
}
|
|
16290
|
-
function toRegex(val, caret) {
|
|
16291
|
-
if (!val) return /(?:)/;
|
|
16292
|
-
var flags = "";
|
|
16293
|
-
if (val instanceof RegExp) {
|
|
16294
|
-
if (val.ignoreCase) flags = "i";
|
|
16295
|
-
if (val.unicode) flags += "u";
|
|
16296
|
-
val = val.source;
|
|
16297
|
-
} else {
|
|
16298
|
-
val = String(val);
|
|
16299
|
-
}
|
|
16300
|
-
return new RegExp((caret === false ? "" : "^") + "(?:" + val + ")", flags);
|
|
16301
|
-
}
|
|
16302
|
-
function asToken(val) {
|
|
16303
|
-
if (!val) return null;
|
|
16304
|
-
if (val.apply) return val;
|
|
16305
|
-
if (typeof val == "string") return val.replace(/\./g, " ");
|
|
16306
|
-
var result = [];
|
|
16307
|
-
for (var i = 0; i < val.length; i++)
|
|
16308
|
-
result.push(val[i] && val[i].replace(/\./g, " "));
|
|
16309
|
-
return result;
|
|
16310
|
-
}
|
|
16311
|
-
function Rule(data, states) {
|
|
16312
|
-
if (data.next || data.push) ensureState(states, data.next || data.push);
|
|
16313
|
-
this.regex = toRegex(data.regex);
|
|
16314
|
-
this.token = asToken(data.token);
|
|
16315
|
-
this.data = data;
|
|
16316
|
-
}
|
|
16317
|
-
function tokenFunction(states, config) {
|
|
16318
|
-
return function(stream, state) {
|
|
16319
|
-
if (state.pending) {
|
|
16320
|
-
var pend = state.pending.shift();
|
|
16321
|
-
if (state.pending.length == 0) state.pending = null;
|
|
16322
|
-
stream.pos += pend.text.length;
|
|
16323
|
-
return pend.token;
|
|
16324
|
-
}
|
|
16325
|
-
if (state.local) {
|
|
16326
|
-
if (state.local.end && stream.match(state.local.end)) {
|
|
16327
|
-
var tok = state.local.endToken || null;
|
|
16328
|
-
state.local = state.localState = null;
|
|
16329
|
-
return tok;
|
|
16330
|
-
} else {
|
|
16331
|
-
var tok = state.local.mode.token(stream, state.localState), m;
|
|
16332
|
-
if (state.local.endScan && (m = state.local.endScan.exec(stream.current())))
|
|
16333
|
-
stream.pos = stream.start + m.index;
|
|
16334
|
-
return tok;
|
|
16335
|
-
}
|
|
16336
|
-
}
|
|
16337
|
-
var curState = states[state.state];
|
|
16338
|
-
for (var i = 0; i < curState.length; i++) {
|
|
16339
|
-
var rule = curState[i];
|
|
16340
|
-
var matches = (!rule.data.sol || stream.sol()) && stream.match(rule.regex);
|
|
16341
|
-
if (matches) {
|
|
16342
|
-
if (rule.data.next) {
|
|
16343
|
-
state.state = rule.data.next;
|
|
16344
|
-
} else if (rule.data.push) {
|
|
16345
|
-
(state.stack || (state.stack = [])).push(state.state);
|
|
16346
|
-
state.state = rule.data.push;
|
|
16347
|
-
} else if (rule.data.pop && state.stack && state.stack.length) {
|
|
16348
|
-
state.state = state.stack.pop();
|
|
16349
|
-
}
|
|
16350
|
-
if (rule.data.mode)
|
|
16351
|
-
enterLocalMode(config, state, rule.data.mode, rule.token);
|
|
16352
|
-
if (rule.data.indent)
|
|
16353
|
-
state.indent.push(stream.indentation() + config.indentUnit);
|
|
16354
|
-
if (rule.data.dedent)
|
|
16355
|
-
state.indent.pop();
|
|
16356
|
-
var token = rule.token;
|
|
16357
|
-
if (token && token.apply) token = token(matches);
|
|
16358
|
-
if (matches.length > 2 && rule.token && typeof rule.token != "string") {
|
|
16359
|
-
for (var j = 2; j < matches.length; j++)
|
|
16360
|
-
if (matches[j])
|
|
16361
|
-
(state.pending || (state.pending = [])).push({ text: matches[j], token: rule.token[j - 1] });
|
|
16362
|
-
stream.backUp(matches[0].length - (matches[1] ? matches[1].length : 0));
|
|
16363
|
-
return token[0];
|
|
16364
|
-
} else if (token && token.join) {
|
|
16365
|
-
return token[0];
|
|
16366
|
-
} else {
|
|
16367
|
-
return token;
|
|
16368
|
-
}
|
|
16369
|
-
}
|
|
16370
|
-
}
|
|
16371
|
-
stream.next();
|
|
16372
|
-
return null;
|
|
16373
|
-
};
|
|
16374
|
-
}
|
|
16375
|
-
function cmp(a, b) {
|
|
16376
|
-
if (a === b) return true;
|
|
16377
|
-
if (!a || typeof a != "object" || !b || typeof b != "object") return false;
|
|
16378
|
-
var props = 0;
|
|
16379
|
-
for (var prop in a) if (a.hasOwnProperty(prop)) {
|
|
16380
|
-
if (!b.hasOwnProperty(prop) || !cmp(a[prop], b[prop])) return false;
|
|
16381
|
-
props++;
|
|
16382
|
-
}
|
|
16383
|
-
for (var prop in b) if (b.hasOwnProperty(prop)) props--;
|
|
16384
|
-
return props == 0;
|
|
16385
|
-
}
|
|
16386
|
-
function enterLocalMode(config, state, spec, token) {
|
|
16387
|
-
var pers;
|
|
16388
|
-
if (spec.persistent) {
|
|
16389
|
-
for (var p = state.persistentStates; p && !pers; p = p.next)
|
|
16390
|
-
if (spec.spec ? cmp(spec.spec, p.spec) : spec.mode == p.mode) pers = p;
|
|
16391
|
-
}
|
|
16392
|
-
var mode = pers ? pers.mode : spec.mode || CodeMirror.getMode(config, spec.spec);
|
|
16393
|
-
var lState = pers ? pers.state : CodeMirror.startState(mode);
|
|
16394
|
-
if (spec.persistent && !pers)
|
|
16395
|
-
state.persistentStates = { mode, spec: spec.spec, state: lState, next: state.persistentStates };
|
|
16396
|
-
state.localState = lState;
|
|
16397
|
-
state.local = {
|
|
16398
|
-
mode,
|
|
16399
|
-
end: spec.end && toRegex(spec.end),
|
|
16400
|
-
endScan: spec.end && spec.forceEnd !== false && toRegex(spec.end, false),
|
|
16401
|
-
endToken: token && token.join ? token[token.length - 1] : token
|
|
16402
|
-
};
|
|
16403
|
-
}
|
|
16404
|
-
function indexOf(val, arr) {
|
|
16405
|
-
for (var i = 0; i < arr.length; i++) if (arr[i] === val) return true;
|
|
16406
|
-
}
|
|
16407
|
-
function indentFunction(states, meta2) {
|
|
16408
|
-
return function(state, textAfter, line) {
|
|
16409
|
-
if (state.local && state.local.mode.indent)
|
|
16410
|
-
return state.local.mode.indent(state.localState, textAfter, line);
|
|
16411
|
-
if (state.indent == null || state.local || meta2.dontIndentStates && indexOf(state.state, meta2.dontIndentStates) > -1)
|
|
16412
|
-
return CodeMirror.Pass;
|
|
16413
|
-
var pos = state.indent.length - 1, rules = states[state.state];
|
|
16414
|
-
scan: for (; ; ) {
|
|
16415
|
-
for (var i = 0; i < rules.length; i++) {
|
|
16416
|
-
var rule = rules[i];
|
|
16417
|
-
if (rule.data.dedent && rule.data.dedentIfLineStart !== false) {
|
|
16418
|
-
var m = rule.regex.exec(textAfter);
|
|
16419
|
-
if (m && m[0]) {
|
|
16420
|
-
pos--;
|
|
16421
|
-
if (rule.next || rule.push) rules = states[rule.next || rule.push];
|
|
16422
|
-
textAfter = textAfter.slice(m[0].length);
|
|
16423
|
-
continue scan;
|
|
16424
|
-
}
|
|
16425
|
-
}
|
|
16426
|
-
}
|
|
16427
|
-
break;
|
|
16428
|
-
}
|
|
16429
|
-
return pos < 0 ? 0 : state.indent[pos];
|
|
16430
|
-
};
|
|
16431
|
-
}
|
|
16432
|
-
});
|
|
16433
|
-
})();
|
|
16434
15576
|
export {
|
|
16435
|
-
codemirror as default
|
|
15577
|
+
codemirror$1 as default
|
|
16436
15578
|
};
|
|
16437
|
-
//# sourceMappingURL=codeMirrorModule-
|
|
15579
|
+
//# sourceMappingURL=codeMirrorModule-f03b1a3e.js.map
|