@codingame/monaco-vscode-markdown-language-features-default-extension 34.1.1 → 35.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +78 -11
- package/package.json +2 -2
- package/resources/KaTeX_AMS-Regular-CYEKBG2K.woff +0 -0
- package/resources/KaTeX_AMS-Regular-JKX5W2C4.ttf +0 -0
- package/resources/KaTeX_AMS-Regular-U6PRYMIZ.woff2 +0 -0
- package/resources/KaTeX_Caligraphic-Bold-5QL5CMTE.woff2 +0 -0
- package/resources/KaTeX_Caligraphic-Bold-WZ3QSGD3.woff +0 -0
- package/resources/KaTeX_Caligraphic-Bold-ZTS3R3HK.ttf +0 -0
- package/resources/KaTeX_Caligraphic-Regular-3LKEU76G.woff +0 -0
- package/resources/KaTeX_Caligraphic-Regular-A7XRTZ5Q.ttf +0 -0
- package/resources/KaTeX_Caligraphic-Regular-KX5MEWCF.woff2 +0 -0
- package/resources/KaTeX_Fraktur-Bold-2QVFK6NQ.woff2 +0 -0
- package/resources/KaTeX_Fraktur-Bold-T4SWXBMT.woff +0 -0
- package/resources/KaTeX_Fraktur-Bold-WGHVTYOR.ttf +0 -0
- package/resources/KaTeX_Fraktur-Regular-2PEIFJSJ.woff2 +0 -0
- package/resources/KaTeX_Fraktur-Regular-5U4OPH2X.ttf +0 -0
- package/resources/KaTeX_Fraktur-Regular-PQMHCIK6.woff +0 -0
- package/resources/KaTeX_Main-Bold-2GA4IZIN.woff +0 -0
- package/resources/KaTeX_Main-Bold-W5FBVCZM.ttf +0 -0
- package/resources/KaTeX_Main-Bold-YP5VVQRP.woff2 +0 -0
- package/resources/KaTeX_Main-BoldItalic-4P4C7HJH.woff +0 -0
- package/resources/KaTeX_Main-BoldItalic-N4V3DX7S.woff2 +0 -0
- package/resources/KaTeX_Main-BoldItalic-ODMLBJJQ.ttf +0 -0
- package/resources/KaTeX_Main-Italic-I43T2HSR.ttf +0 -0
- package/resources/KaTeX_Main-Italic-RELBIK7M.woff2 +0 -0
- package/resources/KaTeX_Main-Italic-SASNQFN2.woff +0 -0
- package/resources/KaTeX_Main-Regular-ARRPAO67.woff2 +0 -0
- package/resources/KaTeX_Main-Regular-P5I74A2A.woff +0 -0
- package/resources/KaTeX_Main-Regular-W74P5G27.ttf +0 -0
- package/resources/KaTeX_Math-BoldItalic-6EBV3DK5.woff +0 -0
- package/resources/KaTeX_Math-BoldItalic-K4WTGH3J.woff2 +0 -0
- package/resources/KaTeX_Math-BoldItalic-VB447A4D.ttf +0 -0
- package/resources/KaTeX_Math-Italic-6KGCHLFN.woff2 +0 -0
- package/resources/KaTeX_Math-Italic-KKK3USB2.woff +0 -0
- package/resources/KaTeX_Math-Italic-SON4MRCA.ttf +0 -0
- package/resources/KaTeX_SansSerif-Bold-RRNVJFFW.woff2 +0 -0
- package/resources/KaTeX_SansSerif-Bold-STQ6RXC7.ttf +0 -0
- package/resources/KaTeX_SansSerif-Bold-X5M5EMOD.woff +0 -0
- package/resources/KaTeX_SansSerif-Italic-HMPFTM52.woff2 +0 -0
- package/resources/KaTeX_SansSerif-Italic-PSN4QKYX.woff +0 -0
- package/resources/KaTeX_SansSerif-Italic-WTBAZBGY.ttf +0 -0
- package/resources/KaTeX_SansSerif-Regular-2TL3USAE.ttf +0 -0
- package/resources/KaTeX_SansSerif-Regular-OQCII6EP.woff +0 -0
- package/resources/KaTeX_SansSerif-Regular-XIQ62X4E.woff2 +0 -0
- package/resources/KaTeX_Script-Regular-72OLXYNA.ttf +0 -0
- package/resources/KaTeX_Script-Regular-A5IFOEBS.woff +0 -0
- package/resources/KaTeX_Script-Regular-APUWIHLP.woff2 +0 -0
- package/resources/KaTeX_Size1-Regular-4HRHTS65.woff +0 -0
- package/resources/KaTeX_Size1-Regular-5LRUTBFT.woff2 +0 -0
- package/resources/KaTeX_Size1-Regular-7K6AASVL.ttf +0 -0
- package/resources/KaTeX_Size2-Regular-222HN3GT.ttf +0 -0
- package/resources/KaTeX_Size2-Regular-K5ZHAIS6.woff +0 -0
- package/resources/KaTeX_Size2-Regular-LELKET5D.woff2 +0 -0
- package/resources/KaTeX_Size3-Regular-TLFPAHDE.woff +0 -0
- package/resources/KaTeX_Size3-Regular-UFCO6WCA.ttf +0 -0
- package/resources/KaTeX_Size3-Regular-WQRQ47UD.woff2 +0 -0
- package/resources/KaTeX_Size4-Regular-7PGNVPQK.ttf +0 -0
- package/resources/KaTeX_Size4-Regular-CDMV7U5C.woff2 +0 -0
- package/resources/KaTeX_Size4-Regular-PKMWZHNC.woff +0 -0
- package/resources/KaTeX_Typewriter-Regular-3F5K6SQ6.ttf +0 -0
- package/resources/KaTeX_Typewriter-Regular-MJMFSK64.woff +0 -0
- package/resources/KaTeX_Typewriter-Regular-VBYJ4NRC.woff2 +0 -0
- package/resources/editor.css.txt +1 -0
- package/resources/editor.js +3446 -0
- package/resources/editor.ts +128 -0
- package/resources/extension.js +192 -179
- package/resources/extension.js.map +4 -4
- package/resources/index.js +1 -1
- package/resources/index2.js +21 -22
- package/resources/markdownEditor.css.txt +22 -0
- package/resources/package.json +1 -1
- package/resources/serverWorkerMain.js +297 -250
- package/resources/syntaxHighlighter.ts +216 -0
- package/resources/tsconfig.json +1 -0
|
@@ -10963,125 +10963,125 @@ var init_esm = __esm({
|
|
|
10963
10963
|
init_define_process_env();
|
|
10964
10964
|
(() => {
|
|
10965
10965
|
"use strict";
|
|
10966
|
-
var t2 = {
|
|
10966
|
+
var t2 = { 975: (t3) => {
|
|
10967
10967
|
function e2(t4) {
|
|
10968
10968
|
if ("string" != typeof t4) throw new TypeError("Path must be a string. Received " + JSON.stringify(t4));
|
|
10969
10969
|
}
|
|
10970
10970
|
function r3(t4, e3) {
|
|
10971
|
-
for (var r4, n3 = "",
|
|
10972
|
-
if (
|
|
10971
|
+
for (var r4, n3 = "", i2 = 0, o2 = -1, s2 = 0, h2 = 0; h2 <= t4.length; ++h2) {
|
|
10972
|
+
if (h2 < t4.length) r4 = t4.charCodeAt(h2);
|
|
10973
10973
|
else {
|
|
10974
10974
|
if (47 === r4) break;
|
|
10975
10975
|
r4 = 47;
|
|
10976
10976
|
}
|
|
10977
10977
|
if (47 === r4) {
|
|
10978
|
-
if (
|
|
10979
|
-
else if (
|
|
10980
|
-
if (n3.length < 2 || 2 !==
|
|
10978
|
+
if (o2 === h2 - 1 || 1 === s2) ;
|
|
10979
|
+
else if (o2 !== h2 - 1 && 2 === s2) {
|
|
10980
|
+
if (n3.length < 2 || 2 !== i2 || 46 !== n3.charCodeAt(n3.length - 1) || 46 !== n3.charCodeAt(n3.length - 2)) {
|
|
10981
10981
|
if (n3.length > 2) {
|
|
10982
|
-
var
|
|
10983
|
-
if (
|
|
10984
|
-
-1 ===
|
|
10982
|
+
var a2 = n3.lastIndexOf("/");
|
|
10983
|
+
if (a2 !== n3.length - 1) {
|
|
10984
|
+
-1 === a2 ? (n3 = "", i2 = 0) : i2 = (n3 = n3.slice(0, a2)).length - 1 - n3.lastIndexOf("/"), o2 = h2, s2 = 0;
|
|
10985
10985
|
continue;
|
|
10986
10986
|
}
|
|
10987
10987
|
} else if (2 === n3.length || 1 === n3.length) {
|
|
10988
|
-
n3 = "",
|
|
10988
|
+
n3 = "", i2 = 0, o2 = h2, s2 = 0;
|
|
10989
10989
|
continue;
|
|
10990
10990
|
}
|
|
10991
10991
|
}
|
|
10992
|
-
e3 && (n3.length > 0 ? n3 += "/.." : n3 = "..",
|
|
10993
|
-
} else n3.length > 0 ? n3 += "/" + t4.slice(
|
|
10994
|
-
|
|
10995
|
-
} else 46 === r4 && -1 !==
|
|
10992
|
+
e3 && (n3.length > 0 ? n3 += "/.." : n3 = "..", i2 = 2);
|
|
10993
|
+
} else n3.length > 0 ? n3 += "/" + t4.slice(o2 + 1, h2) : n3 = t4.slice(o2 + 1, h2), i2 = h2 - o2 - 1;
|
|
10994
|
+
o2 = h2, s2 = 0;
|
|
10995
|
+
} else 46 === r4 && -1 !== s2 ? ++s2 : s2 = -1;
|
|
10996
10996
|
}
|
|
10997
10997
|
return n3;
|
|
10998
10998
|
}
|
|
10999
10999
|
var n2 = { resolve: function() {
|
|
11000
|
-
for (var t4, n3 = "",
|
|
11001
|
-
var
|
|
11002
|
-
|
|
11000
|
+
for (var t4, n3 = "", i2 = false, o2 = arguments.length - 1; o2 >= -1 && !i2; o2--) {
|
|
11001
|
+
var s2;
|
|
11002
|
+
o2 >= 0 ? s2 = arguments[o2] : (void 0 === t4 && (t4 = process.cwd()), s2 = t4), e2(s2), 0 !== s2.length && (n3 = s2 + "/" + n3, i2 = 47 === s2.charCodeAt(0));
|
|
11003
11003
|
}
|
|
11004
|
-
return n3 = r3(n3, !
|
|
11004
|
+
return n3 = r3(n3, !i2), i2 ? n3.length > 0 ? "/" + n3 : "/" : n3.length > 0 ? n3 : ".";
|
|
11005
11005
|
}, normalize: function(t4) {
|
|
11006
11006
|
if (e2(t4), 0 === t4.length) return ".";
|
|
11007
|
-
var n3 = 47 === t4.charCodeAt(0),
|
|
11008
|
-
return 0 !== (t4 = r3(t4, !n3)).length || n3 || (t4 = "."), t4.length > 0 &&
|
|
11007
|
+
var n3 = 47 === t4.charCodeAt(0), i2 = 47 === t4.charCodeAt(t4.length - 1);
|
|
11008
|
+
return 0 !== (t4 = r3(t4, !n3)).length || n3 || (t4 = "."), t4.length > 0 && i2 && (t4 += "/"), n3 ? "/" + t4 : t4;
|
|
11009
11009
|
}, isAbsolute: function(t4) {
|
|
11010
11010
|
return e2(t4), t4.length > 0 && 47 === t4.charCodeAt(0);
|
|
11011
11011
|
}, join: function() {
|
|
11012
11012
|
if (0 === arguments.length) return ".";
|
|
11013
11013
|
for (var t4, r4 = 0; r4 < arguments.length; ++r4) {
|
|
11014
|
-
var
|
|
11015
|
-
e2(
|
|
11014
|
+
var i2 = arguments[r4];
|
|
11015
|
+
e2(i2), i2.length > 0 && (void 0 === t4 ? t4 = i2 : t4 += "/" + i2);
|
|
11016
11016
|
}
|
|
11017
11017
|
return void 0 === t4 ? "." : n2.normalize(t4);
|
|
11018
11018
|
}, relative: function(t4, r4) {
|
|
11019
11019
|
if (e2(t4), e2(r4), t4 === r4) return "";
|
|
11020
11020
|
if ((t4 = n2.resolve(t4)) === (r4 = n2.resolve(r4))) return "";
|
|
11021
|
-
for (var
|
|
11022
|
-
for (var
|
|
11023
|
-
for (var
|
|
11024
|
-
if (
|
|
11025
|
-
if (
|
|
11026
|
-
if (47 === r4.charCodeAt(
|
|
11027
|
-
if (0 ===
|
|
11028
|
-
} else
|
|
11021
|
+
for (var i2 = 1; i2 < t4.length && 47 === t4.charCodeAt(i2); ++i2) ;
|
|
11022
|
+
for (var o2 = t4.length, s2 = o2 - i2, h2 = 1; h2 < r4.length && 47 === r4.charCodeAt(h2); ++h2) ;
|
|
11023
|
+
for (var a2 = r4.length - h2, c2 = s2 < a2 ? s2 : a2, f2 = -1, u2 = 0; u2 <= c2; ++u2) {
|
|
11024
|
+
if (u2 === c2) {
|
|
11025
|
+
if (a2 > c2) {
|
|
11026
|
+
if (47 === r4.charCodeAt(h2 + u2)) return r4.slice(h2 + u2 + 1);
|
|
11027
|
+
if (0 === u2) return r4.slice(h2 + u2);
|
|
11028
|
+
} else s2 > c2 && (47 === t4.charCodeAt(i2 + u2) ? f2 = u2 : 0 === u2 && (f2 = 0));
|
|
11029
11029
|
break;
|
|
11030
11030
|
}
|
|
11031
|
-
var
|
|
11032
|
-
if (
|
|
11033
|
-
47 ===
|
|
11031
|
+
var l2 = t4.charCodeAt(i2 + u2);
|
|
11032
|
+
if (l2 !== r4.charCodeAt(h2 + u2)) break;
|
|
11033
|
+
47 === l2 && (f2 = u2);
|
|
11034
11034
|
}
|
|
11035
|
-
var
|
|
11036
|
-
for (
|
|
11037
|
-
return
|
|
11035
|
+
var g2 = "";
|
|
11036
|
+
for (u2 = i2 + f2 + 1; u2 <= o2; ++u2) u2 !== o2 && 47 !== t4.charCodeAt(u2) || (0 === g2.length ? g2 += ".." : g2 += "/..");
|
|
11037
|
+
return g2.length > 0 ? g2 + r4.slice(h2 + f2) : (h2 += f2, 47 === r4.charCodeAt(h2) && ++h2, r4.slice(h2));
|
|
11038
11038
|
}, _makeLong: function(t4) {
|
|
11039
11039
|
return t4;
|
|
11040
11040
|
}, dirname: function(t4) {
|
|
11041
11041
|
if (e2(t4), 0 === t4.length) return ".";
|
|
11042
|
-
for (var r4 = t4.charCodeAt(0), n3 = 47 === r4,
|
|
11043
|
-
if (!
|
|
11044
|
-
|
|
11042
|
+
for (var r4 = t4.charCodeAt(0), n3 = 47 === r4, i2 = -1, o2 = true, s2 = t4.length - 1; s2 >= 1; --s2) if (47 === (r4 = t4.charCodeAt(s2))) {
|
|
11043
|
+
if (!o2) {
|
|
11044
|
+
i2 = s2;
|
|
11045
11045
|
break;
|
|
11046
11046
|
}
|
|
11047
|
-
} else
|
|
11048
|
-
return -1 ===
|
|
11047
|
+
} else o2 = false;
|
|
11048
|
+
return -1 === i2 ? n3 ? "/" : "." : n3 && 1 === i2 ? "//" : t4.slice(0, i2);
|
|
11049
11049
|
}, basename: function(t4, r4) {
|
|
11050
11050
|
if (void 0 !== r4 && "string" != typeof r4) throw new TypeError('"ext" argument must be a string');
|
|
11051
11051
|
e2(t4);
|
|
11052
|
-
var n3,
|
|
11052
|
+
var n3, i2 = 0, o2 = -1, s2 = true;
|
|
11053
11053
|
if (void 0 !== r4 && r4.length > 0 && r4.length <= t4.length) {
|
|
11054
11054
|
if (r4.length === t4.length && r4 === t4) return "";
|
|
11055
|
-
var
|
|
11055
|
+
var h2 = r4.length - 1, a2 = -1;
|
|
11056
11056
|
for (n3 = t4.length - 1; n3 >= 0; --n3) {
|
|
11057
|
-
var
|
|
11058
|
-
if (47 ===
|
|
11059
|
-
if (!
|
|
11060
|
-
|
|
11057
|
+
var c2 = t4.charCodeAt(n3);
|
|
11058
|
+
if (47 === c2) {
|
|
11059
|
+
if (!s2) {
|
|
11060
|
+
i2 = n3 + 1;
|
|
11061
11061
|
break;
|
|
11062
11062
|
}
|
|
11063
|
-
} else -1 ===
|
|
11063
|
+
} else -1 === a2 && (s2 = false, a2 = n3 + 1), h2 >= 0 && (c2 === r4.charCodeAt(h2) ? -1 == --h2 && (o2 = n3) : (h2 = -1, o2 = a2));
|
|
11064
11064
|
}
|
|
11065
|
-
return
|
|
11065
|
+
return i2 === o2 ? o2 = a2 : -1 === o2 && (o2 = t4.length), t4.slice(i2, o2);
|
|
11066
11066
|
}
|
|
11067
11067
|
for (n3 = t4.length - 1; n3 >= 0; --n3) if (47 === t4.charCodeAt(n3)) {
|
|
11068
|
-
if (!
|
|
11069
|
-
|
|
11068
|
+
if (!s2) {
|
|
11069
|
+
i2 = n3 + 1;
|
|
11070
11070
|
break;
|
|
11071
11071
|
}
|
|
11072
|
-
} else -1 ===
|
|
11073
|
-
return -1 ===
|
|
11072
|
+
} else -1 === o2 && (s2 = false, o2 = n3 + 1);
|
|
11073
|
+
return -1 === o2 ? "" : t4.slice(i2, o2);
|
|
11074
11074
|
}, extname: function(t4) {
|
|
11075
11075
|
e2(t4);
|
|
11076
|
-
for (var r4 = -1, n3 = 0,
|
|
11077
|
-
var
|
|
11078
|
-
if (47 !==
|
|
11079
|
-
else if (!
|
|
11080
|
-
n3 =
|
|
11076
|
+
for (var r4 = -1, n3 = 0, i2 = -1, o2 = true, s2 = 0, h2 = t4.length - 1; h2 >= 0; --h2) {
|
|
11077
|
+
var a2 = t4.charCodeAt(h2);
|
|
11078
|
+
if (47 !== a2) -1 === i2 && (o2 = false, i2 = h2 + 1), 46 === a2 ? -1 === r4 ? r4 = h2 : 1 !== s2 && (s2 = 1) : -1 !== r4 && (s2 = -1);
|
|
11079
|
+
else if (!o2) {
|
|
11080
|
+
n3 = h2 + 1;
|
|
11081
11081
|
break;
|
|
11082
11082
|
}
|
|
11083
11083
|
}
|
|
11084
|
-
return -1 === r4 || -1 ===
|
|
11084
|
+
return -1 === r4 || -1 === i2 || 0 === s2 || 1 === s2 && r4 === i2 - 1 && r4 === n3 + 1 ? "" : t4.slice(r4, i2);
|
|
11085
11085
|
}, format: function(t4) {
|
|
11086
11086
|
if (null === t4 || "object" != typeof t4) throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof t4);
|
|
11087
11087
|
return (function(t5, e3) {
|
|
@@ -11092,22 +11092,22 @@ var init_esm = __esm({
|
|
|
11092
11092
|
e2(t4);
|
|
11093
11093
|
var r4 = { root: "", dir: "", base: "", ext: "", name: "" };
|
|
11094
11094
|
if (0 === t4.length) return r4;
|
|
11095
|
-
var n3,
|
|
11096
|
-
|
|
11097
|
-
for (var
|
|
11098
|
-
else if (!
|
|
11099
|
-
|
|
11095
|
+
var n3, i2 = t4.charCodeAt(0), o2 = 47 === i2;
|
|
11096
|
+
o2 ? (r4.root = "/", n3 = 1) : n3 = 0;
|
|
11097
|
+
for (var s2 = -1, h2 = 0, a2 = -1, c2 = true, f2 = t4.length - 1, u2 = 0; f2 >= n3; --f2) if (47 !== (i2 = t4.charCodeAt(f2))) -1 === a2 && (c2 = false, a2 = f2 + 1), 46 === i2 ? -1 === s2 ? s2 = f2 : 1 !== u2 && (u2 = 1) : -1 !== s2 && (u2 = -1);
|
|
11098
|
+
else if (!c2) {
|
|
11099
|
+
h2 = f2 + 1;
|
|
11100
11100
|
break;
|
|
11101
11101
|
}
|
|
11102
|
-
return -1 ===
|
|
11102
|
+
return -1 === s2 || -1 === a2 || 0 === u2 || 1 === u2 && s2 === a2 - 1 && s2 === h2 + 1 ? -1 !== a2 && (r4.base = r4.name = 0 === h2 && o2 ? t4.slice(1, a2) : t4.slice(h2, a2)) : (0 === h2 && o2 ? (r4.name = t4.slice(1, s2), r4.base = t4.slice(1, a2)) : (r4.name = t4.slice(h2, s2), r4.base = t4.slice(h2, a2)), r4.ext = t4.slice(s2, a2)), h2 > 0 ? r4.dir = t4.slice(0, h2 - 1) : o2 && (r4.dir = "/"), r4;
|
|
11103
11103
|
}, sep: "/", delimiter: ":", win32: null, posix: null };
|
|
11104
11104
|
n2.posix = n2, t3.exports = n2;
|
|
11105
11105
|
} }, e = {};
|
|
11106
11106
|
function r2(n2) {
|
|
11107
|
-
var
|
|
11108
|
-
if (void 0 !==
|
|
11109
|
-
var
|
|
11110
|
-
return t2[n2](
|
|
11107
|
+
var i2 = e[n2];
|
|
11108
|
+
if (void 0 !== i2) return i2.exports;
|
|
11109
|
+
var o2 = e[n2] = { exports: {} };
|
|
11110
|
+
return t2[n2](o2, o2.exports, r2), o2.exports;
|
|
11111
11111
|
}
|
|
11112
11112
|
r2.d = (t3, e2) => {
|
|
11113
11113
|
for (var n2 in e2) r2.o(e2, n2) && !r2.o(t3, n2) && Object.defineProperty(t3, n2, { enumerable: true, get: e2[n2] });
|
|
@@ -11115,184 +11115,182 @@ var init_esm = __esm({
|
|
|
11115
11115
|
"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t3, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t3, "__esModule", { value: true });
|
|
11116
11116
|
};
|
|
11117
11117
|
var n = {};
|
|
11118
|
-
|
|
11119
|
-
|
|
11120
|
-
|
|
11121
|
-
|
|
11122
|
-
|
|
11123
|
-
|
|
11124
|
-
|
|
11125
|
-
|
|
11126
|
-
|
|
11127
|
-
|
|
11128
|
-
|
|
11129
|
-
if (
|
|
11130
|
-
if (
|
|
11131
|
-
|
|
11132
|
-
|
|
11133
|
-
|
|
11134
|
-
|
|
11135
|
-
|
|
11136
|
-
|
|
11137
|
-
|
|
11138
|
-
|
|
11139
|
-
|
|
11140
|
-
|
|
11141
|
-
|
|
11142
|
-
|
|
11143
|
-
|
|
11144
|
-
|
|
11145
|
-
|
|
11146
|
-
|
|
11147
|
-
|
|
11148
|
-
|
|
11149
|
-
|
|
11150
|
-
|
|
11151
|
-
|
|
11152
|
-
|
|
11153
|
-
|
|
11154
|
-
|
|
11155
|
-
|
|
11156
|
-
|
|
11157
|
-
|
|
11158
|
-
|
|
11159
|
-
|
|
11160
|
-
|
|
11161
|
-
|
|
11162
|
-
|
|
11163
|
-
|
|
11164
|
-
|
|
11165
|
-
|
|
11166
|
-
|
|
11167
|
-
|
|
11168
|
-
|
|
11169
|
-
|
|
11170
|
-
|
|
11171
|
-
|
|
11172
|
-
|
|
11173
|
-
|
|
11174
|
-
|
|
11175
|
-
|
|
11176
|
-
|
|
11177
|
-
|
|
11178
|
-
|
|
11179
|
-
|
|
11180
|
-
|
|
11181
|
-
|
|
11182
|
-
|
|
11183
|
-
|
|
11184
|
-
|
|
11185
|
-
|
|
11186
|
-
|
|
11187
|
-
|
|
11188
|
-
|
|
11189
|
-
if (
|
|
11190
|
-
|
|
11191
|
-
|
|
11192
|
-
|
|
11193
|
-
return e3._formatted = t4.external, e3._fsPath = t4._sep === u ? t4.fsPath : null, e3;
|
|
11194
|
-
}
|
|
11118
|
+
let i;
|
|
11119
|
+
if (r2.r(n), r2.d(n, { URI: () => l, Utils: () => I }), "object" == typeof process) i = false;
|
|
11120
|
+
else if ("object" == typeof navigator) {
|
|
11121
|
+
let t3 = navigator.userAgent;
|
|
11122
|
+
i = t3.indexOf("Windows") >= 0;
|
|
11123
|
+
}
|
|
11124
|
+
const o = /^\w[\w\d+.-]*$/, s = /^\//, h = /^\/\//;
|
|
11125
|
+
function a(t3, e2) {
|
|
11126
|
+
if (!t3.scheme && e2) throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${t3.authority}", path: "${t3.path}", query: "${t3.query}", fragment: "${t3.fragment}"}`);
|
|
11127
|
+
if (t3.scheme && !o.test(t3.scheme)) throw new Error("[UriError]: Scheme contains illegal characters.");
|
|
11128
|
+
if (t3.path) {
|
|
11129
|
+
if (t3.authority) {
|
|
11130
|
+
if (!s.test(t3.path)) throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character');
|
|
11131
|
+
} else if (h.test(t3.path)) throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")');
|
|
11132
|
+
}
|
|
11133
|
+
}
|
|
11134
|
+
const c = "", f = "/", u = /^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;
|
|
11135
|
+
class l {
|
|
11136
|
+
static isUri(t3) {
|
|
11137
|
+
return t3 instanceof l || !!t3 && "string" == typeof t3.authority && "string" == typeof t3.fragment && "string" == typeof t3.path && "string" == typeof t3.query && "string" == typeof t3.scheme && "string" == typeof t3.fsPath && "function" == typeof t3.with && "function" == typeof t3.toString;
|
|
11138
|
+
}
|
|
11139
|
+
scheme;
|
|
11140
|
+
authority;
|
|
11141
|
+
path;
|
|
11142
|
+
query;
|
|
11143
|
+
fragment;
|
|
11144
|
+
constructor(t3, e2, r3, n2, i2, o2 = false) {
|
|
11145
|
+
"object" == typeof t3 ? (this.scheme = t3.scheme || c, this.authority = t3.authority || c, this.path = t3.path || c, this.query = t3.query || c, this.fragment = t3.fragment || c) : (this.scheme = /* @__PURE__ */ (function(t4, e3) {
|
|
11146
|
+
return t4 || e3 ? t4 : "file";
|
|
11147
|
+
})(t3, o2), this.authority = e2 || c, this.path = (function(t4, e3) {
|
|
11148
|
+
switch (t4) {
|
|
11149
|
+
case "https":
|
|
11150
|
+
case "http":
|
|
11151
|
+
case "file":
|
|
11152
|
+
e3 ? e3[0] !== f && (e3 = f + e3) : e3 = f;
|
|
11153
|
+
}
|
|
11154
|
+
return e3;
|
|
11155
|
+
})(this.scheme, r3 || c), this.query = n2 || c, this.fragment = i2 || c, a(this, o2));
|
|
11156
|
+
}
|
|
11157
|
+
get fsPath() {
|
|
11158
|
+
return v(this, false);
|
|
11159
|
+
}
|
|
11160
|
+
with(t3) {
|
|
11161
|
+
if (!t3) return this;
|
|
11162
|
+
let { scheme: e2, authority: r3, path: n2, query: i2, fragment: o2 } = t3;
|
|
11163
|
+
return void 0 === e2 ? e2 = this.scheme : null === e2 && (e2 = c), void 0 === r3 ? r3 = this.authority : null === r3 && (r3 = c), void 0 === n2 ? n2 = this.path : null === n2 && (n2 = c), void 0 === i2 ? i2 = this.query : null === i2 && (i2 = c), void 0 === o2 ? o2 = this.fragment : null === o2 && (o2 = c), e2 === this.scheme && r3 === this.authority && n2 === this.path && i2 === this.query && o2 === this.fragment ? this : new d(e2, r3, n2, i2, o2);
|
|
11164
|
+
}
|
|
11165
|
+
static parse(t3, e2 = false) {
|
|
11166
|
+
const r3 = u.exec(t3);
|
|
11167
|
+
return r3 ? new d(r3[2] || c, w(r3[4] || c), w(r3[5] || c), w(r3[7] || c), w(r3[9] || c), e2) : new d(c, c, c, c, c);
|
|
11168
|
+
}
|
|
11169
|
+
static file(t3) {
|
|
11170
|
+
let e2 = c;
|
|
11171
|
+
if (i && (t3 = t3.replace(/\\/g, f)), t3[0] === f && t3[1] === f) {
|
|
11172
|
+
const r3 = t3.indexOf(f, 2);
|
|
11173
|
+
-1 === r3 ? (e2 = t3.substring(2), t3 = f) : (e2 = t3.substring(2, r3), t3 = t3.substring(r3) || f);
|
|
11174
|
+
}
|
|
11175
|
+
return new d("file", e2, t3, c, c);
|
|
11176
|
+
}
|
|
11177
|
+
static from(t3) {
|
|
11178
|
+
const e2 = new d(t3.scheme, t3.authority, t3.path, t3.query, t3.fragment);
|
|
11179
|
+
return a(e2, true), e2;
|
|
11180
|
+
}
|
|
11181
|
+
toString(t3 = false) {
|
|
11182
|
+
return b(this, t3);
|
|
11183
|
+
}
|
|
11184
|
+
toJSON() {
|
|
11185
|
+
return this;
|
|
11186
|
+
}
|
|
11187
|
+
static revive(t3) {
|
|
11188
|
+
if (t3) {
|
|
11189
|
+
if (t3 instanceof l) return t3;
|
|
11190
|
+
{
|
|
11191
|
+
const e2 = new d(t3);
|
|
11192
|
+
return e2._formatted = t3.external, e2._fsPath = t3._sep === g ? t3.fsPath : null, e2;
|
|
11195
11193
|
}
|
|
11196
|
-
return t4;
|
|
11197
11194
|
}
|
|
11195
|
+
return t3;
|
|
11198
11196
|
}
|
|
11199
|
-
|
|
11200
|
-
|
|
11201
|
-
|
|
11202
|
-
|
|
11203
|
-
|
|
11204
|
-
|
|
11205
|
-
|
|
11206
|
-
toString(t4 = false) {
|
|
11207
|
-
return t4 ? y(this, true) : (this._formatted || (this._formatted = y(this, false)), this._formatted);
|
|
11208
|
-
}
|
|
11209
|
-
toJSON() {
|
|
11210
|
-
const t4 = { $mid: 1 };
|
|
11211
|
-
return this._fsPath && (t4.fsPath = this._fsPath, t4._sep = u), this._formatted && (t4.external = this._formatted), this.path && (t4.path = this.path), this.scheme && (t4.scheme = this.scheme), this.authority && (t4.authority = this.authority), this.query && (t4.query = this.query), this.fragment && (t4.fragment = this.fragment), t4;
|
|
11212
|
-
}
|
|
11197
|
+
}
|
|
11198
|
+
const g = i ? 1 : void 0;
|
|
11199
|
+
class d extends l {
|
|
11200
|
+
_formatted = null;
|
|
11201
|
+
_fsPath = null;
|
|
11202
|
+
get fsPath() {
|
|
11203
|
+
return this._fsPath || (this._fsPath = v(this, false)), this._fsPath;
|
|
11213
11204
|
}
|
|
11214
|
-
|
|
11215
|
-
|
|
11216
|
-
|
|
11217
|
-
|
|
11218
|
-
|
|
11219
|
-
|
|
11220
|
-
else {
|
|
11221
|
-
void 0 === n2 && (n2 = t4.substr(0, o2));
|
|
11222
|
-
const e4 = g[s2];
|
|
11223
|
-
void 0 !== e4 ? (-1 !== i2 && (n2 += encodeURIComponent(t4.substring(i2, o2)), i2 = -1), n2 += e4) : -1 === i2 && (i2 = o2);
|
|
11224
|
-
}
|
|
11225
|
-
}
|
|
11226
|
-
return -1 !== i2 && (n2 += encodeURIComponent(t4.substring(i2))), void 0 !== n2 ? n2 : t4;
|
|
11205
|
+
toString(t3 = false) {
|
|
11206
|
+
return t3 ? b(this, true) : (this._formatted || (this._formatted = b(this, false)), this._formatted);
|
|
11207
|
+
}
|
|
11208
|
+
toJSON() {
|
|
11209
|
+
const t3 = { $mid: 1 };
|
|
11210
|
+
return this._fsPath && (t3.fsPath = this._fsPath, t3._sep = g), this._formatted && (t3.external = this._formatted), this.path && (t3.path = this.path), this.scheme && (t3.scheme = this.scheme), this.authority && (t3.authority = this.authority), this.query && (t3.query = this.query), this.fragment && (t3.fragment = this.fragment), t3;
|
|
11227
11211
|
}
|
|
11228
|
-
|
|
11229
|
-
|
|
11230
|
-
|
|
11231
|
-
|
|
11232
|
-
|
|
11212
|
+
}
|
|
11213
|
+
const p = { 58: "%3A", 47: "%2F", 63: "%3F", 35: "%23", 91: "%5B", 93: "%5D", 64: "%40", 33: "%21", 36: "%24", 38: "%26", 39: "%27", 40: "%28", 41: "%29", 42: "%2A", 43: "%2B", 44: "%2C", 59: "%3B", 61: "%3D", 32: "%20" };
|
|
11214
|
+
function m(t3, e2, r3) {
|
|
11215
|
+
let n2, i2 = -1;
|
|
11216
|
+
for (let o2 = 0; o2 < t3.length; o2++) {
|
|
11217
|
+
const s2 = t3.charCodeAt(o2);
|
|
11218
|
+
if (s2 >= 97 && s2 <= 122 || s2 >= 65 && s2 <= 90 || s2 >= 48 && s2 <= 57 || 45 === s2 || 46 === s2 || 95 === s2 || 126 === s2 || e2 && 47 === s2 || r3 && 91 === s2 || r3 && 93 === s2 || r3 && 58 === s2) -1 !== i2 && (n2 += encodeURIComponent(t3.substring(i2, o2)), i2 = -1), void 0 !== n2 && (n2 += t3.charAt(o2));
|
|
11219
|
+
else {
|
|
11220
|
+
void 0 === n2 && (n2 = t3.substr(0, o2));
|
|
11221
|
+
const e3 = p[s2];
|
|
11222
|
+
void 0 !== e3 ? (-1 !== i2 && (n2 += encodeURIComponent(t3.substring(i2, o2)), i2 = -1), n2 += e3) : -1 === i2 && (i2 = o2);
|
|
11233
11223
|
}
|
|
11234
|
-
return void 0 !== e3 ? e3 : t4;
|
|
11235
11224
|
}
|
|
11236
|
-
|
|
11237
|
-
|
|
11238
|
-
|
|
11225
|
+
return -1 !== i2 && (n2 += encodeURIComponent(t3.substring(i2))), void 0 !== n2 ? n2 : t3;
|
|
11226
|
+
}
|
|
11227
|
+
function y(t3) {
|
|
11228
|
+
let e2;
|
|
11229
|
+
for (let r3 = 0; r3 < t3.length; r3++) {
|
|
11230
|
+
const n2 = t3.charCodeAt(r3);
|
|
11231
|
+
35 === n2 || 63 === n2 ? (void 0 === e2 && (e2 = t3.substr(0, r3)), e2 += p[n2]) : void 0 !== e2 && (e2 += t3[r3]);
|
|
11239
11232
|
}
|
|
11240
|
-
|
|
11241
|
-
|
|
11242
|
-
|
|
11243
|
-
|
|
11244
|
-
|
|
11245
|
-
|
|
11246
|
-
|
|
11247
|
-
|
|
11248
|
-
|
|
11249
|
-
|
|
11233
|
+
return void 0 !== e2 ? e2 : t3;
|
|
11234
|
+
}
|
|
11235
|
+
function v(t3, e2) {
|
|
11236
|
+
let r3;
|
|
11237
|
+
return r3 = t3.authority && t3.path.length > 1 && "file" === t3.scheme ? `//${t3.authority}${t3.path}` : 47 === t3.path.charCodeAt(0) && (t3.path.charCodeAt(1) >= 65 && t3.path.charCodeAt(1) <= 90 || t3.path.charCodeAt(1) >= 97 && t3.path.charCodeAt(1) <= 122) && 58 === t3.path.charCodeAt(2) ? e2 ? t3.path.substr(1) : t3.path[1].toLowerCase() + t3.path.substr(2) : t3.path, i && (r3 = r3.replace(/\//g, "\\")), r3;
|
|
11238
|
+
}
|
|
11239
|
+
function b(t3, e2) {
|
|
11240
|
+
const r3 = e2 ? y : m;
|
|
11241
|
+
let n2 = "", { scheme: i2, authority: o2, path: s2, query: h2, fragment: a2 } = t3;
|
|
11242
|
+
if (i2 && (n2 += i2, n2 += ":"), (o2 || "file" === i2) && (n2 += f, n2 += f), o2) {
|
|
11243
|
+
let t4 = o2.indexOf("@");
|
|
11244
|
+
if (-1 !== t4) {
|
|
11245
|
+
const e3 = o2.substr(0, t4);
|
|
11246
|
+
o2 = o2.substr(t4 + 1), t4 = e3.lastIndexOf(":"), -1 === t4 ? n2 += r3(e3, false, false) : (n2 += r3(e3.substr(0, t4), false, false), n2 += ":", n2 += r3(e3.substr(t4 + 1), false, true)), n2 += "@";
|
|
11250
11247
|
}
|
|
11251
|
-
|
|
11252
|
-
|
|
11253
|
-
|
|
11254
|
-
|
|
11255
|
-
|
|
11256
|
-
|
|
11257
|
-
|
|
11258
|
-
|
|
11259
|
-
|
|
11248
|
+
o2 = o2.toLowerCase(), t4 = o2.lastIndexOf(":"), -1 === t4 ? n2 += r3(o2, false, true) : (n2 += r3(o2.substr(0, t4), false, true), n2 += o2.substr(t4));
|
|
11249
|
+
}
|
|
11250
|
+
if (s2) {
|
|
11251
|
+
if (s2.length >= 3 && 47 === s2.charCodeAt(0) && 58 === s2.charCodeAt(2)) {
|
|
11252
|
+
const t4 = s2.charCodeAt(1);
|
|
11253
|
+
t4 >= 65 && t4 <= 90 && (s2 = `/${String.fromCharCode(t4 + 32)}:${s2.substr(3)}`);
|
|
11254
|
+
} else if (s2.length >= 2 && 58 === s2.charCodeAt(1)) {
|
|
11255
|
+
const t4 = s2.charCodeAt(0);
|
|
11256
|
+
t4 >= 65 && t4 <= 90 && (s2 = `${String.fromCharCode(t4 + 32)}:${s2.substr(2)}`);
|
|
11260
11257
|
}
|
|
11261
|
-
|
|
11258
|
+
n2 += r3(s2, true, false);
|
|
11262
11259
|
}
|
|
11263
|
-
|
|
11264
|
-
|
|
11265
|
-
|
|
11266
|
-
|
|
11267
|
-
|
|
11268
|
-
|
|
11269
|
-
|
|
11270
|
-
|
|
11271
|
-
|
|
11272
|
-
|
|
11273
|
-
|
|
11274
|
-
|
|
11275
|
-
|
|
11276
|
-
|
|
11277
|
-
|
|
11278
|
-
|
|
11279
|
-
|
|
11280
|
-
|
|
11281
|
-
|
|
11282
|
-
|
|
11283
|
-
|
|
11284
|
-
|
|
11285
|
-
|
|
11286
|
-
|
|
11287
|
-
|
|
11288
|
-
|
|
11289
|
-
|
|
11290
|
-
|
|
11291
|
-
|
|
11292
|
-
|
|
11293
|
-
|
|
11294
|
-
|
|
11295
|
-
|
|
11260
|
+
return h2 && (n2 += "?", n2 += r3(h2, false, false)), a2 && (n2 += "#", n2 += e2 ? a2 : m(a2, false, false)), n2;
|
|
11261
|
+
}
|
|
11262
|
+
function C(t3) {
|
|
11263
|
+
try {
|
|
11264
|
+
return decodeURIComponent(t3);
|
|
11265
|
+
} catch {
|
|
11266
|
+
return t3.length > 3 ? t3.substr(0, 3) + C(t3.substr(3)) : t3;
|
|
11267
|
+
}
|
|
11268
|
+
}
|
|
11269
|
+
const A = /(%[0-9A-Za-z][0-9A-Za-z])+/g;
|
|
11270
|
+
function w(t3) {
|
|
11271
|
+
return t3.match(A) ? t3.replace(A, ((t4) => C(t4))) : t3;
|
|
11272
|
+
}
|
|
11273
|
+
var x = r2(975);
|
|
11274
|
+
const P = x.posix || x, _ = "/";
|
|
11275
|
+
var I;
|
|
11276
|
+
!(function(t3) {
|
|
11277
|
+
t3.joinPath = function(t4, ...e2) {
|
|
11278
|
+
return t4.with({ path: P.join(t4.path, ...e2) });
|
|
11279
|
+
}, t3.resolvePath = function(t4, ...e2) {
|
|
11280
|
+
let r3 = t4.path, n2 = false;
|
|
11281
|
+
r3[0] !== _ && (r3 = _ + r3, n2 = true);
|
|
11282
|
+
let i2 = P.resolve(r3, ...e2);
|
|
11283
|
+
return n2 && i2[0] === _ && !t4.authority && (i2 = i2.substring(1)), t4.with({ path: i2 });
|
|
11284
|
+
}, t3.dirname = function(t4) {
|
|
11285
|
+
if (0 === t4.path.length || t4.path === _) return t4;
|
|
11286
|
+
let e2 = P.dirname(t4.path);
|
|
11287
|
+
return 1 === e2.length && 46 === e2.charCodeAt(0) && (e2 = ""), t4.with({ path: e2 });
|
|
11288
|
+
}, t3.basename = function(t4) {
|
|
11289
|
+
return P.basename(t4.path);
|
|
11290
|
+
}, t3.extname = function(t4) {
|
|
11291
|
+
return P.extname(t4.path);
|
|
11292
|
+
};
|
|
11293
|
+
})(I || (I = {})), LIB = n;
|
|
11296
11294
|
})();
|
|
11297
11295
|
({ URI: URI2, Utils } = LIB);
|
|
11298
11296
|
}
|
|
@@ -19331,6 +19329,7 @@ var init_references = __esm({
|
|
|
19331
19329
|
(function(MdReferenceKind2) {
|
|
19332
19330
|
MdReferenceKind2[MdReferenceKind2["Link"] = 1] = "Link";
|
|
19333
19331
|
MdReferenceKind2[MdReferenceKind2["Header"] = 2] = "Header";
|
|
19332
|
+
MdReferenceKind2[MdReferenceKind2["HtmlId"] = 3] = "HtmlId";
|
|
19334
19333
|
})(MdReferenceKind || (MdReferenceKind = {}));
|
|
19335
19334
|
MdReferencesProvider = class extends Disposable {
|
|
19336
19335
|
#configuration;
|
|
@@ -19354,7 +19353,7 @@ var init_references = __esm({
|
|
|
19354
19353
|
}
|
|
19355
19354
|
async getReferencesAtPosition(document, position, token) {
|
|
19356
19355
|
this.#logger.log(LogLevel.Debug, "ReferencesProvider.getReferencesAtPosition", { document: document.uri, version: document.version });
|
|
19357
|
-
const toc = await this.#tocProvider.getForDocument(document);
|
|
19356
|
+
const toc = await this.#tocProvider.getForDocument(document, { includeHtmlIds: true });
|
|
19358
19357
|
if (token.isCancellationRequested) {
|
|
19359
19358
|
return [];
|
|
19360
19359
|
}
|
|
@@ -19362,6 +19361,8 @@ var init_references = __esm({
|
|
|
19362
19361
|
if (header) {
|
|
19363
19362
|
if (header.kind === "header") {
|
|
19364
19363
|
return this.#getReferencesToHeader(document, header, token);
|
|
19364
|
+
} else if (header.kind === "html-id") {
|
|
19365
|
+
return this.#getReferencesToHtmlId(document, header, token);
|
|
19365
19366
|
} else {
|
|
19366
19367
|
return [];
|
|
19367
19368
|
}
|
|
@@ -19403,6 +19404,32 @@ var init_references = __esm({
|
|
|
19403
19404
|
}
|
|
19404
19405
|
return references;
|
|
19405
19406
|
}
|
|
19407
|
+
async #getReferencesToHtmlId(document, htmlId, token) {
|
|
19408
|
+
const links = await this.#getAllLinksInWorkspace();
|
|
19409
|
+
if (token.isCancellationRequested) {
|
|
19410
|
+
return [];
|
|
19411
|
+
}
|
|
19412
|
+
const references = [];
|
|
19413
|
+
references.push({
|
|
19414
|
+
kind: MdReferenceKind.HtmlId,
|
|
19415
|
+
isTriggerLocation: true,
|
|
19416
|
+
isDefinition: true,
|
|
19417
|
+
location: htmlId.declarationLocation,
|
|
19418
|
+
htmlId
|
|
19419
|
+
});
|
|
19420
|
+
for (const link of links) {
|
|
19421
|
+
if (link.href.kind === HrefKind.Internal && looksLikePathToResource(this.#configuration, link.href.path, getDocUri(document)) && this.#parser.slugifier.fromFragment(link.href.fragment).equals(htmlId.slug)) {
|
|
19422
|
+
references.push({
|
|
19423
|
+
kind: MdReferenceKind.Link,
|
|
19424
|
+
isTriggerLocation: false,
|
|
19425
|
+
isDefinition: false,
|
|
19426
|
+
link,
|
|
19427
|
+
location: { uri: link.source.resource.toString(), range: link.source.hrefRange }
|
|
19428
|
+
});
|
|
19429
|
+
}
|
|
19430
|
+
}
|
|
19431
|
+
return references;
|
|
19432
|
+
}
|
|
19406
19433
|
async #getReferencesToLinkAtPosition(document, position, token) {
|
|
19407
19434
|
const docLinks = (await this.#linkCache.getForDocs([document]))[0];
|
|
19408
19435
|
if (token.isCancellationRequested) {
|
|
@@ -19453,7 +19480,7 @@ var init_references = __esm({
|
|
|
19453
19480
|
}
|
|
19454
19481
|
const references = [];
|
|
19455
19482
|
if (resolvedResource && this.#isMarkdownPath(resolvedResource) && sourceLink.href.fragment && sourceLink.source.hrefFragmentRange && rangeContains(sourceLink.source.hrefFragmentRange, triggerPosition)) {
|
|
19456
|
-
const toc = await this.#tocProvider.get(resolvedResource);
|
|
19483
|
+
const toc = await this.#tocProvider.get(resolvedResource, { includeHtmlIds: true });
|
|
19457
19484
|
const entry = toc?.lookupByFragment(sourceLink.href.fragment);
|
|
19458
19485
|
if (entry && entry.kind === "header") {
|
|
19459
19486
|
references.push({
|
|
@@ -19463,6 +19490,14 @@ var init_references = __esm({
|
|
|
19463
19490
|
location: entry.declarationLocation,
|
|
19464
19491
|
header: entry
|
|
19465
19492
|
});
|
|
19493
|
+
} else if (entry && entry.kind === "html-id") {
|
|
19494
|
+
references.push({
|
|
19495
|
+
kind: MdReferenceKind.HtmlId,
|
|
19496
|
+
isTriggerLocation: false,
|
|
19497
|
+
isDefinition: true,
|
|
19498
|
+
location: entry.declarationLocation,
|
|
19499
|
+
htmlId: entry
|
|
19500
|
+
});
|
|
19466
19501
|
}
|
|
19467
19502
|
for (const link of allLinksInWorkspace) {
|
|
19468
19503
|
if (link.href.kind !== HrefKind.Internal || !looksLikePathToResource(this.#configuration, link.href.path, resolvedResource)) {
|
|
@@ -19640,6 +19675,9 @@ var init_rename = __esm({
|
|
|
19640
19675
|
case MdReferenceKind.Header: {
|
|
19641
19676
|
return { range: triggerRef.header.idDeclarationLocation.range, placeholder: triggerRef.header.text };
|
|
19642
19677
|
}
|
|
19678
|
+
case MdReferenceKind.HtmlId: {
|
|
19679
|
+
return { range: triggerRef.htmlId.declarationLocation.range, placeholder: triggerRef.htmlId.text };
|
|
19680
|
+
}
|
|
19643
19681
|
case MdReferenceKind.Link: {
|
|
19644
19682
|
if (triggerRef.link.kind === MdLinkKind.Definition) {
|
|
19645
19683
|
if (rangeContains(triggerRef.link.ref.range, position)) {
|
|
@@ -19651,11 +19689,15 @@ var init_rename = __esm({
|
|
|
19651
19689
|
}
|
|
19652
19690
|
const { hrefFragmentRange } = triggerRef.link.source;
|
|
19653
19691
|
if (hrefFragmentRange && rangeContains(hrefFragmentRange, position)) {
|
|
19654
|
-
const
|
|
19655
|
-
|
|
19656
|
-
range: hrefFragmentRange,
|
|
19657
|
-
|
|
19658
|
-
|
|
19692
|
+
const headerDeclaration = this.#findHeaderDeclaration(allRefsInfo.references);
|
|
19693
|
+
if (headerDeclaration) {
|
|
19694
|
+
return { range: hrefFragmentRange, placeholder: headerDeclaration.header.text };
|
|
19695
|
+
}
|
|
19696
|
+
const htmlIdDeclaration = this.#findHtmlIdDeclaration(allRefsInfo.references);
|
|
19697
|
+
if (htmlIdDeclaration) {
|
|
19698
|
+
return { range: hrefFragmentRange, placeholder: htmlIdDeclaration.htmlId.text };
|
|
19699
|
+
}
|
|
19700
|
+
return { range: hrefFragmentRange, placeholder: document.getText(hrefFragmentRange) };
|
|
19659
19701
|
}
|
|
19660
19702
|
const range = getFilePathRange(triggerRef.link);
|
|
19661
19703
|
if (!range) {
|
|
@@ -19668,6 +19710,9 @@ var init_rename = __esm({
|
|
|
19668
19710
|
#findHeaderDeclaration(references) {
|
|
19669
19711
|
return references.find((ref) => ref.isDefinition && ref.kind === MdReferenceKind.Header);
|
|
19670
19712
|
}
|
|
19713
|
+
#findHtmlIdDeclaration(references) {
|
|
19714
|
+
return references.find((ref) => ref.isDefinition && ref.kind === MdReferenceKind.HtmlId);
|
|
19715
|
+
}
|
|
19671
19716
|
async provideRenameEdits(document, position, newName, token) {
|
|
19672
19717
|
this.#logger.log(LogLevel.Debug, "RenameProvider.provideRenameEdits", { document: document.uri, version: document.version });
|
|
19673
19718
|
const allRefsInfo = await this.#getAllReferences(document, position, token);
|
|
@@ -19679,7 +19724,7 @@ var init_rename = __esm({
|
|
|
19679
19724
|
return this.#renameReferenceLinks(allRefsInfo, newName);
|
|
19680
19725
|
} else if (triggerRef.kind === MdReferenceKind.Link && triggerRef.link.href.kind === HrefKind.External) {
|
|
19681
19726
|
return this.#renameExternalLink(allRefsInfo, newName);
|
|
19682
|
-
} else if (triggerRef.kind === MdReferenceKind.Header || triggerRef.kind === MdReferenceKind.Link && triggerRef.link.source.hrefFragmentRange && rangeContains(triggerRef.link.source.hrefFragmentRange, position) && (triggerRef.link.kind === MdLinkKind.Definition || triggerRef.link.kind === MdLinkKind.Link && triggerRef.link.href.kind === HrefKind.Internal)) {
|
|
19727
|
+
} else if (triggerRef.kind === MdReferenceKind.Header || triggerRef.kind === MdReferenceKind.HtmlId || triggerRef.kind === MdReferenceKind.Link && triggerRef.link.source.hrefFragmentRange && rangeContains(triggerRef.link.source.hrefFragmentRange, position) && (triggerRef.link.kind === MdLinkKind.Definition || triggerRef.link.kind === MdLinkKind.Link && triggerRef.link.href.kind === HrefKind.Internal)) {
|
|
19683
19728
|
return this.#renameFragment(allRefsInfo, newName, token);
|
|
19684
19729
|
} else if (triggerRef.kind === MdReferenceKind.Link && !(triggerRef.link.source.hrefFragmentRange && rangeContains(triggerRef.link.source.hrefFragmentRange, position)) && (triggerRef.link.kind === MdLinkKind.Link || triggerRef.link.kind === MdLinkKind.Definition) && triggerRef.link.href.kind === HrefKind.Internal) {
|
|
19685
19730
|
return this.#renameFilePath(triggerRef.link.source.resource, triggerRef.link.href, allRefsInfo, newName, token);
|
|
@@ -19770,6 +19815,9 @@ var init_rename = __esm({
|
|
|
19770
19815
|
case MdReferenceKind.Header:
|
|
19771
19816
|
builder.replace(URI3.parse(ref.location.uri), ref.header.idDeclarationLocation.range, newHeaderText);
|
|
19772
19817
|
break;
|
|
19818
|
+
case MdReferenceKind.HtmlId:
|
|
19819
|
+
builder.replace(URI3.parse(ref.location.uri), ref.htmlId.declarationLocation.range, newSlug.value);
|
|
19820
|
+
break;
|
|
19773
19821
|
case MdReferenceKind.Link:
|
|
19774
19822
|
builder.replace(ref.link.source.resource, ref.link.source.hrefFragmentRange ?? ref.location.range, !ref.link.source.hrefFragmentRange || ref.link.href.kind === HrefKind.External ? newHeaderText : newSlug.value);
|
|
19775
19823
|
break;
|
|
@@ -21139,12 +21187,12 @@ function tryDecodeUriComponent(str) {
|
|
|
21139
21187
|
return str;
|
|
21140
21188
|
}
|
|
21141
21189
|
}
|
|
21142
|
-
var
|
|
21190
|
+
var import_node_path, lsp14, CompletionContextKind, IncludeWorkspaceHeaderCompletions, sortTexts, MdPathCompletionProvider;
|
|
21143
21191
|
var init_pathCompletions = __esm({
|
|
21144
21192
|
"node_modules/vscode-markdown-languageservice/out/languageFeatures/pathCompletions.js"() {
|
|
21145
21193
|
init_define_process_env();
|
|
21146
21194
|
init_browser();
|
|
21147
|
-
|
|
21195
|
+
import_node_path = __toESM(require_path_browserify(), 1);
|
|
21148
21196
|
lsp14 = __toESM(require_main2(), 1);
|
|
21149
21197
|
init_config();
|
|
21150
21198
|
init_position();
|
|
@@ -21188,7 +21236,6 @@ var init_pathCompletions = __esm({
|
|
|
21188
21236
|
this.#workspaceTocCache = new MdWorkspaceInfoCache(workspace, (doc) => tocProvider.getForDocument(doc));
|
|
21189
21237
|
}
|
|
21190
21238
|
async provideCompletionItems(document, position, context, token) {
|
|
21191
|
-
console.log("provideCompletionItems", { document, position, context });
|
|
21192
21239
|
const pathContext = this.#getPathCompletionContext(document, position);
|
|
21193
21240
|
if (!pathContext) {
|
|
21194
21241
|
return [];
|
|
@@ -21542,7 +21589,7 @@ ${video(uri2, maxMediaWidth)}`;
|
|
|
21542
21589
|
#normalizeFileNameCompletion(name) {
|
|
21543
21590
|
if (this.#configuration.preferredMdPathExtensionStyle === "removeExtension") {
|
|
21544
21591
|
if (looksLikeMarkdownFilePath(this.#configuration, name)) {
|
|
21545
|
-
const ext = (0,
|
|
21592
|
+
const ext = (0, import_node_path.extname)(name);
|
|
21546
21593
|
name = name.slice(0, -ext.length);
|
|
21547
21594
|
}
|
|
21548
21595
|
}
|
|
@@ -21563,10 +21610,10 @@ ${video(uri2, maxMediaWidth)}`;
|
|
|
21563
21610
|
#resolvePath(root, ref) {
|
|
21564
21611
|
try {
|
|
21565
21612
|
if (root.scheme === Schemes.file) {
|
|
21566
|
-
return URI3.file((0,
|
|
21613
|
+
return URI3.file((0, import_node_path.resolve)((0, import_node_path.dirname)(root.fsPath), ref));
|
|
21567
21614
|
} else {
|
|
21568
21615
|
return root.with({
|
|
21569
|
-
path: (0,
|
|
21616
|
+
path: (0, import_node_path.resolve)((0, import_node_path.dirname)(root.path), ref)
|
|
21570
21617
|
});
|
|
21571
21618
|
}
|
|
21572
21619
|
} catch {
|