securemark 0.231.1 → 0.231.2
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/CHANGELOG.md +4 -0
- package/dist/securemark.js +4 -4
- package/package-lock.json +6 -6
- package/package.json +1 -1
- package/src/parser/inline/bracket.ts +1 -1
- package/src/parser/inline/link.ts +2 -2
- package/src/parser/util.ts +1 -1
package/CHANGELOG.md
CHANGED
package/dist/securemark.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! securemark v0.231.
|
|
1
|
+
/*! securemark v0.231.2 https://github.com/falsandtru/securemark | (c) 2017, falsandtru | UNLICENSED */
|
|
2
2
|
require = function () {
|
|
3
3
|
function r(e, n, t) {
|
|
4
4
|
function o(i, f) {
|
|
@@ -7318,7 +7318,7 @@ require = function () {
|
|
|
7318
7318
|
if ((_a = (0, parser_1.eval)((0, combinator_1.some)(autolink_1.autolink)((0, util_1.stringify)(content), context))) === null || _a === void 0 ? void 0 : _a.some(node => typeof node === 'object'))
|
|
7319
7319
|
return;
|
|
7320
7320
|
const INSECURE_URI = params.shift();
|
|
7321
|
-
const el =
|
|
7321
|
+
const el = elem(INSECURE_URI, (0, util_1.trimNode)((0, typed_dom_1.defrag)(content)), new url_1.ReadonlyURL(resolve(INSECURE_URI, (_b = context.host) !== null && _b !== void 0 ? _b : global_1.location, (_d = (_c = context.url) !== null && _c !== void 0 ? _c : context.host) !== null && _d !== void 0 ? _d : global_1.location), ((_e = context.host) === null || _e === void 0 ? void 0 : _e.href) || global_1.location.href), ((_f = context.host) === null || _f === void 0 ? void 0 : _f.origin) || global_1.location.origin);
|
|
7322
7322
|
if (el.classList.contains('invalid'))
|
|
7323
7323
|
return [
|
|
7324
7324
|
[el],
|
|
@@ -7353,7 +7353,7 @@ require = function () {
|
|
|
7353
7353
|
}
|
|
7354
7354
|
}
|
|
7355
7355
|
exports.resolve = resolve;
|
|
7356
|
-
function
|
|
7356
|
+
function elem(INSECURE_URI, content, uri, origin) {
|
|
7357
7357
|
let type;
|
|
7358
7358
|
let description;
|
|
7359
7359
|
switch (uri.protocol) {
|
|
@@ -8680,7 +8680,7 @@ require = function () {
|
|
|
8680
8680
|
'InvisibleComma',
|
|
8681
8681
|
'ic'
|
|
8682
8682
|
];
|
|
8683
|
-
const blankline = new RegExp(String.raw`^(
|
|
8683
|
+
const blankline = new RegExp(String.raw`^(?!$)(?:\\$|\\?[^\S\n]|&(?:${ invisibleHTMLEntityNames.join('|') });|<wbr>|\[(#+)(?!\S|\s+\1\]|\s*\[\1(?:$|\s))((?:\s+\S+)+?)(?:\s+(\1\])|\s*(?=\[\1(?:$|\s))))+(?=$|(\S))`, 'gm');
|
|
8684
8684
|
function visualize(parser) {
|
|
8685
8685
|
return (0, combinator_1.union)([
|
|
8686
8686
|
(0, combinator_1.convert)(source => source.replace(blankline, (line, ...$) => !$[3] ? line.replace(/[\\&<\[]/g, '\x1B$&') : line), (0, combinator_1.verify)(parser, (ns, rest, context) => !rest && hasVisible(ns, context))),
|
package/package-lock.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "securemark",
|
|
3
|
-
"version": "0.231.
|
|
3
|
+
"version": "0.231.2",
|
|
4
4
|
"lockfileVersion": 1,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"dependencies": {
|
|
@@ -1691,13 +1691,13 @@
|
|
|
1691
1691
|
}
|
|
1692
1692
|
},
|
|
1693
1693
|
"browserslist": {
|
|
1694
|
-
"version": "4.
|
|
1695
|
-
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.
|
|
1696
|
-
"integrity": "sha512-
|
|
1694
|
+
"version": "4.20.0",
|
|
1695
|
+
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.20.0.tgz",
|
|
1696
|
+
"integrity": "sha512-bnpOoa+DownbciXj0jVGENf8VYQnE2LNWomhYuCsMmmx9Jd9lwq0WXODuwpSsp8AVdKM2/HorrzxAfbKvWTByQ==",
|
|
1697
1697
|
"dev": true,
|
|
1698
1698
|
"requires": {
|
|
1699
|
-
"caniuse-lite": "^1.0.
|
|
1700
|
-
"electron-to-chromium": "^1.4.
|
|
1699
|
+
"caniuse-lite": "^1.0.30001313",
|
|
1700
|
+
"electron-to-chromium": "^1.4.76",
|
|
1701
1701
|
"escalade": "^3.1.1",
|
|
1702
1702
|
"node-releases": "^2.0.2",
|
|
1703
1703
|
"picocolors": "^1.0.0"
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@ import { html, defrag } from 'typed-dom';
|
|
|
7
7
|
import { unshift, push } from 'spica/array';
|
|
8
8
|
|
|
9
9
|
const index = /^(?:[0-9]+(?:\.[0-9]+)*|[A-Za-z])/;
|
|
10
|
-
const indexFW = new RegExp(index.source.replace(/[019AZaz](?!,)/g, c => String.fromCharCode(c.charCodeAt(0) +
|
|
10
|
+
const indexFW = new RegExp(index.source.replace(/[019AZaz](?!,)/g, c => String.fromCharCode(c.charCodeAt(0) + 0xFEE0)));
|
|
11
11
|
|
|
12
12
|
export const bracket: BracketParser = lazy(() => union([
|
|
13
13
|
surround(str('('), str(index), str(')'), false,
|
|
@@ -52,7 +52,7 @@ export const link: LinkParser = lazy(() => creator(10, bind(reverse(
|
|
|
52
52
|
const INSECURE_URI = params.shift()!;
|
|
53
53
|
assert(INSECURE_URI === INSECURE_URI.trim());
|
|
54
54
|
assert(!INSECURE_URI.match(/\s/));
|
|
55
|
-
const el =
|
|
55
|
+
const el = elem(
|
|
56
56
|
INSECURE_URI,
|
|
57
57
|
trimNode(defrag(content)),
|
|
58
58
|
new ReadonlyURL(
|
|
@@ -98,7 +98,7 @@ export function resolve(uri: string, host: URL | Location, source: URL | Locatio
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
function
|
|
101
|
+
function elem(
|
|
102
102
|
INSECURE_URI: string,
|
|
103
103
|
content: readonly (string | HTMLElement)[],
|
|
104
104
|
uri: ReadonlyURL,
|
package/src/parser/util.ts
CHANGED
|
@@ -42,7 +42,7 @@ const invisibleHTMLEntityNames = [
|
|
|
42
42
|
'InvisibleComma',
|
|
43
43
|
'ic',
|
|
44
44
|
];
|
|
45
|
-
const blankline = new RegExp(String.raw`^(
|
|
45
|
+
const blankline = new RegExp(String.raw`^(?!$)(?:\\$|\\?[^\S\n]|&(?:${invisibleHTMLEntityNames.join('|')});|<wbr>|\[(#+)(?!\S|\s+\1\]|\s*\[\1(?:$|\s))((?:\s+\S+)+?)(?:\s+(\1\])|\s*(?=\[\1(?:$|\s))))+(?=$|(\S))`, 'gm');
|
|
46
46
|
|
|
47
47
|
export function visualize<P extends Parser<HTMLElement | string>>(parser: P): P;
|
|
48
48
|
export function visualize<T extends HTMLElement | string>(parser: Parser<T>): Parser<T> {
|