securemark 0.258.0 → 0.258.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 +12 -0
- package/dist/index.js +200 -196
- package/package.json +1 -1
- package/src/combinator/control/manipulation/convert.ts +7 -7
- package/src/combinator/control/manipulation/scope.ts +4 -4
- package/src/combinator/data/parser/context/memo.ts +20 -11
- package/src/combinator/data/parser/context.test.ts +3 -3
- package/src/combinator/data/parser/context.ts +22 -31
- package/src/combinator/data/parser/inits.ts +3 -2
- package/src/combinator/data/parser/sequence.ts +3 -2
- package/src/combinator/data/parser/some.ts +4 -2
- package/src/combinator/data/parser/subsequence.ts +3 -3
- package/src/combinator/data/parser/tails.ts +3 -3
- package/src/combinator/data/parser.ts +1 -2
- package/src/parser/api/bind.ts +1 -1
- package/src/parser/api/parse.test.ts +15 -12
- package/src/parser/api/parse.ts +1 -1
- package/src/parser/block/blockquote.ts +4 -4
- package/src/parser/block/dlist.ts +3 -3
- package/src/parser/block/extension/table.ts +4 -4
- package/src/parser/block/ilist.ts +2 -2
- package/src/parser/block/olist.ts +2 -2
- package/src/parser/block/reply/cite.ts +2 -2
- package/src/parser/block/reply/quote.ts +2 -2
- package/src/parser/block/sidefence.ts +2 -2
- package/src/parser/block/table.ts +5 -5
- package/src/parser/block/ulist.ts +2 -2
- package/src/parser/block.ts +2 -2
- package/src/parser/context.ts +7 -7
- package/src/parser/inline/annotation.test.ts +5 -5
- package/src/parser/inline/annotation.ts +6 -5
- package/src/parser/inline/autolink/email.ts +2 -2
- package/src/parser/inline/autolink/url.ts +2 -2
- package/src/parser/inline/autolink.ts +2 -2
- package/src/parser/inline/bracket.ts +13 -13
- package/src/parser/inline/code.ts +2 -2
- package/src/parser/inline/comment.ts +2 -2
- package/src/parser/inline/deletion.ts +5 -4
- package/src/parser/inline/emphasis.ts +5 -4
- package/src/parser/inline/emstrong.ts +5 -4
- package/src/parser/inline/extension/index.ts +8 -7
- package/src/parser/inline/extension/indexer.ts +2 -2
- package/src/parser/inline/extension/label.ts +2 -2
- package/src/parser/inline/extension/placeholder.ts +5 -4
- package/src/parser/inline/html.ts +2 -2
- package/src/parser/inline/htmlentity.ts +2 -2
- package/src/parser/inline/insertion.ts +5 -4
- package/src/parser/inline/link.test.ts +2 -1
- package/src/parser/inline/link.ts +26 -17
- package/src/parser/inline/mark.ts +5 -4
- package/src/parser/inline/math.ts +3 -3
- package/src/parser/inline/media.test.ts +1 -0
- package/src/parser/inline/media.ts +7 -6
- package/src/parser/inline/reference.test.ts +5 -5
- package/src/parser/inline/reference.ts +7 -6
- package/src/parser/inline/ruby.test.ts +1 -0
- package/src/parser/inline/ruby.ts +4 -4
- package/src/parser/inline/strong.ts +5 -4
- package/src/parser/inline/template.ts +6 -6
- package/src/parser/inline.test.ts +4 -1
- package/src/parser/source/escapable.ts +2 -2
- package/src/parser/source/str.ts +5 -5
- package/src/parser/source/text.ts +2 -2
- package/src/parser/source/unescapable.ts +2 -2
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! securemark v0.258.
|
|
1
|
+
/*! securemark v0.258.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("DOMPurify"), require("Prism"));
|
|
@@ -2250,17 +2250,17 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
2250
2250
|
}));
|
|
2251
2251
|
exports.convert = void 0;
|
|
2252
2252
|
|
|
2253
|
-
const
|
|
2253
|
+
const parser_1 = __webpack_require__(6728);
|
|
2254
2254
|
|
|
2255
2255
|
function convert(conv, parser) {
|
|
2256
2256
|
return (source, context = {}) => {
|
|
2257
2257
|
if (source === '') return;
|
|
2258
|
-
|
|
2259
|
-
if (
|
|
2258
|
+
const src = conv(source);
|
|
2259
|
+
if (src === '') return [[], ''];
|
|
2260
2260
|
const memo = context.memo;
|
|
2261
|
-
|
|
2262
|
-
const result = parser(
|
|
2263
|
-
|
|
2261
|
+
memo && (memo.offset += source.length - src.length);
|
|
2262
|
+
const result = parser(src, context);
|
|
2263
|
+
memo && (memo.offset -= source.length - src.length);
|
|
2264
2264
|
return result;
|
|
2265
2265
|
};
|
|
2266
2266
|
}
|
|
@@ -2543,9 +2543,9 @@ function focus(scope, parser) {
|
|
|
2543
2543
|
const src = match(source);
|
|
2544
2544
|
if (src === '') return;
|
|
2545
2545
|
const memo = context.memo;
|
|
2546
|
-
|
|
2546
|
+
memo && (memo.offset += source.length - src.length);
|
|
2547
2547
|
const result = parser(src, context);
|
|
2548
|
-
|
|
2548
|
+
memo && (memo.offset -= source.length - src.length);
|
|
2549
2549
|
if (!result) return;
|
|
2550
2550
|
return (0, parser_1.exec)(result).length < src.length ? [(0, parser_1.eval)(result), (0, parser_1.exec)(result) + source.slice(src.length)] : global_1.undefined;
|
|
2551
2551
|
};
|
|
@@ -2562,9 +2562,9 @@ function rewrite(scope, parser) {
|
|
|
2562
2562
|
context.memo = memo;
|
|
2563
2563
|
if (!res1 || (0, parser_1.exec)(res1).length >= source.length) return;
|
|
2564
2564
|
const src = source.slice(0, source.length - (0, parser_1.exec)(res1).length);
|
|
2565
|
-
|
|
2565
|
+
memo && (memo.offset += source.length - src.length);
|
|
2566
2566
|
const res2 = parser(src, context);
|
|
2567
|
-
|
|
2567
|
+
memo && (memo.offset -= source.length - src.length);
|
|
2568
2568
|
if (!res2) return;
|
|
2569
2569
|
return (0, parser_1.exec)(res2).length < src.length ? [(0, parser_1.eval)(res2), (0, parser_1.exec)(res2) + (0, parser_1.exec)(res1)] : global_1.undefined;
|
|
2570
2570
|
};
|
|
@@ -2783,7 +2783,7 @@ exports.check = check;
|
|
|
2783
2783
|
Object.defineProperty(exports, "__esModule", ({
|
|
2784
2784
|
value: true
|
|
2785
2785
|
}));
|
|
2786
|
-
exports.state = exports.guard = exports.precedence = exports.
|
|
2786
|
+
exports.state = exports.guard = exports.precedence = exports.creation = exports.syntax = exports.context = exports.reset = void 0;
|
|
2787
2787
|
|
|
2788
2788
|
const global_1 = __webpack_require__(4128);
|
|
2789
2789
|
|
|
@@ -2844,17 +2844,10 @@ function apply(parser, source, context, changes, values) {
|
|
|
2844
2844
|
}
|
|
2845
2845
|
|
|
2846
2846
|
function syntax(syntax, precedence, cost, parser) {
|
|
2847
|
-
if (typeof cost === 'function') {
|
|
2848
|
-
parser = cost;
|
|
2849
|
-
cost = 1;
|
|
2850
|
-
}
|
|
2851
|
-
|
|
2852
2847
|
return (source, context) => {
|
|
2853
2848
|
if (source === '') return;
|
|
2854
|
-
const
|
|
2855
|
-
context.
|
|
2856
|
-
context.backtrackable ??= ~0;
|
|
2857
|
-
context.state ??= 0;
|
|
2849
|
+
const memo = context.memo ??= new memo_1.Memo();
|
|
2850
|
+
context.memorable ??= ~0;
|
|
2858
2851
|
const p = context.precedence;
|
|
2859
2852
|
context.precedence = precedence;
|
|
2860
2853
|
const {
|
|
@@ -2867,35 +2860,32 @@ function syntax(syntax, precedence, cost, parser) {
|
|
|
2867
2860
|
if (resources.recursion <= 0) throw new Error('Too much recursion');
|
|
2868
2861
|
--resources.recursion;
|
|
2869
2862
|
const pos = source.length;
|
|
2870
|
-
const
|
|
2871
|
-
const
|
|
2863
|
+
const state = context.state ?? 0;
|
|
2864
|
+
const cache = syntax && memo.get(pos, syntax, state);
|
|
2865
|
+
const result = cache ? cache.length === 0 ? global_1.undefined : [cache[0], source.slice(cache[1])] : parser(source, context);
|
|
2872
2866
|
++resources.recursion;
|
|
2873
2867
|
|
|
2874
|
-
if (result) {
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
}
|
|
2868
|
+
if (result && !cache) {
|
|
2869
|
+
resources.budget -= cost;
|
|
2870
|
+
}
|
|
2878
2871
|
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
context.memo.clear(pos);
|
|
2885
|
-
}
|
|
2872
|
+
if (syntax) {
|
|
2873
|
+
if (state & context.memorable) {
|
|
2874
|
+
cache ?? memo.set(pos, syntax, state, (0, parser_1.eval)(result), source.length - (0, parser_1.exec)(result, '').length);
|
|
2875
|
+
} else if (result && memo.length >= pos) {
|
|
2876
|
+
memo.clear(pos);
|
|
2886
2877
|
}
|
|
2887
2878
|
}
|
|
2888
2879
|
|
|
2889
2880
|
context.precedence = p;
|
|
2890
|
-
context.rule = r;
|
|
2891
2881
|
return result;
|
|
2892
2882
|
};
|
|
2893
2883
|
}
|
|
2894
2884
|
|
|
2895
2885
|
exports.syntax = syntax;
|
|
2896
2886
|
|
|
2897
|
-
function
|
|
2898
|
-
if (typeof cost === 'function') return
|
|
2887
|
+
function creation(cost, parser) {
|
|
2888
|
+
if (typeof cost === 'function') return creation(1, cost);
|
|
2899
2889
|
return (source, context) => {
|
|
2900
2890
|
const {
|
|
2901
2891
|
resources = {
|
|
@@ -2917,7 +2907,7 @@ function creator(cost, parser) {
|
|
|
2917
2907
|
};
|
|
2918
2908
|
}
|
|
2919
2909
|
|
|
2920
|
-
exports.
|
|
2910
|
+
exports.creation = creation;
|
|
2921
2911
|
|
|
2922
2912
|
function precedence(precedence, parser) {
|
|
2923
2913
|
return (source, context) => {
|
|
@@ -3056,7 +3046,7 @@ Delimiters.matcher = (0, memoize_1.memoize)(pattern => {
|
|
|
3056
3046
|
/***/ }),
|
|
3057
3047
|
|
|
3058
3048
|
/***/ 1090:
|
|
3059
|
-
/***/ ((__unused_webpack_module, exports
|
|
3049
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
3060
3050
|
|
|
3061
3051
|
"use strict";
|
|
3062
3052
|
|
|
@@ -3066,28 +3056,34 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
3066
3056
|
}));
|
|
3067
3057
|
exports.Memo = void 0;
|
|
3068
3058
|
|
|
3069
|
-
const array_1 = __webpack_require__(8112);
|
|
3070
|
-
|
|
3071
3059
|
class Memo {
|
|
3072
3060
|
constructor() {
|
|
3073
3061
|
this.memory = [];
|
|
3062
|
+
this.offset = 0;
|
|
3074
3063
|
}
|
|
3075
3064
|
|
|
3076
3065
|
get length() {
|
|
3077
3066
|
return this.memory.length;
|
|
3078
3067
|
}
|
|
3079
3068
|
|
|
3080
|
-
get(position,
|
|
3081
|
-
|
|
3069
|
+
get(position, syntax, state) {
|
|
3070
|
+
//console.log('get', position + this.offset, syntax, state, this.memory[position + this.offset - 1]?.[`${syntax}:${state}`]);;
|
|
3071
|
+
const cache = this.memory[position + this.offset - 1]?.[`${syntax}:${state}`];
|
|
3072
|
+
return cache?.length === 2 ? [cache[0].slice(), cache[1]] : cache;
|
|
3082
3073
|
}
|
|
3083
3074
|
|
|
3084
|
-
set(position,
|
|
3085
|
-
const record = this.memory[position - 1] ??= {};
|
|
3086
|
-
record[`${
|
|
3075
|
+
set(position, syntax, state, nodes, offset) {
|
|
3076
|
+
const record = this.memory[position + this.offset - 1] ??= {};
|
|
3077
|
+
record[`${syntax}:${state}`] = nodes ? [nodes.slice(), offset] : []; //console.log('set', position + this.offset, syntax, state, record[`${syntax}:${state}`]);
|
|
3087
3078
|
}
|
|
3088
3079
|
|
|
3089
3080
|
clear(position) {
|
|
3090
|
-
|
|
3081
|
+
const memory = this.memory;
|
|
3082
|
+
|
|
3083
|
+
for (let i = position + this.offset, len = memory.length; i < len; ++i) {
|
|
3084
|
+
memory.pop();
|
|
3085
|
+
} //console.log('clear', position);
|
|
3086
|
+
|
|
3091
3087
|
}
|
|
3092
3088
|
|
|
3093
3089
|
}
|
|
@@ -3113,7 +3109,7 @@ const parser_1 = __webpack_require__(6728);
|
|
|
3113
3109
|
|
|
3114
3110
|
const array_1 = __webpack_require__(8112);
|
|
3115
3111
|
|
|
3116
|
-
function inits(parsers) {
|
|
3112
|
+
function inits(parsers, resume) {
|
|
3117
3113
|
if (parsers.length === 1) return parsers[0];
|
|
3118
3114
|
return (source, context) => {
|
|
3119
3115
|
let rest = source;
|
|
@@ -3126,6 +3122,7 @@ function inits(parsers) {
|
|
|
3126
3122
|
if (!result) break;
|
|
3127
3123
|
nodes = nodes ? (0, array_1.push)(nodes, (0, parser_1.eval)(result)) : (0, parser_1.eval)(result);
|
|
3128
3124
|
rest = (0, parser_1.exec)(result);
|
|
3125
|
+
if (resume?.((0, parser_1.eval)(result), (0, parser_1.exec)(result)) === false) break;
|
|
3129
3126
|
}
|
|
3130
3127
|
|
|
3131
3128
|
return nodes && rest.length < source.length ? [nodes, rest] : global_1.undefined;
|
|
@@ -3153,7 +3150,7 @@ const parser_1 = __webpack_require__(6728);
|
|
|
3153
3150
|
|
|
3154
3151
|
const array_1 = __webpack_require__(8112);
|
|
3155
3152
|
|
|
3156
|
-
function sequence(parsers) {
|
|
3153
|
+
function sequence(parsers, resume) {
|
|
3157
3154
|
if (parsers.length === 1) return parsers[0];
|
|
3158
3155
|
return (source, context) => {
|
|
3159
3156
|
let rest = source;
|
|
@@ -3166,6 +3163,7 @@ function sequence(parsers) {
|
|
|
3166
3163
|
if (!result) return;
|
|
3167
3164
|
nodes = nodes ? (0, array_1.push)(nodes, (0, parser_1.eval)(result)) : (0, parser_1.eval)(result);
|
|
3168
3165
|
rest = (0, parser_1.exec)(result);
|
|
3166
|
+
if (resume?.((0, parser_1.eval)(result), (0, parser_1.exec)(result)) === false) return;
|
|
3169
3167
|
}
|
|
3170
3168
|
|
|
3171
3169
|
return nodes && rest.length < source.length ? [nodes, rest] : global_1.undefined;
|
|
@@ -3219,7 +3217,7 @@ function some(parser, end, delimiters = [], limit = -1) {
|
|
|
3219
3217
|
if (context.delimiters?.match(rest, context.precedence)) break;
|
|
3220
3218
|
const result = parser(rest, context);
|
|
3221
3219
|
if (!result) break;
|
|
3222
|
-
nodes = nodes ? (0, array_1.push)(nodes, (0, parser_1.eval)(result)) : (0, parser_1.eval)(result);
|
|
3220
|
+
nodes = nodes ? nodes.length < (0, parser_1.eval)(result).length ? (0, array_1.unshift)(nodes, (0, parser_1.eval)(result)) : (0, array_1.push)(nodes, (0, parser_1.eval)(result)) : (0, parser_1.eval)(result);
|
|
3223
3221
|
rest = (0, parser_1.exec)(result);
|
|
3224
3222
|
if (limit >= 0 && source.length - rest.length > limit) break;
|
|
3225
3223
|
}
|
|
@@ -3251,8 +3249,8 @@ const union_1 = __webpack_require__(6366);
|
|
|
3251
3249
|
|
|
3252
3250
|
const inits_1 = __webpack_require__(2491);
|
|
3253
3251
|
|
|
3254
|
-
function subsequence(parsers) {
|
|
3255
|
-
return (0, union_1.union)(parsers.map((_, i) => i + 1 < parsers.length ? (0, inits_1.inits)([parsers[i], subsequence(parsers.slice(i + 1))]) : parsers[i]));
|
|
3252
|
+
function subsequence(parsers, resume) {
|
|
3253
|
+
return (0, union_1.union)(parsers.map((_, i) => i + 1 < parsers.length ? (0, inits_1.inits)([parsers[i], subsequence(parsers.slice(i + 1), resume)], resume) : parsers[i]));
|
|
3256
3254
|
}
|
|
3257
3255
|
|
|
3258
3256
|
exports.subsequence = subsequence;
|
|
@@ -3274,8 +3272,8 @@ const union_1 = __webpack_require__(6366);
|
|
|
3274
3272
|
|
|
3275
3273
|
const sequence_1 = __webpack_require__(2287);
|
|
3276
3274
|
|
|
3277
|
-
function tails(parsers) {
|
|
3278
|
-
return (0, union_1.union)(parsers.map((_, i) => (0, sequence_1.sequence)(parsers.slice(i))));
|
|
3275
|
+
function tails(parsers, resume) {
|
|
3276
|
+
return (0, union_1.union)(parsers.map((_, i) => (0, sequence_1.sequence)(parsers.slice(i), resume)));
|
|
3279
3277
|
}
|
|
3280
3278
|
|
|
3281
3279
|
exports.tails = tails;
|
|
@@ -3460,7 +3458,7 @@ const array_1 = __webpack_require__(8112);
|
|
|
3460
3458
|
function bind(target, settings) {
|
|
3461
3459
|
let context = { ...settings,
|
|
3462
3460
|
host: settings.host ?? new url_1.ReadonlyURL(global_1.location.pathname, global_1.location.origin),
|
|
3463
|
-
|
|
3461
|
+
memorable: context_1.backtrackable
|
|
3464
3462
|
};
|
|
3465
3463
|
if (context.host?.origin === 'null') throw new Error(`Invalid host: ${context.host.href}`);
|
|
3466
3464
|
const blocks = [];
|
|
@@ -3820,7 +3818,7 @@ function parse(source, opts = {}, context) {
|
|
|
3820
3818
|
...(context?.resources && {
|
|
3821
3819
|
resources: context.resources
|
|
3822
3820
|
}),
|
|
3823
|
-
|
|
3821
|
+
memorable: context_1.backtrackable
|
|
3824
3822
|
};
|
|
3825
3823
|
if (context.host?.origin === 'null') throw new Error(`Invalid host: ${context.host.href}`);
|
|
3826
3824
|
const node = (0, dom_1.frag)();
|
|
@@ -3915,7 +3913,7 @@ const dom_1 = __webpack_require__(3252);
|
|
|
3915
3913
|
|
|
3916
3914
|
const random_1 = __webpack_require__(7325);
|
|
3917
3915
|
|
|
3918
|
-
exports.block = (0, combinator_1.
|
|
3916
|
+
exports.block = (0, combinator_1.creation)(error((0, combinator_1.reset)({
|
|
3919
3917
|
resources: {
|
|
3920
3918
|
budget: 50 * 1000,
|
|
3921
3919
|
recursion: 20
|
|
@@ -3966,8 +3964,8 @@ const indent = (0, combinator_1.block)((0, combinator_1.open)(opener, (0, combin
|
|
|
3966
3964
|
|
|
3967
3965
|
const unindent = source => source.replace(/(^|\n)>(?:[^\S\n]|(?=>*(?:$|\s)))|\n$/g, '$1');
|
|
3968
3966
|
|
|
3969
|
-
const source = (0, combinator_1.lazy)(() => (0, combinator_1.fmap)((0, combinator_1.some)((0, combinator_1.
|
|
3970
|
-
const markdown = (0, combinator_1.lazy)(() => (0, combinator_1.fmap)((0, combinator_1.some)((0, combinator_1.
|
|
3967
|
+
const source = (0, combinator_1.lazy)(() => (0, combinator_1.fmap)((0, combinator_1.some)((0, combinator_1.creation)((0, combinator_1.union)([(0, combinator_1.rewrite)(indent, (0, combinator_1.convert)(unindent, source)), (0, combinator_1.rewrite)((0, combinator_1.some)(source_1.contentline, opener), (0, combinator_1.convert)(unindent, (0, combinator_1.fmap)((0, combinator_1.some)(autolink_1.autolink), ns => [(0, dom_1.html)('pre', (0, dom_1.defrag)(ns))])))]))), ns => [(0, dom_1.html)('blockquote', ns)]));
|
|
3968
|
+
const markdown = (0, combinator_1.lazy)(() => (0, combinator_1.fmap)((0, combinator_1.some)((0, combinator_1.creation)((0, combinator_1.union)([(0, combinator_1.rewrite)(indent, (0, combinator_1.convert)(unindent, markdown)), (0, combinator_1.creation)(99, (0, combinator_1.rewrite)((0, combinator_1.some)(source_1.contentline, opener), (0, combinator_1.convert)(unindent, (source, context) => {
|
|
3971
3969
|
const references = (0, dom_1.html)('ol', {
|
|
3972
3970
|
class: 'references'
|
|
3973
3971
|
});
|
|
@@ -4092,8 +4090,8 @@ exports.dlist = (0, combinator_1.lazy)(() => (0, combinator_1.block)((0, locale_
|
|
|
4092
4090
|
| 2
|
|
4093
4091
|
/* State.media */
|
|
4094
4092
|
, (0, combinator_1.some)(term)), (0, combinator_1.some)(desc)]))), es => [(0, dom_1.html)('dl', fillTrailingDescription(es))]))));
|
|
4095
|
-
const term = (0, combinator_1.
|
|
4096
|
-
const desc = (0, combinator_1.
|
|
4093
|
+
const term = (0, combinator_1.creation)((0, combinator_1.line)((0, inline_1.indexee)((0, combinator_1.fmap)((0, combinator_1.open)(/^~[^\S\n]+(?=\S)/, (0, visibility_1.visualize)((0, visibility_1.trimBlank)((0, combinator_1.some)((0, combinator_1.union)([inline_1.indexer, inline_1.inline])))), true), ns => [(0, dom_1.html)('dt', (0, dom_1.defrag)(ns))]))));
|
|
4094
|
+
const desc = (0, combinator_1.creation)((0, combinator_1.block)((0, combinator_1.fmap)((0, combinator_1.open)(/^:[^\S\n]+(?=\S)|/, (0, combinator_1.rewrite)((0, combinator_1.some)(source_1.anyline, /^[~:][^\S\n]+\S/), (0, visibility_1.visualize)((0, combinator_1.trimEnd)((0, combinator_1.some)((0, combinator_1.union)([inline_1.inline]))))), true), ns => [(0, dom_1.html)('dd', (0, dom_1.defrag)(ns))]), false));
|
|
4097
4095
|
|
|
4098
4096
|
function fillTrailingDescription(es) {
|
|
4099
4097
|
return es.length > 0 && es[es.length - 1].tagName === 'DT' ? (0, array_1.push)(es, [(0, dom_1.html)('dd')]) : es;
|
|
@@ -4667,9 +4665,9 @@ const row = (0, combinator_1.lazy)(() => (0, combinator_1.dup)((0, combinator_1.
|
|
|
4667
4665
|
const alignment = /^[-=<>]+(?:\/[-=^v]*)?(?=[^\S\n]*\n)/;
|
|
4668
4666
|
const align = (0, combinator_1.line)((0, combinator_1.fmap)((0, combinator_1.union)([(0, source_1.str)(alignment)]), ([s]) => s.split('/').map(s => s.split(''))));
|
|
4669
4667
|
const delimiter = /^[-=<>]+(?:\/[-=^v]*)?(?=[^\S\n]*\n)|^[#:](?:(?!:\D|0)\d*:(?!0)\d*)?!*(?=\s)/;
|
|
4670
|
-
const head = (0, combinator_1.
|
|
4671
|
-
const data = (0, combinator_1.
|
|
4672
|
-
const dataline = (0, combinator_1.
|
|
4668
|
+
const head = (0, combinator_1.creation)((0, combinator_1.block)((0, combinator_1.fmap)((0, combinator_1.open)((0, source_1.str)(/^#(?:(?!:\D|0)\d*:(?!0)\d*)?!*(?=\s)/), (0, combinator_1.rewrite)((0, combinator_1.inits)([source_1.anyline, (0, combinator_1.some)(source_1.contentline, delimiter)]), (0, combinator_1.trim)((0, visibility_1.visualize)((0, combinator_1.some)((0, combinator_1.union)([inline_1.inline]))))), true), ns => [(0, dom_1.html)('th', attributes(ns.shift()), (0, dom_1.defrag)(ns))]), false));
|
|
4669
|
+
const data = (0, combinator_1.creation)((0, combinator_1.block)((0, combinator_1.fmap)((0, combinator_1.open)((0, source_1.str)(/^:(?:(?!:\D|0)\d*:(?!0)\d*)?!*(?=\s)/), (0, combinator_1.rewrite)((0, combinator_1.inits)([source_1.anyline, (0, combinator_1.some)(source_1.contentline, delimiter)]), (0, combinator_1.trim)((0, visibility_1.visualize)((0, combinator_1.some)((0, combinator_1.union)([inline_1.inline]))))), true), ns => [(0, dom_1.html)('td', attributes(ns.shift()), (0, dom_1.defrag)(ns))]), false));
|
|
4670
|
+
const dataline = (0, combinator_1.creation)((0, combinator_1.line)((0, combinator_1.rewrite)(source_1.contentline, (0, combinator_1.union)([(0, combinator_1.validate)(/^!+\s/, (0, combinator_1.convert)(source => `:${source}`, data)), (0, combinator_1.convert)(source => `: ${source}`, data)]))));
|
|
4673
4671
|
|
|
4674
4672
|
function attributes(source) {
|
|
4675
4673
|
let [, rowspan = global_1.undefined, colspan = global_1.undefined, highlight = global_1.undefined] = source.match(/^.(?:(\d+)?:(\d+)?)?(!+)?$/) ?? [];
|
|
@@ -4970,7 +4968,7 @@ const dom_1 = __webpack_require__(3252);
|
|
|
4970
4968
|
exports.ilist = (0, combinator_1.lazy)(() => (0, combinator_1.block)((0, combinator_1.validate)(/^[-+*](?=[^\S\n]|\n[^\S\n]*\S)/, (0, combinator_1.state)(2
|
|
4971
4969
|
/* State.media */
|
|
4972
4970
|
, exports.ilist_))));
|
|
4973
|
-
exports.ilist_ = (0, combinator_1.lazy)(() => (0, combinator_1.block)((0, combinator_1.fmap)((0, combinator_1.validate)(/^[-+*](?:$|\s)/, (0, combinator_1.some)((0, combinator_1.
|
|
4971
|
+
exports.ilist_ = (0, combinator_1.lazy)(() => (0, combinator_1.block)((0, combinator_1.fmap)((0, combinator_1.validate)(/^[-+*](?:$|\s)/, (0, combinator_1.some)((0, combinator_1.creation)((0, combinator_1.union)([(0, combinator_1.fmap)((0, combinator_1.fallback)((0, combinator_1.inits)([(0, combinator_1.line)((0, combinator_1.open)(/^[-+*](?:$|\s)/, (0, combinator_1.some)(inline_1.inline), true)), (0, combinator_1.indent)((0, combinator_1.union)([ulist_1.ulist_, olist_1.olist_, exports.ilist_]))]), olist_1.invalid), ns => [(0, dom_1.html)('li', (0, dom_1.defrag)((0, ulist_1.fillFirstLine)(ns)))])])))), es => [(0, dom_1.html)('ul', {
|
|
4974
4972
|
class: 'invalid',
|
|
4975
4973
|
'data-invalid-syntax': 'list',
|
|
4976
4974
|
'data-invalid-type': 'syntax',
|
|
@@ -5061,7 +5059,7 @@ exports.olist = (0, combinator_1.lazy)(() => (0, combinator_1.block)((0, combina
|
|
|
5061
5059
|
, exports.olist_))));
|
|
5062
5060
|
exports.olist_ = (0, combinator_1.lazy)(() => (0, combinator_1.block)((0, combinator_1.union)([(0, combinator_1.match)(openers['.'], (0, memoize_1.memoize)(ms => list(type(ms[1]), '.'), ms => type(ms[1]).charCodeAt(0) || 0, [])), (0, combinator_1.match)(openers['('], (0, memoize_1.memoize)(ms => list(type(ms[1]), '('), ms => type(ms[1]).charCodeAt(0) || 0, []))])));
|
|
5063
5061
|
|
|
5064
|
-
const list = (type, form) => (0, combinator_1.fmap)((0, combinator_1.some)((0, combinator_1.
|
|
5062
|
+
const list = (type, form) => (0, combinator_1.fmap)((0, combinator_1.some)((0, combinator_1.creation)((0, combinator_1.union)([(0, inline_1.indexee)((0, combinator_1.fmap)((0, combinator_1.fallback)((0, combinator_1.inits)([(0, combinator_1.line)((0, combinator_1.open)(heads[form], (0, combinator_1.subsequence)([ulist_1.checkbox, (0, visibility_1.trimBlank)((0, combinator_1.some)((0, combinator_1.union)([inline_1.indexer, inline_1.inline])))]), true)), (0, combinator_1.indent)((0, combinator_1.union)([ulist_1.ulist_, exports.olist_, ilist_1.ilist_]))]), exports.invalid), ns => [(0, dom_1.html)('li', {
|
|
5065
5063
|
'data-marker': ns[0] || global_1.undefined
|
|
5066
5064
|
}, (0, dom_1.defrag)((0, ulist_1.fillFirstLine)((0, array_1.shift)(ns)[1])))]), true)]))), es => [format((0, dom_1.html)('ol', es), type, form)]);
|
|
5067
5065
|
|
|
@@ -5246,7 +5244,7 @@ const source_1 = __webpack_require__(6743);
|
|
|
5246
5244
|
|
|
5247
5245
|
const dom_1 = __webpack_require__(3252);
|
|
5248
5246
|
|
|
5249
|
-
exports.cite = (0, combinator_1.
|
|
5247
|
+
exports.cite = (0, combinator_1.creation)((0, combinator_1.line)((0, combinator_1.fmap)((0, combinator_1.validate)('>>', (0, combinator_1.reverse)((0, combinator_1.tails)([(0, source_1.str)(/^>*(?=>>[^>\s]+[^\S\n]*(?:$|\n))/), (0, combinator_1.union)([anchor_1.anchor, // Subject page representation.
|
|
5250
5248
|
// リンクの実装は後で検討
|
|
5251
5249
|
(0, combinator_1.focus)(/^>>\.[^\S\n]*(?:$|\n)/, () => [[(0, dom_1.html)('a', {
|
|
5252
5250
|
class: 'anchor'
|
|
@@ -5284,7 +5282,7 @@ const autolink_1 = __webpack_require__(6578);
|
|
|
5284
5282
|
const dom_1 = __webpack_require__(3252);
|
|
5285
5283
|
|
|
5286
5284
|
exports.syntax = /^>+(?=[^\S\n])|^>(?=[^\s>])|^>+(?=[^\s>])(?![0-9a-z]+(?:-[0-9a-z]+)*(?![0-9A-Za-z@#:]))/;
|
|
5287
|
-
exports.quote = (0, combinator_1.lazy)(() => (0, combinator_1.
|
|
5285
|
+
exports.quote = (0, combinator_1.lazy)(() => (0, combinator_1.creation)((0, combinator_1.block)((0, combinator_1.fmap)((0, combinator_1.validate)('>', (0, combinator_1.union)([(0, combinator_1.rewrite)((0, combinator_1.some)((0, combinator_1.validate)(new RegExp(exports.syntax.source.split('|')[0]), source_1.anyline)), qblock), (0, combinator_1.rewrite)((0, combinator_1.validate)(new RegExp(exports.syntax.source.split('|').slice(1).join('|')), source_1.anyline), (0, combinator_1.line)((0, combinator_1.union)([(0, source_1.str)(/^.+/)])))])), ns => [(0, dom_1.html)('span', ns.length > 1 ? {
|
|
5288
5286
|
class: 'quote'
|
|
5289
5287
|
} : {
|
|
5290
5288
|
class: 'quote invalid',
|
|
@@ -5361,7 +5359,7 @@ const opener = /^(?=\|\|+(?:$|\s))/;
|
|
|
5361
5359
|
|
|
5362
5360
|
const unindent = source => source.replace(/(^|\n)\|(?:[^\S\n]|(?=\|*(?:$|\s)))|\n$/g, '$1');
|
|
5363
5361
|
|
|
5364
|
-
const source = (0, combinator_1.lazy)(() => (0, combinator_1.fmap)((0, combinator_1.some)((0, combinator_1.
|
|
5362
|
+
const source = (0, combinator_1.lazy)(() => (0, combinator_1.fmap)((0, combinator_1.some)((0, combinator_1.creation)((0, combinator_1.union)([(0, combinator_1.focus)(/^(?:\|\|+(?:[^\S\n][^\n]*)?(?:$|\n))+/, (0, combinator_1.convert)(unindent, source)), (0, combinator_1.rewrite)((0, combinator_1.some)(source_1.contentline, opener), (0, combinator_1.convert)(unindent, (0, combinator_1.fmap)((0, combinator_1.some)(autolink_1.autolink), ns => [(0, dom_1.html)('pre', (0, dom_1.defrag)(ns))])))]))), ns => [(0, dom_1.html)('blockquote', ns)]));
|
|
5365
5363
|
|
|
5366
5364
|
/***/ }),
|
|
5367
5365
|
|
|
@@ -5392,17 +5390,17 @@ const array_1 = __webpack_require__(8112);
|
|
|
5392
5390
|
|
|
5393
5391
|
exports.table = (0, combinator_1.lazy)(() => (0, combinator_1.block)((0, combinator_1.fmap)((0, combinator_1.validate)(/^\|[^\n]*(?:\n\|[^\n]*){2}/, (0, combinator_1.sequence)([row((0, combinator_1.some)(head), true), row((0, combinator_1.some)(align), false), (0, combinator_1.some)(row((0, combinator_1.some)(data), true))])), rows => [(0, dom_1.html)('table', [(0, dom_1.html)('thead', [rows.shift()]), (0, dom_1.html)('tbody', format(rows))])])));
|
|
5394
5392
|
|
|
5395
|
-
const row = (parser, optional) => (0, combinator_1.
|
|
5393
|
+
const row = (parser, optional) => (0, combinator_1.creation)((0, combinator_1.fallback)((0, combinator_1.fmap)((0, combinator_1.line)((0, combinator_1.surround)(/^(?=\|)/, (0, combinator_1.some)((0, combinator_1.union)([parser])), /^[|\\]?\s*$/, optional)), es => [(0, dom_1.html)('tr', es)]), (0, combinator_1.rewrite)(source_1.contentline, source => [[(0, dom_1.html)('tr', {
|
|
5396
5394
|
class: 'invalid',
|
|
5397
5395
|
'data-invalid-syntax': 'table-row',
|
|
5398
5396
|
'data-invalid-type': 'syntax',
|
|
5399
5397
|
'data-invalid-message': 'Missing the start symbol of the table row'
|
|
5400
5398
|
}, [(0, dom_1.html)('td', source.replace('\n', ''))])], ''])));
|
|
5401
5399
|
|
|
5402
|
-
const align = (0, combinator_1.
|
|
5400
|
+
const align = (0, combinator_1.creation)((0, combinator_1.fmap)((0, combinator_1.open)('|', (0, combinator_1.union)([(0, combinator_1.focus)(/^:-+:/, () => [['center'], '']), (0, combinator_1.focus)(/^:-+/, () => [['start'], '']), (0, combinator_1.focus)(/^-+:/, () => [['end'], '']), (0, combinator_1.focus)(/^-+/, () => [[''], ''])])), ns => [(0, dom_1.html)('td', (0, dom_1.defrag)(ns))]));
|
|
5403
5401
|
const cell = (0, combinator_1.surround)(/^\|\s*(?=\S)/, (0, combinator_1.some)((0, combinator_1.union)([inline_1.inline]), /^\|/, [[/^[|\\]?\s*$/, 9]]), /^[^|]*/, true);
|
|
5404
|
-
const head = (0, combinator_1.
|
|
5405
|
-
const data = (0, combinator_1.
|
|
5402
|
+
const head = (0, combinator_1.creation)((0, combinator_1.fmap)(cell, ns => [(0, dom_1.html)('th', (0, visibility_1.trimNode)((0, dom_1.defrag)(ns)))]));
|
|
5403
|
+
const data = (0, combinator_1.creation)((0, combinator_1.fmap)(cell, ns => [(0, dom_1.html)('td', (0, visibility_1.trimNode)((0, dom_1.defrag)(ns)))]));
|
|
5406
5404
|
|
|
5407
5405
|
function format(rows) {
|
|
5408
5406
|
const aligns = rows[0].classList.contains('invalid') ? [] : (0, duff_1.duffReduce)(rows.shift().children, (acc, el) => (0, array_1.push)(acc, [el.textContent]), []);
|
|
@@ -5451,7 +5449,7 @@ const array_1 = __webpack_require__(8112);
|
|
|
5451
5449
|
exports.ulist = (0, combinator_1.lazy)(() => (0, combinator_1.block)((0, combinator_1.validate)(/^-(?=[^\S\n]|\n[^\S\n]*\S)/, (0, combinator_1.state)(2
|
|
5452
5450
|
/* State.media */
|
|
5453
5451
|
, exports.ulist_))));
|
|
5454
|
-
exports.ulist_ = (0, combinator_1.lazy)(() => (0, combinator_1.block)((0, combinator_1.fmap)((0, combinator_1.validate)(/^-(?=$|\s)/, (0, combinator_1.some)((0, combinator_1.
|
|
5452
|
+
exports.ulist_ = (0, combinator_1.lazy)(() => (0, combinator_1.block)((0, combinator_1.fmap)((0, combinator_1.validate)(/^-(?=$|\s)/, (0, combinator_1.some)((0, combinator_1.creation)((0, combinator_1.union)([(0, inline_1.indexee)((0, combinator_1.fmap)((0, combinator_1.fallback)((0, combinator_1.inits)([(0, combinator_1.line)((0, combinator_1.open)(/^-(?:$|\s)/, (0, combinator_1.subsequence)([exports.checkbox, (0, visibility_1.trimBlank)((0, combinator_1.some)((0, combinator_1.union)([inline_1.indexer, inline_1.inline])))]), true)), (0, combinator_1.indent)((0, combinator_1.union)([exports.ulist_, olist_1.olist_, ilist_1.ilist_]))]), olist_1.invalid), ns => [(0, dom_1.html)('li', (0, dom_1.defrag)(fillFirstLine(ns)))]), true)])))), es => [format((0, dom_1.html)('ul', es))])));
|
|
5455
5453
|
exports.checkbox = (0, combinator_1.focus)(/^\[[xX ]\](?=$|\s)/, source => [[(0, dom_1.html)('span', {
|
|
5456
5454
|
class: 'checkbox'
|
|
5457
5455
|
}, source[1].trimStart() ? '☑' : '☐')], '']);
|
|
@@ -5482,16 +5480,16 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
5482
5480
|
value: true
|
|
5483
5481
|
}));
|
|
5484
5482
|
exports.backtrackable = void 0;
|
|
5485
|
-
exports.backtrackable = 0 |
|
|
5486
|
-
/*
|
|
5487
|
-
|
|
|
5488
|
-
/*
|
|
5489
|
-
|
|
|
5490
|
-
/*
|
|
5491
|
-
|
|
|
5492
|
-
/*
|
|
5493
|
-
|
|
|
5494
|
-
/*
|
|
5483
|
+
exports.backtrackable = 0 | 64
|
|
5484
|
+
/* State.annotation */
|
|
5485
|
+
| 32
|
|
5486
|
+
/* State.reference */
|
|
5487
|
+
| 16
|
|
5488
|
+
/* State.index */
|
|
5489
|
+
| 4
|
|
5490
|
+
/* State.link */
|
|
5491
|
+
| 2
|
|
5492
|
+
/* State.media */
|
|
5495
5493
|
;
|
|
5496
5494
|
|
|
5497
5495
|
/***/ }),
|
|
@@ -5666,19 +5664,19 @@ const visibility_1 = __webpack_require__(7618);
|
|
|
5666
5664
|
|
|
5667
5665
|
const dom_1 = __webpack_require__(3252);
|
|
5668
5666
|
|
|
5669
|
-
exports.annotation = (0, combinator_1.lazy)(() => (0, combinator_1.
|
|
5670
|
-
/* Rule.annotation */
|
|
5671
|
-
, 6, (0, combinator_1.surround)('((', (0, combinator_1.guard)(context => ~context.state & 64
|
|
5667
|
+
exports.annotation = (0, combinator_1.lazy)(() => (0, combinator_1.surround)('((', (0, combinator_1.guard)(context => ~context.state & 64
|
|
5672
5668
|
/* State.annotation */
|
|
5673
|
-
, (0, combinator_1.
|
|
5669
|
+
, (0, combinator_1.syntax)(32
|
|
5670
|
+
/* Syntax.annotation */
|
|
5671
|
+
, 6, 1, (0, combinator_1.state)(64
|
|
5674
5672
|
/* State.annotation */
|
|
5675
5673
|
| 2
|
|
5676
5674
|
/* State.media */
|
|
5677
5675
|
, (0, visibility_1.startLoose)((0, combinator_1.context)({
|
|
5678
5676
|
delimiters: global_1.undefined
|
|
5679
|
-
}, (0, combinator_1.some)((0, combinator_1.union)([inline_1.inline]), ')', [[/^\\?\n/, 9], [')', 2], ['))', 6]])), ')'))), '))', false, ([, ns], rest) => [[(0, dom_1.html)('sup', {
|
|
5677
|
+
}, (0, combinator_1.some)((0, combinator_1.union)([inline_1.inline]), ')', [[/^\\?\n/, 9], [')', 2], ['))', 6]])), ')')))), '))', false, ([, ns], rest) => [[(0, dom_1.html)('sup', {
|
|
5680
5678
|
class: 'annotation'
|
|
5681
|
-
}, [(0, dom_1.html)('span', (0, visibility_1.trimNode)((0, dom_1.defrag)(ns)))])], rest], ([, ns, rest], next) => next[0] === ')' ? global_1.undefined : (0, link_1.optimize)('((', ns, rest)))
|
|
5679
|
+
}, [(0, dom_1.html)('span', (0, visibility_1.trimNode)((0, dom_1.defrag)(ns)))])], rest], ([, ns, rest], next) => next[0] === ')' ? global_1.undefined : (0, link_1.optimize)('((', ns, rest, next)));
|
|
5682
5680
|
|
|
5683
5681
|
/***/ }),
|
|
5684
5682
|
|
|
@@ -5716,8 +5714,8 @@ const util_1 = __webpack_require__(9437);
|
|
|
5716
5714
|
exports.autolink = (0, combinator_1.fmap)((0, combinator_1.validate)(/^(?:[@#>0-9A-Za-z]|\S#)/, (0, combinator_1.guard)(context => ~context.state & 1
|
|
5717
5715
|
/* State.autolink */
|
|
5718
5716
|
, (0, combinator_1.syntax)(2
|
|
5719
|
-
/*
|
|
5720
|
-
, 1, (0, combinator_1.some)((0, combinator_1.union)([url_1.url, email_1.email, // Escape unmatched email-like strings.
|
|
5717
|
+
/* Syntax.autolink */
|
|
5718
|
+
, 1, 1, (0, combinator_1.some)((0, combinator_1.union)([url_1.url, email_1.email, // Escape unmatched email-like strings.
|
|
5721
5719
|
(0, source_1.str)(/^[0-9A-Za-z]+(?:[.+_-][0-9A-Za-z]+)*(?:@(?:[0-9A-Za-z]+(?:[.-][0-9A-Za-z]+)*)?)+/), channel_1.channel, account_1.account, // Escape unmatched account-like strings.
|
|
5722
5720
|
(0, source_1.str)(/^@+[0-9A-Za-z]*(?:-[0-9A-Za-z]+)*/), // Escape invalid leading characters.
|
|
5723
5721
|
(0, source_1.str)(new RegExp(/^(?:[^\p{C}\p{S}\p{P}\s]|emoji|['_])(?=#)/u.source.replace('emoji', hashtag_1.emoji), 'u')), hashtag_1.hashtag, hashnum_1.hashnum, // Escape unmatched hashtag-like strings.
|
|
@@ -5833,7 +5831,7 @@ const source_1 = __webpack_require__(6743);
|
|
|
5833
5831
|
const dom_1 = __webpack_require__(3252); // https://html.spec.whatwg.org/multipage/input.html
|
|
5834
5832
|
|
|
5835
5833
|
|
|
5836
|
-
exports.email = (0, combinator_1.
|
|
5834
|
+
exports.email = (0, combinator_1.creation)((0, combinator_1.rewrite)((0, combinator_1.verify)((0, source_1.str)(/^[0-9A-Za-z]+(?:[.+_-][0-9A-Za-z]+)*@[0-9A-Za-z](?:(?:[0-9A-Za-z]|-(?=\w)){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-(?=\w)){0,61}[0-9A-Za-z])?)*(?![0-9A-Za-z])/), ([source]) => source.indexOf('@') <= 64 && source.length <= 255), source => [[(0, dom_1.html)('a', {
|
|
5837
5835
|
class: 'email',
|
|
5838
5836
|
href: `mailto:${source}`
|
|
5839
5837
|
}, source)], '']));
|
|
@@ -5915,7 +5913,7 @@ const source_1 = __webpack_require__(6743);
|
|
|
5915
5913
|
|
|
5916
5914
|
const closer = /^[-+*=~^,.;:!?]*(?=[\\"`|\[\](){}<>]|$)/;
|
|
5917
5915
|
exports.url = (0, combinator_1.lazy)(() => (0, combinator_1.validate)(['http://', 'https://'], (0, combinator_1.rewrite)((0, combinator_1.open)(/^https?:\/\/(?=[\x21-\x7E])/, (0, combinator_1.focus)(/^[\x21-\x7E]+/, (0, combinator_1.some)((0, combinator_1.union)([bracket, (0, combinator_1.some)(source_1.unescsource, closer)])))), (0, combinator_1.convert)(url => `{ ${url} }`, (0, combinator_1.union)([link_1.textlink])))));
|
|
5918
|
-
const bracket = (0, combinator_1.lazy)(() => (0, combinator_1.
|
|
5916
|
+
const bracket = (0, combinator_1.lazy)(() => (0, combinator_1.creation)((0, combinator_1.precedence)(2, (0, combinator_1.union)([(0, combinator_1.surround)('(', (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.unescsource]), ')'), ')', true), (0, combinator_1.surround)('[', (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.unescsource]), ']'), ']', true), (0, combinator_1.surround)('{', (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.unescsource]), '}'), '}', true), (0, combinator_1.surround)('"', (0, combinator_1.precedence)(8, (0, combinator_1.some)(source_1.unescsource, '"')), '"', true)]))));
|
|
5919
5917
|
|
|
5920
5918
|
/***/ }),
|
|
5921
5919
|
|
|
@@ -5943,26 +5941,26 @@ const dom_1 = __webpack_require__(3252);
|
|
|
5943
5941
|
const array_1 = __webpack_require__(8112);
|
|
5944
5942
|
|
|
5945
5943
|
const index = /^[0-9A-Za-z]+(?:(?:[.-]|, )[0-9A-Za-z]+)*/;
|
|
5946
|
-
exports.bracket = (0, combinator_1.lazy)(() => (0, combinator_1.union)([(0, combinator_1.syntax)(0
|
|
5947
|
-
/*
|
|
5948
|
-
, 2, (0,
|
|
5949
|
-
/*
|
|
5950
|
-
, 2,
|
|
5944
|
+
exports.bracket = (0, combinator_1.lazy)(() => (0, combinator_1.union)([(0, combinator_1.surround)((0, source_1.str)('('), (0, combinator_1.syntax)(0
|
|
5945
|
+
/* Syntax.none */
|
|
5946
|
+
, 2, 1, (0, source_1.str)(index)), (0, source_1.str)(')')), (0, combinator_1.surround)((0, source_1.str)('('), (0, combinator_1.syntax)(128
|
|
5947
|
+
/* Syntax.bracket */
|
|
5948
|
+
, 2, 1, (0, combinator_1.some)(inline_1.inline, ')', [[')', 2]])), (0, source_1.str)(')'), true, ([as, bs = [], cs], rest) => [[(0, dom_1.html)('span', {
|
|
5951
5949
|
class: 'paren'
|
|
5952
|
-
}, (0, dom_1.defrag)((0, array_1.push)((0, array_1.unshift)(as, bs), cs)))], rest], ([as, bs = []], rest) => [(0, array_1.unshift)([''], (0, array_1.unshift)(as, bs)), rest])), (0, combinator_1.syntax)(0
|
|
5953
|
-
/*
|
|
5954
|
-
, 2,
|
|
5955
|
-
/*
|
|
5956
|
-
, 2,
|
|
5950
|
+
}, (0, dom_1.defrag)((0, array_1.push)((0, array_1.unshift)(as, bs), cs)))], rest], ([as, bs = []], rest) => [(0, array_1.unshift)([''], (0, array_1.unshift)(as, bs)), rest]), (0, combinator_1.surround)((0, source_1.str)('('), (0, combinator_1.syntax)(0
|
|
5951
|
+
/* Syntax.none */
|
|
5952
|
+
, 2, 1, (0, source_1.str)(new RegExp(index.source.replace(', ', '[,、]').replace(/[09AZaz.]|\-(?!\w)/g, c => c.trimStart() && String.fromCharCode(c.charCodeAt(0) + 0xFEE0))))), (0, source_1.str)(')')), (0, combinator_1.surround)((0, source_1.str)('('), (0, combinator_1.syntax)(128
|
|
5953
|
+
/* Syntax.bracket */
|
|
5954
|
+
, 2, 1, (0, combinator_1.some)(inline_1.inline, ')', [[')', 2]])), (0, source_1.str)(')'), true, ([as, bs = [], cs], rest) => [[(0, dom_1.html)('span', {
|
|
5957
5955
|
class: 'paren'
|
|
5958
|
-
}, (0, dom_1.defrag)((0, array_1.push)((0, array_1.unshift)(as, bs), cs)))], rest], ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest])), (0, combinator_1.syntax)(128
|
|
5959
|
-
/*
|
|
5960
|
-
, 2,
|
|
5961
|
-
/*
|
|
5962
|
-
, 2,
|
|
5963
|
-
(0, combinator_1.syntax)(1
|
|
5964
|
-
/*
|
|
5965
|
-
, 8,
|
|
5956
|
+
}, (0, dom_1.defrag)((0, array_1.push)((0, array_1.unshift)(as, bs), cs)))], rest], ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), (0, combinator_1.surround)((0, source_1.str)('['), (0, combinator_1.syntax)(128
|
|
5957
|
+
/* Syntax.bracket */
|
|
5958
|
+
, 2, 1, (0, combinator_1.some)(inline_1.inline, ']', [[']', 2]])), (0, source_1.str)(']'), true, global_1.undefined, ([as, bs = []], rest) => [(0, array_1.unshift)([''], (0, array_1.unshift)(as, bs)), rest]), (0, combinator_1.surround)((0, source_1.str)('{'), (0, combinator_1.syntax)(128
|
|
5959
|
+
/* Syntax.bracket */
|
|
5960
|
+
, 2, 1, (0, combinator_1.some)(inline_1.inline, '}', [['}', 2]])), (0, source_1.str)('}'), true, global_1.undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), // Control media blinking in editing rather than control confusion of pairs of quote marks.
|
|
5961
|
+
(0, combinator_1.surround)((0, source_1.str)('"'), (0, combinator_1.syntax)(1
|
|
5962
|
+
/* Syntax.quote */
|
|
5963
|
+
, 8, 1, (0, combinator_1.some)(inline_1.inline, '"', [['"', 8]])), (0, source_1.str)('"'), true, global_1.undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest])]));
|
|
5966
5964
|
|
|
5967
5965
|
/***/ }),
|
|
5968
5966
|
|
|
@@ -5981,7 +5979,7 @@ const combinator_1 = __webpack_require__(2087);
|
|
|
5981
5979
|
|
|
5982
5980
|
const dom_1 = __webpack_require__(3252);
|
|
5983
5981
|
|
|
5984
|
-
exports.code = (0, combinator_1.
|
|
5982
|
+
exports.code = (0, combinator_1.creation)((0, combinator_1.validate)('`', (0, combinator_1.match)(/^(`+)(?!`)([^\n]*?[^`\n])\1(?!`)/, ([whole,, body]) => rest => [[(0, dom_1.html)('code', {
|
|
5985
5983
|
'data-src': whole
|
|
5986
5984
|
}, format(body))], rest.slice(whole.length)])));
|
|
5987
5985
|
|
|
@@ -6015,8 +6013,8 @@ const memoize_1 = __webpack_require__(1808);
|
|
|
6015
6013
|
const array_1 = __webpack_require__(8112);
|
|
6016
6014
|
|
|
6017
6015
|
exports.comment = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('[%', (0, combinator_1.syntax)(0
|
|
6018
|
-
/*
|
|
6019
|
-
, 4, (0, combinator_1.match)(/^\[(%+)\s/, (0, memoize_1.memoize)(([, fence]) => (0, combinator_1.surround)((0, combinator_1.open)((0, source_1.str)(`[${fence}`), (0, combinator_1.some)(source_1.text, new RegExp(String.raw`^\s+${fence}\]|^\S`)), true), (0, combinator_1.some)((0, combinator_1.union)([inline_1.inline]), new RegExp(String.raw`^\s+${fence}\]`), [[new RegExp(String.raw`^\s+${fence}\]`), 4]]), (0, combinator_1.close)((0, combinator_1.some)(source_1.text, /^\S/), (0, source_1.str)(`${fence}]`)), true, ([as, bs = [], cs], rest) => [[(0, dom_1.html)('span', {
|
|
6016
|
+
/* Syntax.none */
|
|
6017
|
+
, 4, 1, (0, combinator_1.match)(/^\[(%+)\s/, (0, memoize_1.memoize)(([, fence]) => (0, combinator_1.surround)((0, combinator_1.open)((0, source_1.str)(`[${fence}`), (0, combinator_1.some)(source_1.text, new RegExp(String.raw`^\s+${fence}\]|^\S`)), true), (0, combinator_1.some)((0, combinator_1.union)([inline_1.inline]), new RegExp(String.raw`^\s+${fence}\]`), [[new RegExp(String.raw`^\s+${fence}\]`), 4]]), (0, combinator_1.close)((0, combinator_1.some)(source_1.text, /^\S/), (0, source_1.str)(`${fence}]`)), true, ([as, bs = [], cs], rest) => [[(0, dom_1.html)('span', {
|
|
6020
6018
|
class: 'comment'
|
|
6021
6019
|
}, [(0, dom_1.html)('input', {
|
|
6022
6020
|
type: 'checkbox'
|
|
@@ -6047,9 +6045,9 @@ const dom_1 = __webpack_require__(3252);
|
|
|
6047
6045
|
|
|
6048
6046
|
const array_1 = __webpack_require__(8112);
|
|
6049
6047
|
|
|
6050
|
-
exports.deletion = (0, combinator_1.lazy)(() => (0, combinator_1.syntax)(0
|
|
6051
|
-
/*
|
|
6052
|
-
, 1,
|
|
6048
|
+
exports.deletion = (0, combinator_1.lazy)(() => (0, combinator_1.surround)((0, source_1.str)('~~'), (0, combinator_1.syntax)(0
|
|
6049
|
+
/* Syntax.none */
|
|
6050
|
+
, 1, 1, (0, combinator_1.some)((0, combinator_1.union)([(0, combinator_1.some)(inline_1.inline, (0, visibility_1.blankWith)('\n', '~~')), (0, combinator_1.open)('\n', (0, combinator_1.some)(inline_1.inline, '~'), true)]))), (0, source_1.str)('~~'), false, ([, bs], rest) => [[(0, dom_1.html)('del', (0, dom_1.defrag)(bs))], rest], ([as, bs], rest) => [(0, array_1.unshift)(as, bs), rest]));
|
|
6053
6051
|
|
|
6054
6052
|
/***/ }),
|
|
6055
6053
|
|
|
@@ -6080,9 +6078,9 @@ const dom_1 = __webpack_require__(3252);
|
|
|
6080
6078
|
|
|
6081
6079
|
const array_1 = __webpack_require__(8112);
|
|
6082
6080
|
|
|
6083
|
-
exports.emphasis = (0, combinator_1.lazy)(() => (0, combinator_1.syntax)(0
|
|
6084
|
-
/*
|
|
6085
|
-
, 1,
|
|
6081
|
+
exports.emphasis = (0, combinator_1.lazy)(() => (0, combinator_1.surround)((0, source_1.str)('*'), (0, combinator_1.syntax)(0
|
|
6082
|
+
/* Syntax.none */
|
|
6083
|
+
, 1, 1, (0, visibility_1.startTight)((0, combinator_1.some)((0, combinator_1.union)([strong_1.strong, (0, combinator_1.some)(inline_1.inline, (0, visibility_1.blankWith)('*')), (0, combinator_1.open)((0, combinator_1.some)(inline_1.inline, '*'), (0, combinator_1.union)([emstrong_1.emstrong, strong_1.strong, exports.emphasis]))])), '*')), (0, source_1.str)('*'), false, ([, bs], rest) => [[(0, dom_1.html)('em', (0, dom_1.defrag)(bs))], rest], ([as, bs], rest) => [(0, array_1.unshift)(as, bs), rest]));
|
|
6086
6084
|
|
|
6087
6085
|
/***/ }),
|
|
6088
6086
|
|
|
@@ -6115,9 +6113,9 @@ const array_1 = __webpack_require__(8112);
|
|
|
6115
6113
|
|
|
6116
6114
|
const substrong = (0, combinator_1.lazy)(() => (0, combinator_1.some)((0, combinator_1.union)([(0, combinator_1.some)(inline_1.inline, (0, visibility_1.blankWith)('**')), (0, combinator_1.open)((0, combinator_1.some)(inline_1.inline, '*'), (0, combinator_1.union)([exports.emstrong, strong_1.strong]))])));
|
|
6117
6115
|
const subemphasis = (0, combinator_1.lazy)(() => (0, combinator_1.some)((0, combinator_1.union)([strong_1.strong, (0, combinator_1.some)(inline_1.inline, (0, visibility_1.blankWith)('*')), (0, combinator_1.open)((0, combinator_1.some)(inline_1.inline, '*'), (0, combinator_1.union)([exports.emstrong, strong_1.strong, emphasis_1.emphasis]))])));
|
|
6118
|
-
exports.emstrong = (0, combinator_1.lazy)(() => (0, combinator_1.syntax)(0
|
|
6119
|
-
/*
|
|
6120
|
-
, 1,
|
|
6116
|
+
exports.emstrong = (0, combinator_1.lazy)(() => (0, combinator_1.surround)((0, source_1.str)('***'), (0, combinator_1.syntax)(0
|
|
6117
|
+
/* Syntax.none */
|
|
6118
|
+
, 1, 1, (0, visibility_1.startTight)((0, combinator_1.some)((0, combinator_1.union)([(0, combinator_1.some)(inline_1.inline, (0, visibility_1.blankWith)('*')), (0, combinator_1.open)((0, combinator_1.some)(inline_1.inline, '*'), inline_1.inline)])))), (0, source_1.str)(/^\*{1,3}/), false, ([, bs, cs], rest, context) => {
|
|
6121
6119
|
switch (cs[0]) {
|
|
6122
6120
|
case '***':
|
|
6123
6121
|
return [[(0, dom_1.html)('em', [(0, dom_1.html)('strong', (0, dom_1.defrag)(bs))])], rest];
|
|
@@ -6128,7 +6126,7 @@ exports.emstrong = (0, combinator_1.lazy)(() => (0, combinator_1.syntax)(0
|
|
|
6128
6126
|
case '*':
|
|
6129
6127
|
return (0, combinator_1.bind)(substrong, (ds, rest) => rest.slice(0, 2) === '**' ? [[(0, dom_1.html)('strong', (0, array_1.unshift)([(0, dom_1.html)('em', (0, dom_1.defrag)(bs))], (0, dom_1.defrag)(ds)))], rest.slice(2)] : [(0, array_1.unshift)(['**', (0, dom_1.html)('em', (0, dom_1.defrag)(bs))], ds), rest])(rest, context) ?? [['**', (0, dom_1.html)('em', (0, dom_1.defrag)(bs))], rest];
|
|
6130
6128
|
}
|
|
6131
|
-
}, ([as, bs], rest) => [(0, array_1.unshift)(as, bs), rest]))
|
|
6129
|
+
}, ([as, bs], rest) => [(0, array_1.unshift)(as, bs), rest]));
|
|
6132
6130
|
|
|
6133
6131
|
/***/ }),
|
|
6134
6132
|
|
|
@@ -6218,11 +6216,11 @@ const visibility_1 = __webpack_require__(7618);
|
|
|
6218
6216
|
|
|
6219
6217
|
const dom_1 = __webpack_require__(3252);
|
|
6220
6218
|
|
|
6221
|
-
exports.index = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('[#', (0, combinator_1.
|
|
6222
|
-
/* Rule.index */
|
|
6223
|
-
, 2, (0, combinator_1.fmap)((0, indexee_1.indexee)((0, combinator_1.surround)('[#', (0, combinator_1.guard)(context => ~context.state & 16
|
|
6219
|
+
exports.index = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('[#', (0, combinator_1.fmap)((0, indexee_1.indexee)((0, combinator_1.surround)('[#', (0, combinator_1.guard)(context => ~context.state & 16
|
|
6224
6220
|
/* State.index */
|
|
6225
|
-
, (0, combinator_1.
|
|
6221
|
+
, (0, combinator_1.syntax)(1024
|
|
6222
|
+
/* Syntax.index */
|
|
6223
|
+
, 2, 1, (0, combinator_1.state)(64
|
|
6226
6224
|
/* State.annotation */
|
|
6227
6225
|
| 32
|
|
6228
6226
|
/* State.reference */
|
|
@@ -6236,16 +6234,16 @@ exports.index = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('[#', (0
|
|
|
6236
6234
|
/* State.media */
|
|
6237
6235
|
| 1
|
|
6238
6236
|
/* State.autolink */
|
|
6239
|
-
, (0, visibility_1.startTight)((0, combinator_1.open)((0, source_1.stropt)(/^\|?/), (0, visibility_1.trimBlankEnd)((0, combinator_1.some)((0, combinator_1.union)([signature, inline_1.inline]), ']', [[/^\\?\n/, 9], [']', 2]])), true)))), ']', false, ([, ns], rest) => [[(0, dom_1.html)('a', (0, dom_1.defrag)(ns))], rest])), ([el]) => [(0, dom_1.define)(el, {
|
|
6237
|
+
, (0, visibility_1.startTight)((0, combinator_1.open)((0, source_1.stropt)(/^\|?/), (0, visibility_1.trimBlankEnd)((0, combinator_1.some)((0, combinator_1.union)([signature, inline_1.inline]), ']', [[/^\\?\n/, 9], [']', 2]])), true))))), ']', false, ([, ns], rest) => [[(0, dom_1.html)('a', (0, dom_1.defrag)(ns))], rest])), ([el]) => [(0, dom_1.define)(el, {
|
|
6240
6238
|
id: el.id ? null : global_1.undefined,
|
|
6241
6239
|
class: 'index',
|
|
6242
6240
|
href: el.id ? `#${el.id}` : global_1.undefined
|
|
6243
|
-
}, el.childNodes)])))
|
|
6244
|
-
const signature = (0, combinator_1.lazy)(() => (0, combinator_1.
|
|
6241
|
+
}, el.childNodes)])));
|
|
6242
|
+
const signature = (0, combinator_1.lazy)(() => (0, combinator_1.creation)((0, combinator_1.fmap)((0, combinator_1.open)('|#', (0, visibility_1.startTight)((0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.txt]), ']'))), ns => [(0, dom_1.html)('span', {
|
|
6245
6243
|
class: 'indexer',
|
|
6246
6244
|
'data-index': (0, indexee_1.identity)(ns.join('')).slice(6)
|
|
6247
6245
|
})])));
|
|
6248
|
-
const bracket = (0, combinator_1.lazy)(() => (0, combinator_1.
|
|
6246
|
+
const bracket = (0, combinator_1.lazy)(() => (0, combinator_1.creation)((0, combinator_1.union)([(0, combinator_1.surround)((0, source_1.str)('('), (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.txt]), ')'), (0, source_1.str)(')'), true), (0, combinator_1.surround)((0, source_1.str)('['), (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.txt]), ']'), (0, source_1.str)(']'), true), (0, combinator_1.surround)((0, source_1.str)('{'), (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.txt]), '}'), (0, source_1.str)('}'), true), (0, combinator_1.surround)((0, source_1.str)('"'), (0, combinator_1.precedence)(8, (0, combinator_1.some)(source_1.txt, '"')), (0, source_1.str)('"'), true)])));
|
|
6249
6247
|
|
|
6250
6248
|
/***/ }),
|
|
6251
6249
|
|
|
@@ -6346,7 +6344,7 @@ const index_1 = __webpack_require__(4479);
|
|
|
6346
6344
|
|
|
6347
6345
|
const dom_1 = __webpack_require__(3252);
|
|
6348
6346
|
|
|
6349
|
-
exports.indexer = (0, combinator_1.
|
|
6347
|
+
exports.indexer = (0, combinator_1.creation)((0, combinator_1.fmap)((0, combinator_1.verify)((0, combinator_1.surround)(/^\s+(?=\[#\S)/, (0, combinator_1.state)(16
|
|
6350
6348
|
/* State.index */
|
|
6351
6349
|
, false, (0, combinator_1.union)([(0, combinator_1.focus)('[#]', () => [[(0, dom_1.html)('a', {
|
|
6352
6350
|
href: '#'
|
|
@@ -6379,7 +6377,7 @@ const dom_1 = __webpack_require__(3252);
|
|
|
6379
6377
|
|
|
6380
6378
|
const body = (0, source_1.str)(/^\$[A-Za-z]*(?:(?:-[A-Za-z][0-9A-Za-z]*)+|-(?:(?:0|[1-9][0-9]*)\.)*(?:0|[1-9][0-9]*)(?![0-9A-Za-z]))/);
|
|
6381
6379
|
exports.segment = (0, combinator_1.clear)((0, combinator_1.validate)(['[$', '$'], (0, combinator_1.union)([(0, combinator_1.surround)('[', body, ']'), body])));
|
|
6382
|
-
exports.label = (0, combinator_1.validate)(['[$', '$'], (0, combinator_1.
|
|
6380
|
+
exports.label = (0, combinator_1.validate)(['[$', '$'], (0, combinator_1.creation)((0, combinator_1.fmap)((0, combinator_1.guard)(context => ~context.state & 8
|
|
6383
6381
|
/* State.label */
|
|
6384
6382
|
, (0, combinator_1.union)([(0, combinator_1.surround)('[', body, ']'), body])), ([text]) => [(0, dom_1.html)('a', {
|
|
6385
6383
|
class: 'label',
|
|
@@ -6437,14 +6435,14 @@ const array_1 = __webpack_require__(8112); // Don't use the symbols already used
|
|
|
6437
6435
|
// All syntax surrounded by square brackets shouldn't contain line breaks.
|
|
6438
6436
|
|
|
6439
6437
|
|
|
6440
|
-
exports.placeholder = (0, combinator_1.lazy)(() => (0, combinator_1.validate)(['[:', '[^'], (0, combinator_1.syntax)(0
|
|
6441
|
-
/*
|
|
6442
|
-
, 2,
|
|
6438
|
+
exports.placeholder = (0, combinator_1.lazy)(() => (0, combinator_1.validate)(['[:', '[^'], (0, combinator_1.surround)((0, source_1.str)(/^\[[:^]/), (0, combinator_1.syntax)(0
|
|
6439
|
+
/* Syntax.none */
|
|
6440
|
+
, 2, 1, (0, visibility_1.startTight)((0, combinator_1.some)((0, combinator_1.union)([inline_1.inline]), ']', [[/^\\?\n/, 9], [']', 2]]))), (0, source_1.str)(']'), false, ([as, bs], rest) => [[(0, dom_1.html)('span', {
|
|
6443
6441
|
class: 'invalid',
|
|
6444
6442
|
'data-invalid-syntax': 'extension',
|
|
6445
6443
|
'data-invalid-type': 'syntax',
|
|
6446
6444
|
'data-invalid-message': `Reserved start symbol "${as[0][1]}" cannot be used in "[]"`
|
|
6447
|
-
}, (0, dom_1.defrag)(bs))], rest], ([as, bs], rest) => [(0, array_1.unshift)(as, bs), rest])))
|
|
6445
|
+
}, (0, dom_1.defrag)(bs))], rest], ([as, bs], rest) => [(0, array_1.unshift)(as, bs), rest])));
|
|
6448
6446
|
|
|
6449
6447
|
/***/ }),
|
|
6450
6448
|
|
|
@@ -6486,8 +6484,8 @@ const attrspecs = {
|
|
|
6486
6484
|
global_1.Object.setPrototypeOf(attrspecs, null);
|
|
6487
6485
|
global_1.Object.values(attrspecs).forEach(o => global_1.Object.setPrototypeOf(o, null));
|
|
6488
6486
|
exports.html = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('<', (0, combinator_1.validate)(/^<[a-z]+(?=[^\S\n]|>)/, (0, combinator_1.syntax)(0
|
|
6489
|
-
/*
|
|
6490
|
-
, 5, (0, combinator_1.union)([(0, combinator_1.focus)('<wbr>', () => [[(0, dom_1.html)('wbr')], '']), (0, combinator_1.focus)( // https://html.spec.whatwg.org/multipage/syntax.html#void-elements
|
|
6487
|
+
/* Syntax.none */
|
|
6488
|
+
, 5, 1, (0, combinator_1.union)([(0, combinator_1.focus)('<wbr>', () => [[(0, dom_1.html)('wbr')], '']), (0, combinator_1.focus)( // https://html.spec.whatwg.org/multipage/syntax.html#void-elements
|
|
6491
6489
|
/^<(?:area|base|br|col|embed|hr|img|input|link|meta|source|track|wbr)(?=[^\S\n]|>)/, source => [[source], '']), (0, combinator_1.match)(new RegExp(String.raw`^<(${TAGS.join('|')})(?=[^\S\n]|>)`), (0, memoize_1.memoize)(([, tag]) => (0, combinator_1.surround)((0, combinator_1.surround)((0, source_1.str)(`<${tag}`), (0, combinator_1.some)(exports.attribute), (0, source_1.str)(/^[^\S\n]*>/), true), (0, combinator_1.subsequence)([(0, combinator_1.focus)(/^[^\S\n]*\n/, (0, combinator_1.some)(inline_1.inline)), (0, combinator_1.some)((0, combinator_1.open)(/^\n?/, (0, combinator_1.some)(inline_1.inline, (0, visibility_1.blankWith)('\n', `</${tag}>`), [[(0, visibility_1.blankWith)('\n', `</${tag}>`), 5]]), true))]), (0, source_1.str)(`</${tag}>`), true, ([as, bs = [], cs], rest) => [[elem(tag, as, bs, cs)], rest], ([as, bs = []], rest) => [[elem(tag, as, bs, [])], rest]), ([, tag]) => TAGS.indexOf(tag), [])), (0, combinator_1.match)(/^<([a-z]+)(?=[^\S\n]|>)/, (0, memoize_1.memoize)(([, tag]) => (0, combinator_1.surround)((0, combinator_1.surround)((0, source_1.str)(`<${tag}`), (0, combinator_1.some)(exports.attribute), (0, source_1.str)(/^[^\S\n]*>/), true), (0, combinator_1.subsequence)([(0, combinator_1.focus)(/^[^\S\n]*\n/, (0, combinator_1.some)(inline_1.inline)), (0, combinator_1.some)(inline_1.inline, `</${tag}>`, [[`</${tag}>`, 5]])]), (0, source_1.str)(`</${tag}>`), true, ([as, bs = [], cs], rest) => [[elem(tag, as, bs, cs)], rest], ([as, bs = []], rest) => [[elem(tag, as, bs, [])], rest]), ([, tag]) => tag, new cache_1.Cache(10000)))])))));
|
|
6492
6490
|
exports.attribute = (0, combinator_1.union)([(0, source_1.str)(/^[^\S\n]+[a-z]+(?:-[a-z]+)*(?:="(?:\\[^\n]|[^\\\n"])*")?(?=[^\S\n]|>)/)]); // https://developer.mozilla.org/en-US/docs/Web/HTML/Element
|
|
6493
6491
|
// [...document.querySelectorAll('tbody > tr > td:first-child')].map(el => el.textContent.slice(1, -1))
|
|
@@ -6563,7 +6561,7 @@ const dom_1 = __webpack_require__(3252);
|
|
|
6563
6561
|
|
|
6564
6562
|
const memoize_1 = __webpack_require__(1808);
|
|
6565
6563
|
|
|
6566
|
-
exports.unsafehtmlentity = (0, combinator_1.
|
|
6564
|
+
exports.unsafehtmlentity = (0, combinator_1.creation)((0, combinator_1.validate)('&', (0, combinator_1.focus)(/^&[0-9A-Za-z]+;/, entity => [[parse(entity) ?? `\x1B${entity}`], ''])));
|
|
6567
6565
|
exports.htmlentity = (0, combinator_1.fmap)((0, combinator_1.union)([exports.unsafehtmlentity]), ([test]) => [test[0] === '\x1B' ? (0, dom_1.html)('span', {
|
|
6568
6566
|
class: 'invalid',
|
|
6569
6567
|
'data-invalid-syntax': 'htmlentity',
|
|
@@ -6602,9 +6600,9 @@ const dom_1 = __webpack_require__(3252);
|
|
|
6602
6600
|
|
|
6603
6601
|
const array_1 = __webpack_require__(8112);
|
|
6604
6602
|
|
|
6605
|
-
exports.insertion = (0, combinator_1.lazy)(() => (0, combinator_1.syntax)(0
|
|
6606
|
-
/*
|
|
6607
|
-
, 1,
|
|
6603
|
+
exports.insertion = (0, combinator_1.lazy)(() => (0, combinator_1.surround)((0, source_1.str)('++'), (0, combinator_1.syntax)(0
|
|
6604
|
+
/* Syntax.none */
|
|
6605
|
+
, 1, 1, (0, combinator_1.some)((0, combinator_1.union)([(0, combinator_1.some)(inline_1.inline, (0, visibility_1.blankWith)('\n', '++')), (0, combinator_1.open)('\n', (0, combinator_1.some)(inline_1.inline, '+'), true)]))), (0, source_1.str)('++'), false, ([, bs], rest) => [[(0, dom_1.html)('ins', (0, dom_1.defrag)(bs))], rest], ([as, bs], rest) => [(0, array_1.unshift)(as, bs), rest]));
|
|
6608
6606
|
|
|
6609
6607
|
/***/ }),
|
|
6610
6608
|
|
|
@@ -6645,11 +6643,11 @@ const optspec = {
|
|
|
6645
6643
|
rel: ['nofollow']
|
|
6646
6644
|
};
|
|
6647
6645
|
Object.setPrototypeOf(optspec, null);
|
|
6648
|
-
exports.link = (0, combinator_1.lazy)(() => (0, combinator_1.validate)(['[', '{'], (0, combinator_1.
|
|
6649
|
-
/* Rule.link */
|
|
6650
|
-
, 2, 10, (0, combinator_1.bind)((0, combinator_1.guard)(context => ~context.state & 4
|
|
6646
|
+
exports.link = (0, combinator_1.lazy)(() => (0, combinator_1.validate)(['[', '{'], (0, combinator_1.bind)((0, combinator_1.guard)(context => ~context.state & 4
|
|
6651
6647
|
/* State.link */
|
|
6652
|
-
, (0, combinator_1.
|
|
6648
|
+
, (0, combinator_1.syntax)(256
|
|
6649
|
+
/* Syntax.link */
|
|
6650
|
+
, 2, 10, (0, combinator_1.fmap)((0, combinator_1.subsequence)([(0, combinator_1.state)(4
|
|
6653
6651
|
/* State.link */
|
|
6654
6652
|
, (0, combinator_1.dup)((0, combinator_1.union)([(0, combinator_1.surround)('[', inline_1.media, ']'), (0, combinator_1.surround)('[', inline_1.shortmedia, ']'), (0, combinator_1.surround)('[', (0, combinator_1.state)(64
|
|
6655
6653
|
/* State.annotation */
|
|
@@ -6663,26 +6661,29 @@ exports.link = (0, combinator_1.lazy)(() => (0, combinator_1.validate)(['[', '{'
|
|
|
6663
6661
|
/* State.media */
|
|
6664
6662
|
| 1
|
|
6665
6663
|
/* State.autolink */
|
|
6666
|
-
, (0, combinator_1.some)(inline_1.inline, ']', [[/^\\?\n/, 9], [']', 2]])), ']', true, global_1.undefined, ([, ns = [], rest], next) => next[0] === ']' ? global_1.undefined : optimize('[', ns, rest))]))),
|
|
6667
|
-
(0, combinator_1.dup)((0, combinator_1.surround)(/^{(?![{}])/, (0, combinator_1.inits)([exports.uri, (0, combinator_1.some)(exports.option)]), /^[^\S\n]*}/))]), ([as, bs = []]) => bs[0] === '\r' && bs.shift() ? [as, bs] : as[0] === '\r' && as.shift() ? [[], as] : [as, []])), ([content, params], rest, context) => {
|
|
6668
|
-
if (params.length === 0) return;
|
|
6664
|
+
, (0, combinator_1.some)(inline_1.inline, ']', [[/^\\?\n/, 9], [']', 2]])), ']', true, global_1.undefined, ([, ns = [], rest], next) => next[0] === ']' ? global_1.undefined : optimize('[', ns, rest, next))]))), (0, combinator_1.dup)((0, combinator_1.surround)(/^{(?![{}])/, (0, combinator_1.inits)([exports.uri, (0, combinator_1.some)(exports.option)]), /^[^\S\n]*}/))], nodes => nodes[0][0] !== ''), ([as, bs = []]) => bs[0] === '\r' && bs.shift() ? [as, bs] : as[0] === '\r' && as.shift() ? [[], as] : [as, []]))), ([content, params], rest, context) => {
|
|
6669
6665
|
if (content[0] === '') return [content, rest];
|
|
6666
|
+
if (params.length === 0) return;
|
|
6670
6667
|
if (content.length !== 0 && (0, visibility_1.trimNode)(content).length === 0) return;
|
|
6671
|
-
|
|
6668
|
+
|
|
6669
|
+
for (let source = (0, util_1.stringify)(content); source;) {
|
|
6670
|
+
const result = (0, autolink_1.autolink)(source, context);
|
|
6671
|
+
if (typeof (0, parser_1.eval)(result)[0] === 'object') return;
|
|
6672
|
+
source = (0, parser_1.exec)(result);
|
|
6673
|
+
}
|
|
6674
|
+
|
|
6672
6675
|
const INSECURE_URI = params.shift();
|
|
6673
6676
|
const el = elem(INSECURE_URI, (0, dom_1.defrag)(content), new url_1.ReadonlyURL(resolve(INSECURE_URI, context.host ?? global_1.location, context.url ?? context.host ?? global_1.location), context.host?.href || global_1.location.href), context.host?.origin || global_1.location.origin);
|
|
6674
6677
|
if (el.classList.contains('invalid')) return [[el], rest];
|
|
6675
6678
|
return [[(0, dom_1.define)(el, (0, html_1.attributes)('link', [], optspec, params))], rest];
|
|
6676
|
-
})))
|
|
6677
|
-
exports.textlink = (0, combinator_1.lazy)(() => (0, combinator_1.validate)(['[', '{'], (0, combinator_1.
|
|
6678
|
-
/* Rule.link */
|
|
6679
|
-
, 2, 10, (0, combinator_1.bind)((0, combinator_1.reverse)((0, combinator_1.tails)([(0, combinator_1.dup)((0, combinator_1.surround)('[', (0, combinator_1.some)((0, combinator_1.union)([source_1.unescsource]), ']'), ']')), (0, combinator_1.dup)((0, combinator_1.surround)(/^{(?![{}])/, (0, combinator_1.inits)([exports.uri, (0, combinator_1.some)(exports.option)]), /^[^\S\n]*}/))])), ([params, content = []], rest, context) => {
|
|
6679
|
+
})));
|
|
6680
|
+
exports.textlink = (0, combinator_1.lazy)(() => (0, combinator_1.validate)(['[', '{'], (0, combinator_1.bind)((0, combinator_1.creation)(10, (0, combinator_1.precedence)(2, (0, combinator_1.reverse)((0, combinator_1.tails)([(0, combinator_1.dup)((0, combinator_1.surround)('[', (0, combinator_1.some)((0, combinator_1.union)([source_1.unescsource]), ']'), ']')), (0, combinator_1.dup)((0, combinator_1.surround)(/^{(?![{}])/, (0, combinator_1.inits)([exports.uri, (0, combinator_1.some)(exports.option)]), /^[^\S\n]*}/))])))), ([params, content = []], rest, context) => {
|
|
6680
6681
|
params.shift();
|
|
6681
6682
|
(0, visibility_1.trimNode)(content);
|
|
6682
6683
|
const INSECURE_URI = params.shift();
|
|
6683
6684
|
const el = elem(INSECURE_URI, (0, dom_1.defrag)(content), new url_1.ReadonlyURL(resolve(INSECURE_URI, context.host ?? global_1.location, context.url ?? context.host ?? global_1.location), context.host?.href || global_1.location.href), context.host?.origin || global_1.location.origin);
|
|
6684
6685
|
return [[(0, dom_1.define)(el, (0, html_1.attributes)('link', [], optspec, params))], rest];
|
|
6685
|
-
})))
|
|
6686
|
+
})));
|
|
6686
6687
|
exports.uri = (0, combinator_1.fmap)((0, combinator_1.union)([(0, combinator_1.open)(/^[^\S\n]+/, (0, source_1.str)(/^\S+/)), (0, source_1.str)(/^[^\s{}]+/)]), ([uri]) => ['\r', uri]);
|
|
6687
6688
|
exports.option = (0, combinator_1.union)([(0, combinator_1.fmap)((0, source_1.str)(/^[^\S\n]+nofollow(?=[^\S\n]|})/), () => [` rel="nofollow"`]), (0, source_1.str)(/^[^\S\n]+[a-z]+(?:-[a-z]+)*(?:="(?:\\[^\n]|[^\\\n"])*")?(?=[^\S\n]|})/), (0, combinator_1.fmap)((0, source_1.str)(/^[^\S\n]+[^\s{}]+/), opt => [` \\${opt.slice(1)}`])]);
|
|
6688
6689
|
|
|
@@ -6760,12 +6761,15 @@ function decode(uri) {
|
|
|
6760
6761
|
}
|
|
6761
6762
|
}
|
|
6762
6763
|
|
|
6763
|
-
function optimize(opener, ns, rest) {
|
|
6764
|
+
function optimize(opener, ns, rest, next) {
|
|
6765
|
+
if (next[+(next[0] === '\\')] === '\n') return;
|
|
6764
6766
|
let count = 0;
|
|
6765
6767
|
|
|
6766
6768
|
for (let i = 0; i < ns.length - 1; i += 2) {
|
|
6767
|
-
|
|
6768
|
-
|
|
6769
|
+
const fst = ns[i];
|
|
6770
|
+
const snd = ns[i + 1];
|
|
6771
|
+
if (fst !== '' || snd[0] !== opener[0]) break;
|
|
6772
|
+
count += snd.length;
|
|
6769
6773
|
}
|
|
6770
6774
|
|
|
6771
6775
|
return [['', opener[0].repeat(opener.length + count)], rest.slice(count)];
|
|
@@ -6798,9 +6802,9 @@ const dom_1 = __webpack_require__(3252);
|
|
|
6798
6802
|
|
|
6799
6803
|
const array_1 = __webpack_require__(8112);
|
|
6800
6804
|
|
|
6801
|
-
exports.mark = (0, combinator_1.lazy)(() => (0, combinator_1.syntax)(0
|
|
6802
|
-
/*
|
|
6803
|
-
, 1,
|
|
6805
|
+
exports.mark = (0, combinator_1.lazy)(() => (0, combinator_1.surround)((0, source_1.str)('=='), (0, combinator_1.syntax)(0
|
|
6806
|
+
/* Syntax.none */
|
|
6807
|
+
, 1, 1, (0, visibility_1.startTight)((0, combinator_1.some)((0, combinator_1.union)([(0, combinator_1.some)(inline_1.inline, (0, visibility_1.blankWith)('==')), (0, combinator_1.open)((0, combinator_1.some)(inline_1.inline, '='), exports.mark)])))), (0, source_1.str)('=='), false, ([, bs], rest) => [[(0, dom_1.html)('mark', (0, dom_1.defrag)(bs))], rest], ([as, bs], rest) => [(0, array_1.unshift)(as, bs), rest]));
|
|
6804
6808
|
|
|
6805
6809
|
/***/ }),
|
|
6806
6810
|
|
|
@@ -6822,7 +6826,7 @@ const source_1 = __webpack_require__(6743);
|
|
|
6822
6826
|
const dom_1 = __webpack_require__(3252);
|
|
6823
6827
|
|
|
6824
6828
|
const forbiddenCommand = /\\(?:begin|tiny|huge|large)(?![a-z])/i;
|
|
6825
|
-
exports.math = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('$', (0, combinator_1.
|
|
6829
|
+
exports.math = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('$', (0, combinator_1.creation)((0, combinator_1.rewrite)((0, combinator_1.union)([(0, combinator_1.surround)('$', (0, combinator_1.precedence)(6, bracket), '$'), (0, combinator_1.surround)(/^\$(?![\s{}])/, (0, combinator_1.precedence)(3, (0, combinator_1.some)((0, combinator_1.union)([bracket, (0, combinator_1.focus)(/^(?:[ ([](?!\$)|\\[\\{}$]?|[!#%&')\x2A-\x5A\]^_\x61-\x7A|~])+/, (0, combinator_1.some)(source_1.unescsource))]))), /^\$(?![0-9A-Za-z])/)]), (source, {
|
|
6826
6830
|
caches: {
|
|
6827
6831
|
math: cache
|
|
6828
6832
|
} = {}
|
|
@@ -6837,7 +6841,7 @@ exports.math = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('$', (0,
|
|
|
6837
6841
|
'data-invalid-type': 'content',
|
|
6838
6842
|
'data-invalid-message': `"${source.match(forbiddenCommand)[0]}" command is forbidden`
|
|
6839
6843
|
}, source)], '']))));
|
|
6840
|
-
const bracket = (0, combinator_1.lazy)(() => (0, combinator_1.
|
|
6844
|
+
const bracket = (0, combinator_1.lazy)(() => (0, combinator_1.creation)((0, combinator_1.surround)('{', (0, combinator_1.some)((0, combinator_1.union)([bracket, (0, combinator_1.some)(source_1.escsource, /^(?:[{}$]|\\?\n)/)])), '}', true)));
|
|
6841
6845
|
|
|
6842
6846
|
/***/ }),
|
|
6843
6847
|
|
|
@@ -6877,11 +6881,11 @@ const optspec = {
|
|
|
6877
6881
|
rel: global_1.undefined
|
|
6878
6882
|
};
|
|
6879
6883
|
Object.setPrototypeOf(optspec, null);
|
|
6880
|
-
exports.media = (0, combinator_1.lazy)(() => (0, combinator_1.validate)(['![', '!{'], (0, combinator_1.
|
|
6881
|
-
/* Rule.media */
|
|
6882
|
-
, 2, 10, (0, combinator_1.bind)((0, combinator_1.verify)((0, combinator_1.fmap)((0, combinator_1.open)('!', (0, combinator_1.guard)(context => ~context.state & 2
|
|
6884
|
+
exports.media = (0, combinator_1.lazy)(() => (0, combinator_1.validate)(['![', '!{'], (0, combinator_1.bind)((0, combinator_1.verify)((0, combinator_1.fmap)((0, combinator_1.open)('!', (0, combinator_1.guard)(context => ~context.state & 2
|
|
6883
6885
|
/* State.media */
|
|
6884
|
-
, (0, combinator_1.
|
|
6886
|
+
, (0, combinator_1.syntax)(64
|
|
6887
|
+
/* Syntax.media */
|
|
6888
|
+
, 2, 10, (0, combinator_1.tails)([(0, combinator_1.dup)((0, combinator_1.surround)('[', (0, combinator_1.some)((0, combinator_1.union)([htmlentity_1.unsafehtmlentity, bracket, source_1.txt]), ']', [[/^\\?\n/, 9]]), ']', true)), (0, combinator_1.dup)((0, combinator_1.surround)(/^{(?![{}])/, (0, combinator_1.inits)([link_1.uri, (0, combinator_1.some)(option)]), /^[^\S\n]*}/))])))), ([as, bs]) => bs ? [[as.join('').trim() || as.join('')], (0, array_1.shift)(bs)[1]] : [[''], (0, array_1.shift)(as)[1]]), ([[text]]) => text === '' || text.trim() !== ''), ([[text], params], rest, context) => {
|
|
6885
6889
|
const INSECURE_URI = params.shift();
|
|
6886
6890
|
const url = new url_1.ReadonlyURL((0, link_1.resolve)(INSECURE_URI, context.host ?? global_1.location, context.url ?? context.host ?? global_1.location), context.host?.href || global_1.location.href);
|
|
6887
6891
|
let cache;
|
|
@@ -6905,8 +6909,8 @@ exports.media = (0, combinator_1.lazy)(() => (0, combinator_1.validate)(['![', '
|
|
|
6905
6909
|
return (0, combinator_1.fmap)(link_1.textlink, ([link]) => [(0, dom_1.define)(link, {
|
|
6906
6910
|
target: '_blank'
|
|
6907
6911
|
}, [el])])(`{ ${INSECURE_URI}${params.join('')} }${rest}`, context);
|
|
6908
|
-
})))
|
|
6909
|
-
const bracket = (0, combinator_1.lazy)(() => (0, combinator_1.
|
|
6912
|
+
})));
|
|
6913
|
+
const bracket = (0, combinator_1.lazy)(() => (0, combinator_1.creation)((0, combinator_1.union)([(0, combinator_1.surround)((0, source_1.str)('('), (0, combinator_1.some)((0, combinator_1.union)([htmlentity_1.unsafehtmlentity, bracket, source_1.txt]), ')'), (0, source_1.str)(')'), true, global_1.undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), (0, combinator_1.surround)((0, source_1.str)('['), (0, combinator_1.some)((0, combinator_1.union)([htmlentity_1.unsafehtmlentity, bracket, source_1.txt]), ']'), (0, source_1.str)(']'), true, global_1.undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), (0, combinator_1.surround)((0, source_1.str)('{'), (0, combinator_1.some)((0, combinator_1.union)([htmlentity_1.unsafehtmlentity, bracket, source_1.txt]), '}'), (0, source_1.str)('}'), true, global_1.undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), (0, combinator_1.surround)((0, source_1.str)('"'), (0, combinator_1.precedence)(8, (0, combinator_1.some)((0, combinator_1.union)([htmlentity_1.unsafehtmlentity, source_1.txt]), '"')), (0, source_1.str)('"'), true)])));
|
|
6910
6914
|
const option = (0, combinator_1.union)([(0, combinator_1.fmap)((0, source_1.str)(/^[^\S\n]+[1-9][0-9]*x[1-9][0-9]*(?=[^\S\n]|})/), ([opt]) => [` width="${opt.slice(1).split('x')[0]}"`, ` height="${opt.slice(1).split('x')[1]}"`]), (0, combinator_1.fmap)((0, source_1.str)(/^[^\S\n]+[1-9][0-9]*:[1-9][0-9]*(?=[^\S\n]|})/), ([opt]) => [` aspect-ratio="${opt.slice(1).split(':').join('/')}"`]), link_1.option]);
|
|
6911
6915
|
|
|
6912
6916
|
function sanitize(target, uri, alt) {
|
|
@@ -6978,11 +6982,11 @@ const util_1 = __webpack_require__(9437);
|
|
|
6978
6982
|
|
|
6979
6983
|
const dom_1 = __webpack_require__(3252);
|
|
6980
6984
|
|
|
6981
|
-
exports.reference = (0, combinator_1.lazy)(() => (0, combinator_1.
|
|
6982
|
-
/* Rule.reference */
|
|
6983
|
-
, 6, (0, combinator_1.surround)('[[', (0, combinator_1.guard)(context => ~context.state & 32
|
|
6985
|
+
exports.reference = (0, combinator_1.lazy)(() => (0, combinator_1.surround)('[[', (0, combinator_1.guard)(context => ~context.state & 32
|
|
6984
6986
|
/* State.reference */
|
|
6985
|
-
, (0, combinator_1.
|
|
6987
|
+
, (0, combinator_1.syntax)(4096
|
|
6988
|
+
/* Syntax.reference */
|
|
6989
|
+
, 6, 1, (0, combinator_1.state)(64
|
|
6986
6990
|
/* State.annotation */
|
|
6987
6991
|
| 32
|
|
6988
6992
|
/* State.reference */
|
|
@@ -6990,8 +6994,8 @@ exports.reference = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('[['
|
|
|
6990
6994
|
/* State.media */
|
|
6991
6995
|
, (0, visibility_1.startLoose)((0, combinator_1.context)({
|
|
6992
6996
|
delimiters: global_1.undefined
|
|
6993
|
-
}, (0, combinator_1.subsequence)([abbr, (0, combinator_1.open)((0, source_1.stropt)(/^(?=\^)/), (0, combinator_1.some)(inline_1.inline, ']', [[/^\\?\n/, 9], [']', 2], [']]', 6]])), (0, combinator_1.some)(inline_1.inline, ']', [[/^\\?\n/, 9], [']', 2], [']]', 6]])])), ']'))), ']]', false, ([, ns], rest) => [[(0, dom_1.html)('sup', attributes(ns), [(0, dom_1.html)('span', (0, visibility_1.trimNode)((0, dom_1.defrag)(ns)))])], rest], ([, ns, rest], next) => next[0] === ']' ? global_1.undefined : (0, link_1.optimize)('[[', ns, rest)))
|
|
6994
|
-
const abbr = (0, combinator_1.
|
|
6997
|
+
}, (0, combinator_1.subsequence)([abbr, (0, combinator_1.open)((0, source_1.stropt)(/^(?=\^)/), (0, combinator_1.some)(inline_1.inline, ']', [[/^\\?\n/, 9], [']', 2], [']]', 6]])), (0, combinator_1.some)(inline_1.inline, ']', [[/^\\?\n/, 9], [']', 2], [']]', 6]])])), ']')))), ']]', false, ([, ns], rest) => [[(0, dom_1.html)('sup', attributes(ns), [(0, dom_1.html)('span', (0, visibility_1.trimNode)((0, dom_1.defrag)(ns)))])], rest], ([, ns, rest], next) => next[0] === ']' ? global_1.undefined : (0, link_1.optimize)('[[', ns, rest, next)));
|
|
6998
|
+
const abbr = (0, combinator_1.creation)((0, combinator_1.bind)((0, combinator_1.surround)('^', (0, combinator_1.union)([(0, source_1.str)(/^(?![0-9]+\s?[|\]])[0-9A-Za-z]+(?:(?:-|(?=\W)(?!'\d)'?(?!\.\d)\.?(?!,\S),? ?)[0-9A-Za-z]+)*(?:-|'?\.?,? ?)?/)]), /^\|?(?=]])|^\|[^\S\n]*/), ([source], rest) => [[(0, dom_1.html)('abbr', source)], rest.replace(visibility_1.regBlankStart, '')]));
|
|
6995
6999
|
|
|
6996
7000
|
function attributes(ns) {
|
|
6997
7001
|
return typeof ns[0] === 'object' && ns[0].tagName === 'ABBR' ? {
|
|
@@ -7037,8 +7041,8 @@ const dom_1 = __webpack_require__(3252);
|
|
|
7037
7041
|
const array_1 = __webpack_require__(8112);
|
|
7038
7042
|
|
|
7039
7043
|
exports.ruby = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('[', (0, combinator_1.syntax)(0
|
|
7040
|
-
/*
|
|
7041
|
-
, 2, (0, combinator_1.fmap)((0, combinator_1.verify)((0, combinator_1.sequence)([(0, combinator_1.surround)('[', (0, combinator_1.focus)(/^(?:\\[^\n]|[^\\[\](){}"\n])+(?=]\()/, text), ']'), (0, combinator_1.surround)('(', (0, combinator_1.focus)(/^(?:\\[^\n]|[^\\[\](){}"\n])+(?=\))/, text), ')')]), ([texts]) => (0, visibility_1.isStartTightNodes)(texts)), ([texts, rubies]) => {
|
|
7044
|
+
/* Syntax.none */
|
|
7045
|
+
, 2, 1, (0, combinator_1.fmap)((0, combinator_1.verify)((0, combinator_1.sequence)([(0, combinator_1.surround)('[', (0, combinator_1.focus)(/^(?:\\[^\n]|[^\\[\](){}"\n])+(?=]\()/, text), ']'), (0, combinator_1.surround)('(', (0, combinator_1.focus)(/^(?:\\[^\n]|[^\\[\](){}"\n])+(?=\))/, text), ')')]), ([texts]) => (0, visibility_1.isStartTightNodes)(texts)), ([texts, rubies]) => {
|
|
7042
7046
|
texts[texts.length - 1] === '' && texts.pop();
|
|
7043
7047
|
|
|
7044
7048
|
switch (true) {
|
|
@@ -7052,7 +7056,7 @@ exports.ruby = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('[', (0,
|
|
|
7052
7056
|
return [(0, dom_1.html)('ruby', attributes(texts, rubies), (0, dom_1.defrag)((0, array_1.unshift)([texts.join(' ')], [(0, dom_1.html)('rp', '('), (0, dom_1.html)('rt', rubies.join(' ').trim()), (0, dom_1.html)('rp', ')')])))];
|
|
7053
7057
|
}
|
|
7054
7058
|
}))));
|
|
7055
|
-
const text = (0, combinator_1.
|
|
7059
|
+
const text = (0, combinator_1.creation)((source, context) => {
|
|
7056
7060
|
const acc = [''];
|
|
7057
7061
|
|
|
7058
7062
|
while (source !== '') {
|
|
@@ -7158,9 +7162,9 @@ const dom_1 = __webpack_require__(3252);
|
|
|
7158
7162
|
|
|
7159
7163
|
const array_1 = __webpack_require__(8112);
|
|
7160
7164
|
|
|
7161
|
-
exports.strong = (0, combinator_1.lazy)(() => (0, combinator_1.syntax)(0
|
|
7162
|
-
/*
|
|
7163
|
-
, 1,
|
|
7165
|
+
exports.strong = (0, combinator_1.lazy)(() => (0, combinator_1.surround)((0, source_1.str)('**'), (0, combinator_1.syntax)(0
|
|
7166
|
+
/* Syntax.none */
|
|
7167
|
+
, 1, 1, (0, visibility_1.startTight)((0, combinator_1.some)((0, combinator_1.union)([(0, combinator_1.some)(inline_1.inline, (0, visibility_1.blankWith)('**')), (0, combinator_1.open)((0, combinator_1.some)(inline_1.inline, '*'), (0, combinator_1.union)([emstrong_1.emstrong, exports.strong]))])), '*')), (0, source_1.str)('**'), false, ([, bs], rest) => [[(0, dom_1.html)('strong', (0, dom_1.defrag)(bs))], rest], ([as, bs], rest) => [(0, array_1.unshift)(as, bs), rest]));
|
|
7164
7168
|
|
|
7165
7169
|
/***/ }),
|
|
7166
7170
|
|
|
@@ -7187,12 +7191,12 @@ const dom_1 = __webpack_require__(3252);
|
|
|
7187
7191
|
|
|
7188
7192
|
const array_1 = __webpack_require__(8112);
|
|
7189
7193
|
|
|
7190
|
-
exports.template = (0, combinator_1.lazy)(() => (0, combinator_1.syntax)(0
|
|
7191
|
-
/*
|
|
7192
|
-
, 2,
|
|
7194
|
+
exports.template = (0, combinator_1.lazy)(() => (0, combinator_1.surround)('{{', (0, combinator_1.syntax)(0
|
|
7195
|
+
/* Syntax.none */
|
|
7196
|
+
, 2, 1, (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.escsource]), '}')), '}}', true, ([, ns = []], rest) => [[(0, dom_1.html)('span', {
|
|
7193
7197
|
class: 'template'
|
|
7194
|
-
}, `{{${ns.join('').replace(/\x1B/g, '')}}}`)], rest], ([, ns = [], rest], next) => next[0] === '}' ? global_1.undefined : (0, link_1.optimize)('{{', ns, rest)))
|
|
7195
|
-
const bracket = (0, combinator_1.lazy)(() => (0, combinator_1.
|
|
7198
|
+
}, `{{${ns.join('').replace(/\x1B/g, '')}}}`)], rest], ([, ns = [], rest], next) => next[0] === '}' ? global_1.undefined : (0, link_1.optimize)('{{', ns, rest, next)));
|
|
7199
|
+
const bracket = (0, combinator_1.lazy)(() => (0, combinator_1.creation)((0, combinator_1.union)([(0, combinator_1.surround)((0, source_1.str)('('), (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.escsource]), ')'), (0, source_1.str)(')'), true, global_1.undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), (0, combinator_1.surround)((0, source_1.str)('['), (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.escsource]), ']'), (0, source_1.str)(']'), true, global_1.undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), (0, combinator_1.surround)((0, source_1.str)('{'), (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.escsource]), '}'), (0, source_1.str)('}'), true, global_1.undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), (0, combinator_1.surround)((0, source_1.str)('"'), (0, combinator_1.precedence)(8, (0, combinator_1.some)(source_1.escsource, /^"|^\\?\n/)), (0, source_1.str)('"'), true)])));
|
|
7196
7200
|
|
|
7197
7201
|
/***/ }),
|
|
7198
7202
|
|
|
@@ -7849,7 +7853,7 @@ const combinator_1 = __webpack_require__(2087);
|
|
|
7849
7853
|
const text_1 = __webpack_require__(7763);
|
|
7850
7854
|
|
|
7851
7855
|
const delimiter = /[\s\x00-\x2F\x3A-\x40\x5B-\x60\x7B-\x7F]/;
|
|
7852
|
-
exports.escsource = (0, combinator_1.
|
|
7856
|
+
exports.escsource = (0, combinator_1.creation)(source => {
|
|
7853
7857
|
if (source === '') return;
|
|
7854
7858
|
const i = source.search(delimiter);
|
|
7855
7859
|
|
|
@@ -7915,10 +7919,10 @@ const global_1 = __webpack_require__(4128);
|
|
|
7915
7919
|
const combinator_1 = __webpack_require__(2087);
|
|
7916
7920
|
|
|
7917
7921
|
function str(pattern) {
|
|
7918
|
-
return typeof pattern === 'string' ? (0, combinator_1.
|
|
7922
|
+
return typeof pattern === 'string' ? (0, combinator_1.creation)(source => {
|
|
7919
7923
|
if (source === '') return;
|
|
7920
7924
|
return source.slice(0, pattern.length) === pattern ? [[pattern], source.slice(pattern.length)] : global_1.undefined;
|
|
7921
|
-
}) : (0, combinator_1.
|
|
7925
|
+
}) : (0, combinator_1.creation)(source => {
|
|
7922
7926
|
if (source === '') return;
|
|
7923
7927
|
const m = source.match(pattern);
|
|
7924
7928
|
return m && m[0].length > 0 ? [[m[0]], source.slice(m[0].length)] : global_1.undefined;
|
|
@@ -7928,10 +7932,10 @@ function str(pattern) {
|
|
|
7928
7932
|
exports.str = str;
|
|
7929
7933
|
|
|
7930
7934
|
function stropt(pattern) {
|
|
7931
|
-
return typeof pattern === 'string' ? (0, combinator_1.
|
|
7935
|
+
return typeof pattern === 'string' ? (0, combinator_1.creation)(source => {
|
|
7932
7936
|
if (source === '') return;
|
|
7933
7937
|
return source.slice(0, pattern.length) === pattern ? [[pattern], source.slice(pattern.length)] : global_1.undefined;
|
|
7934
|
-
}) : (0, combinator_1.
|
|
7938
|
+
}) : (0, combinator_1.creation)(source => {
|
|
7935
7939
|
if (source === '') return;
|
|
7936
7940
|
const m = source.match(pattern);
|
|
7937
7941
|
return m ? [[m[0]], source.slice(m[0].length)] : global_1.undefined;
|
|
@@ -7965,7 +7969,7 @@ exports.delimiter = /[\s\x00-\x7F]|\S#|[()、。!?][^\S\n]*(?=\\\n)/;
|
|
|
7965
7969
|
exports.nonWhitespace = /[\S\n]|$/;
|
|
7966
7970
|
exports.nonAlphanumeric = /[^0-9A-Za-z]|\S#|$/;
|
|
7967
7971
|
const repeat = (0, str_1.str)(/^(.)\1*/);
|
|
7968
|
-
exports.text = (0, combinator_1.
|
|
7972
|
+
exports.text = (0, combinator_1.creation)((source, context) => {
|
|
7969
7973
|
if (source === '') return;
|
|
7970
7974
|
const i = source.search(exports.delimiter);
|
|
7971
7975
|
|
|
@@ -8060,7 +8064,7 @@ const combinator_1 = __webpack_require__(2087);
|
|
|
8060
8064
|
|
|
8061
8065
|
const text_1 = __webpack_require__(7763);
|
|
8062
8066
|
|
|
8063
|
-
exports.unescsource = (0, combinator_1.
|
|
8067
|
+
exports.unescsource = (0, combinator_1.creation)(source => {
|
|
8064
8068
|
if (source === '') return;
|
|
8065
8069
|
const i = source.search(text_1.delimiter);
|
|
8066
8070
|
|