securemark 0.294.2 → 0.294.3
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
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! securemark v0.294.
|
|
1
|
+
/*! securemark v0.294.3 https://github.com/falsandtru/securemark | (c) 2017, falsandtru | UNLICENSED License */
|
|
2
2
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
3
3
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
4
4
|
module.exports = factory(require("Prism"), require("DOMPurify"));
|
|
@@ -6380,7 +6380,7 @@ const parser_1 = __webpack_require__(605);
|
|
|
6380
6380
|
const combinator_1 = __webpack_require__(3484);
|
|
6381
6381
|
const link_1 = __webpack_require__(3628);
|
|
6382
6382
|
const source_1 = __webpack_require__(8745);
|
|
6383
|
-
exports.url = (0, combinator_1.lazy)(() => (0, combinator_1.rewrite)((0, combinator_1.open)(/(?<![0-9A-Za-z][.+-]?)https?:\/\/(?=[\x21-\x7E])/y, (0, combinator_1.precedence)(0, (0, combinator_1.some)((0, combinator_1.union)([(0, combinator_1.some)(source_1.unescsource, /(?<![-+*=~^_,.;:!?])[-+*=~^_,.;:!?]*(?=[\\$"`\[\](){}<>()[]{}|]|[^\x21-\x7E]|$)/y), (0, combinator_1.precedence)(1, (0, combinator_1.verify)(bracket, ns => ns.length > 0))]), undefined, [[/[^\x21-\x7E]|\$/y, 9]])), false, [3 | 0 /* Backtrack.autolink */]), (0, combinator_1.union)([(0, combinator_1.constraint)(1 /* State.autolink */, (0, combinator_1.state)(1 /* State.autolink */, (0, combinator_1.convert)(url => `{ ${url} }`, link_1.unsafelink, false))), ({
|
|
6383
|
+
exports.url = (0, combinator_1.lazy)(() => (0, combinator_1.rewrite)((0, combinator_1.open)(/(?<![0-9A-Za-z][.+-]?)https?:\/\/(?=[\x21-\x7E])/y, (0, combinator_1.precedence)(0, (0, combinator_1.some)((0, combinator_1.union)([(0, combinator_1.some)(source_1.unescsource, /(?<![-+*=~^_,.;:!?]|\/{3})(?:[-+*=~^_,.;:!?]|\/{3,}(?!\/))*(?=[\\$"`\[\](){}<>()[]{}|]|[^\x21-\x7E]|$)/y), (0, combinator_1.precedence)(1, (0, combinator_1.verify)(bracket, ns => ns.length > 0))]), undefined, [[/[^\x21-\x7E]|\$/y, 9]])), false, [3 | 0 /* Backtrack.autolink */]), (0, combinator_1.union)([(0, combinator_1.constraint)(1 /* State.autolink */, (0, combinator_1.state)(1 /* State.autolink */, (0, combinator_1.convert)(url => `{ ${url} }`, link_1.unsafelink, false))), ({
|
|
6384
6384
|
context: {
|
|
6385
6385
|
source
|
|
6386
6386
|
}
|
package/package.json
CHANGED
|
@@ -60,7 +60,9 @@ describe('Unit: parser/inline/autolink/url', () => {
|
|
|
60
60
|
assert.deepStrictEqual(inspect(parser(' http://host^'), ctx), [['<a class="url" href="http://host" target="_blank">http://host</a>'], '^']);
|
|
61
61
|
assert.deepStrictEqual(inspect(parser(' http://host_'), ctx), [['<a class="url" href="http://host" target="_blank">http://host</a>'], '_']);
|
|
62
62
|
assert.deepStrictEqual(inspect(parser(' http://host/'), ctx), [['<a class="url" href="http://host/" target="_blank">http://host/</a>'], '']);
|
|
63
|
-
assert.deepStrictEqual(inspect(parser(
|
|
63
|
+
assert.deepStrictEqual(inspect(parser(' http://host//'), ctx), [['<a class="url" href="http://host//" target="_blank">http://host//</a>'], '']);
|
|
64
|
+
assert.deepStrictEqual(inspect(parser(' http://host///'), ctx), [['<a class="url" href="http://host" target="_blank">http://host</a>'], '///']);
|
|
65
|
+
assert.deepStrictEqual(inspect(parser(` http://host'`), ctx), [[`<a class="url" href="http://host'" target="_blank">http://host'</a>`], '']);
|
|
64
66
|
assert.deepStrictEqual(inspect(parser(' http://host"'), ctx), [['<a class="url" href="http://host" target="_blank">http://host</a>'], '"']);
|
|
65
67
|
assert.deepStrictEqual(inspect(parser(' http://host`'), ctx), [['<a class="url" href="http://host" target="_blank">http://host</a>'], '`']);
|
|
66
68
|
assert.deepStrictEqual(inspect(parser(' http://host|'), ctx), [['<a class="url" href="http://host" target="_blank">http://host</a>'], '|']);
|
|
@@ -9,7 +9,7 @@ export const url: AutolinkParser.UrlParser = lazy(() => rewrite(
|
|
|
9
9
|
open(
|
|
10
10
|
/(?<![0-9A-Za-z][.+-]?)https?:\/\/(?=[\x21-\x7E])/y,
|
|
11
11
|
precedence(0, some(union([
|
|
12
|
-
some(unescsource, /(?<![-+*=~^_,.;:!?])[-+*=~^_,.;:!?]*(?=[\\$"`\[\](){}<>()[]{}|]|[^\x21-\x7E]|$)/y),
|
|
12
|
+
some(unescsource, /(?<![-+*=~^_,.;:!?]|\/{3})(?:[-+*=~^_,.;:!?]|\/{3,}(?!\/))*(?=[\\$"`\[\](){}<>()[]{}|]|[^\x21-\x7E]|$)/y),
|
|
13
13
|
precedence(1, verify(bracket, ns => ns.length > 0)),
|
|
14
14
|
]), undefined, [[/[^\x21-\x7E]|\$/y, 9]])),
|
|
15
15
|
false,
|