@wrongstack/tools 0.10.2 → 0.24.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/dist/builtin.js +4 -3
- package/dist/builtin.js.map +1 -1
- package/dist/fetch.js +4 -3
- package/dist/fetch.js.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/pack.js +4 -3
- package/dist/pack.js.map +1 -1
- package/dist/search.js.map +1 -1
- package/package.json +2 -2
package/dist/builtin.js
CHANGED
|
@@ -3994,8 +3994,9 @@ function expandIPv6(addr) {
|
|
|
3994
3994
|
return [...head, ...new Array(fill).fill(0), ...tail];
|
|
3995
3995
|
}
|
|
3996
3996
|
function combineSignals(...sigs) {
|
|
3997
|
-
|
|
3998
|
-
|
|
3997
|
+
const anyFn = AbortSignal.any;
|
|
3998
|
+
if (typeof anyFn === "function") {
|
|
3999
|
+
return anyFn(sigs);
|
|
3999
4000
|
}
|
|
4000
4001
|
const ctrl = new AbortController();
|
|
4001
4002
|
const cleanups = [];
|
|
@@ -4037,7 +4038,7 @@ function htmlToMarkdown(html) {
|
|
|
4037
4038
|
s = s.replace(/<(strong|b)[^>]*>([\s\S]*?)<\/\1>/gi, "**$2**");
|
|
4038
4039
|
s = s.replace(/<(em|i)[^>]*>([\s\S]*?)<\/\1>/gi, "*$2*");
|
|
4039
4040
|
s = s.replace(/<a [^>]*href="([^"]+)"[^>]*>([\s\S]*?)<\/a>/gi, (_m, href, text) => {
|
|
4040
|
-
const safe = /^(https?|ftps?):\/\//i.test(href);
|
|
4041
|
+
const safe = /^(https?|ftps?):\/\//i.test(href) && !/^(javascript|data|vbscript):/i.test(href);
|
|
4041
4042
|
return safe ? `[${text}](${href})` : text;
|
|
4042
4043
|
});
|
|
4043
4044
|
s = s.replace(/<pre[^>]*>([\s\S]*?)<\/pre>/gi, (_m, c) => "\n```\n" + stripTags(c) + "\n```\n");
|