securemark 0.294.7 → 0.294.8
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/index.js +176 -194
- package/markdown.d.ts +13 -36
- package/package.json +1 -1
- package/src/combinator/control/constraint/block.ts +2 -2
- package/src/combinator/control/constraint/line.ts +7 -5
- package/src/combinator/control/manipulation/convert.ts +2 -1
- package/src/combinator/control/manipulation/fence.ts +4 -4
- package/src/combinator/control/manipulation/surround.ts +9 -9
- package/src/combinator/data/parser/some.ts +1 -1
- package/src/combinator/data/parser/union.ts +6 -2
- package/src/parser/api/bind.test.ts +0 -1
- package/src/parser/api/normalize.test.ts +5 -8
- package/src/parser/api/normalize.ts +4 -2
- package/src/parser/autolink.ts +1 -2
- package/src/parser/block/extension/fig.ts +4 -1
- package/src/parser/block/heading.ts +12 -2
- package/src/parser/block/reply/quote.ts +1 -2
- package/src/parser/block/ulist.ts +1 -1
- package/src/parser/block.ts +0 -4
- package/src/parser/header.ts +28 -40
- package/src/parser/inline/annotation.ts +2 -3
- package/src/parser/inline/autolink/account.ts +48 -17
- package/src/parser/inline/autolink/anchor.test.ts +0 -1
- package/src/parser/inline/autolink/anchor.ts +16 -15
- package/src/parser/inline/autolink/email.test.ts +1 -1
- package/src/parser/inline/autolink/email.ts +10 -11
- package/src/parser/inline/autolink/hashnum.ts +17 -13
- package/src/parser/inline/autolink/hashtag.ts +19 -15
- package/src/parser/inline/autolink/url.ts +24 -19
- package/src/parser/inline/autolink.ts +1 -2
- package/src/parser/inline/bracket.ts +14 -14
- package/src/parser/inline/deletion.ts +2 -1
- package/src/parser/inline/emphasis.ts +2 -1
- package/src/parser/inline/emstrong.ts +2 -1
- package/src/parser/inline/extension/index.ts +4 -4
- package/src/parser/inline/extension/indexer.ts +1 -1
- package/src/parser/inline/extension/label.ts +1 -1
- package/src/parser/inline/extension/placeholder.ts +4 -3
- package/src/parser/inline/html.ts +4 -4
- package/src/parser/inline/htmlentity.ts +2 -2
- package/src/parser/inline/insertion.ts +2 -1
- package/src/parser/inline/italic.ts +2 -1
- package/src/parser/inline/link.ts +7 -20
- package/src/parser/inline/mark.ts +2 -1
- package/src/parser/inline/math.ts +4 -2
- package/src/parser/inline/media.ts +24 -25
- package/src/parser/inline/reference.ts +4 -4
- package/src/parser/inline/remark.ts +2 -1
- package/src/parser/inline/ruby.ts +3 -4
- package/src/parser/inline/strong.ts +2 -1
- package/src/parser/inline/template.ts +10 -10
- package/src/parser/segment.ts +2 -2
- package/src/parser/source/escapable.ts +3 -4
- package/src/parser/source/line.ts +3 -1
- package/src/parser/source/text.ts +5 -10
- package/src/parser/source/unescapable.ts +2 -4
- package/src/parser/source.ts +1 -2
- package/src/parser/inline/autolink/channel.ts +0 -44
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! securemark v0.294.
|
|
1
|
+
/*! securemark v0.294.8 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"));
|
|
@@ -2585,7 +2585,7 @@ function block(parser, separation = true) {
|
|
|
2585
2585
|
if (position === source.length) return;
|
|
2586
2586
|
const result = parser(input);
|
|
2587
2587
|
if (result === undefined) return;
|
|
2588
|
-
if (separation && !(0, line_1.
|
|
2588
|
+
if (separation && !(0, line_1.isBlankline)(source, context.position)) return;
|
|
2589
2589
|
return context.position === source.length || source[context.position - 1] === '\n' ? result : undefined;
|
|
2590
2590
|
});
|
|
2591
2591
|
}
|
|
@@ -2653,7 +2653,7 @@ exports.verify = verify;
|
|
|
2653
2653
|
Object.defineProperty(exports, "__esModule", ({
|
|
2654
2654
|
value: true
|
|
2655
2655
|
}));
|
|
2656
|
-
exports.
|
|
2656
|
+
exports.isBlankline = exports.firstline = exports.line = void 0;
|
|
2657
2657
|
const parser_1 = __webpack_require__(605);
|
|
2658
2658
|
function line(parser) {
|
|
2659
2659
|
return (0, parser_1.failsafe)(({
|
|
@@ -2673,7 +2673,7 @@ function line(parser) {
|
|
|
2673
2673
|
context.source = source;
|
|
2674
2674
|
context.offset -= position;
|
|
2675
2675
|
if (result === undefined) return;
|
|
2676
|
-
if (
|
|
2676
|
+
if (context.position < position + line.length && !isBlankline(source, context.position)) return;
|
|
2677
2677
|
context.position = position + line.length;
|
|
2678
2678
|
return result;
|
|
2679
2679
|
});
|
|
@@ -2684,10 +2684,12 @@ function firstline(source, position) {
|
|
|
2684
2684
|
return i === -1 ? source.slice(position) : source.slice(position, i + 1);
|
|
2685
2685
|
}
|
|
2686
2686
|
exports.firstline = firstline;
|
|
2687
|
-
|
|
2688
|
-
|
|
2687
|
+
const blankline = /[^\S\n]*(?:$|\n)/y;
|
|
2688
|
+
function isBlankline(source, position) {
|
|
2689
|
+
blankline.lastIndex = position;
|
|
2690
|
+
return source.length === position || source[position] === '\n' || blankline.test(source);
|
|
2689
2691
|
}
|
|
2690
|
-
exports.
|
|
2692
|
+
exports.isBlankline = isBlankline;
|
|
2691
2693
|
|
|
2692
2694
|
/***/ },
|
|
2693
2695
|
|
|
@@ -2826,20 +2828,20 @@ function fence(opener, limit, separation = true) {
|
|
|
2826
2828
|
context.position += matches[0].length;
|
|
2827
2829
|
// Prevent annoying parsing in editing.
|
|
2828
2830
|
const secondline = (0, line_1.firstline)(source, context.position);
|
|
2829
|
-
if ((0, line_1.
|
|
2831
|
+
if ((0, line_1.isBlankline)(secondline, 0) && (0, line_1.firstline)(source, context.position + secondline.length).trimEnd() !== delim) return;
|
|
2830
2832
|
let block = '';
|
|
2831
2833
|
let closer = '';
|
|
2832
2834
|
let overflow = '';
|
|
2833
2835
|
for (let count = 1;; ++count) {
|
|
2834
2836
|
if (context.position === source.length) break;
|
|
2835
2837
|
const line = (0, line_1.firstline)(source, context.position);
|
|
2836
|
-
if ((closer || count > limit + 1) && (0, line_1.
|
|
2838
|
+
if ((closer || count > limit + 1) && (0, line_1.isBlankline)(line, 0)) break;
|
|
2837
2839
|
if (closer) {
|
|
2838
2840
|
overflow += line;
|
|
2839
2841
|
}
|
|
2840
2842
|
if (!closer && count <= limit + 1 && line.slice(0, delim.length) === delim && line.trimEnd() === delim) {
|
|
2841
2843
|
closer = line;
|
|
2842
|
-
if ((0, line_1.
|
|
2844
|
+
if ((0, line_1.isBlankline)(source, context.position + line.length)) {
|
|
2843
2845
|
context.position += line.length;
|
|
2844
2846
|
break;
|
|
2845
2847
|
}
|
|
@@ -3086,7 +3088,7 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
3086
3088
|
exports.setBacktrack = exports.isBacktrack = exports.close = exports.open = exports.surround = void 0;
|
|
3087
3089
|
const parser_1 = __webpack_require__(605);
|
|
3088
3090
|
const combinator_1 = __webpack_require__(3484);
|
|
3089
|
-
function surround(opener, parser, closer, optional = false,
|
|
3091
|
+
function surround(opener, parser, closer, optional = false, backtracks = [], f, g) {
|
|
3090
3092
|
switch (typeof opener) {
|
|
3091
3093
|
case 'string':
|
|
3092
3094
|
case 'object':
|
|
@@ -3149,11 +3151,11 @@ function surround(opener, parser, closer, optional = false, f, g, backtracks = [
|
|
|
3149
3151
|
}
|
|
3150
3152
|
exports.surround = surround;
|
|
3151
3153
|
function open(opener, parser, optional, backtracks) {
|
|
3152
|
-
return surround(opener, parser, '', optional,
|
|
3154
|
+
return surround(opener, parser, '', optional, backtracks);
|
|
3153
3155
|
}
|
|
3154
3156
|
exports.open = open;
|
|
3155
3157
|
function close(parser, closer, optional, backtracks) {
|
|
3156
|
-
return surround('', parser, closer, optional,
|
|
3158
|
+
return surround('', parser, closer, optional, backtracks);
|
|
3157
3159
|
}
|
|
3158
3160
|
exports.close = close;
|
|
3159
3161
|
const statesize = 2;
|
|
@@ -3943,7 +3945,7 @@ function some(parser, end, delimiters = [], limit = -1) {
|
|
|
3943
3945
|
context.delimiters.push(delims);
|
|
3944
3946
|
}
|
|
3945
3947
|
// whileは数倍遅い
|
|
3946
|
-
for (; context.position <
|
|
3948
|
+
for (const len = source.length; context.position < len;) {
|
|
3947
3949
|
if (match(input)) break;
|
|
3948
3950
|
if (context.delimiters?.match(input)) break;
|
|
3949
3951
|
const result = parser(input);
|
|
@@ -4016,7 +4018,7 @@ function union(parsers) {
|
|
|
4016
4018
|
case 1:
|
|
4017
4019
|
return parsers[0];
|
|
4018
4020
|
default:
|
|
4019
|
-
return eval(['input =>', parsers.map((_, i) => `||
|
|
4021
|
+
return eval(['((', parsers.map((_, i) => `parser${i},`).join(''), ') =>', 'input =>', parsers.map((_, i) => `|| parser${i}(input)`).join('').slice(2), ')'].join(''))(...parsers);
|
|
4020
4022
|
}
|
|
4021
4023
|
}
|
|
4022
4024
|
exports.union = union;
|
|
@@ -4395,7 +4397,11 @@ exports.normalize = normalize;
|
|
|
4395
4397
|
function format(source) {
|
|
4396
4398
|
return source.replace(/\r\n?/g, '\n');
|
|
4397
4399
|
}
|
|
4398
|
-
const invalid = new RegExp([/(?![\t\r\n])[\x00-\x1F\x7F]/g.source, /(?!\u200D)[\u2006\u200B-\u200F\u202A-\u202F\u2060\uFEFF]
|
|
4400
|
+
const invalid = new RegExp([/(?![\t\r\n])[\x00-\x1F\x7F]/g.source, /(?!\u200D)[\u2006\u200B-\u200F\u202A-\u202F\u2060\uFEFF]/g.source
|
|
4401
|
+
// 後読みが重い
|
|
4402
|
+
///(?<![\u1820\u1821])\u180E/g.source,
|
|
4403
|
+
///[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/g.source,
|
|
4404
|
+
].join('|'), 'g');
|
|
4399
4405
|
function sanitize(source) {
|
|
4400
4406
|
return source.replace(invalid, UNICODE_REPLACEMENT_CHARACTER);
|
|
4401
4407
|
}
|
|
@@ -4508,7 +4514,7 @@ exports.autolink = void 0;
|
|
|
4508
4514
|
const combinator_1 = __webpack_require__(3484);
|
|
4509
4515
|
const autolink_1 = __webpack_require__(8072);
|
|
4510
4516
|
const source_1 = __webpack_require__(8745);
|
|
4511
|
-
exports.autolink = (0, combinator_1.lazy)(() => (0, combinator_1.some)((0, combinator_1.union)([autolink_1.autolink, source_1.
|
|
4517
|
+
exports.autolink = (0, combinator_1.lazy)(() => (0, combinator_1.some)((0, combinator_1.union)([autolink_1.autolink, source_1.unescsource])));
|
|
4512
4518
|
|
|
4513
4519
|
/***/ },
|
|
4514
4520
|
|
|
@@ -4560,9 +4566,6 @@ exports.block = (0, combinator_1.reset)({
|
|
|
4560
4566
|
if (position === source.length) return;
|
|
4561
4567
|
const fst = source[position];
|
|
4562
4568
|
switch (fst) {
|
|
4563
|
-
case '\n':
|
|
4564
|
-
input.context.position = source.length;
|
|
4565
|
-
return new parser_1.List();
|
|
4566
4569
|
case '=':
|
|
4567
4570
|
if (source.startsWith('===', position)) return (0, pagebreak_1.pagebreak)(input);
|
|
4568
4571
|
break;
|
|
@@ -4923,9 +4926,14 @@ exports.segment = (0, combinator_1.block)((0, combinator_1.sequence)([(0, combin
|
|
|
4923
4926
|
exports.fig = (0, combinator_1.block)((0, combinator_1.rewrite)(exports.segment, (0, combinator_1.verify)((0, combinator_1.convert)((source, context) => {
|
|
4924
4927
|
// Bug: TypeScript
|
|
4925
4928
|
const fence = (/^[^\n]*\n!?>+ /.test(source) && source.match(/^~{3,}(?=[^\S\n]*$)/mg) || []).reduce((max, fence) => fence > max ? fence : max, '~~') + '~';
|
|
4926
|
-
|
|
4929
|
+
const {
|
|
4930
|
+
position
|
|
4931
|
+
} = context;
|
|
4932
|
+
const result = parser({
|
|
4927
4933
|
context
|
|
4928
|
-
})
|
|
4934
|
+
});
|
|
4935
|
+
context.position = position;
|
|
4936
|
+
return result ? `${fence}figure ${source.replace(/^(.+\n.+\n)([\S\s]+?)\n?$/, '$1\n$2')}\n${fence}` : `${fence}figure ${source}\n\n${fence}`;
|
|
4929
4937
|
}, (0, combinator_1.union)([figure_1.figure]), false), ([{
|
|
4930
4938
|
value: el
|
|
4931
4939
|
}]) => el.tagName === 'FIGURE')));
|
|
@@ -5420,11 +5428,21 @@ const source_1 = __webpack_require__(8745);
|
|
|
5420
5428
|
const visibility_1 = __webpack_require__(6364);
|
|
5421
5429
|
const util_1 = __webpack_require__(4992);
|
|
5422
5430
|
const dom_1 = __webpack_require__(394);
|
|
5423
|
-
exports.segment = (0, combinator_1.block)((0, combinator_1.focus)(/#+ +\S[^\n]*(?:\n#+(?=$|[ \n])[^\n]*)*(?:$|\n)/y,
|
|
5424
|
-
|
|
5431
|
+
exports.segment = (0, combinator_1.block)((0, combinator_1.focus)(/#+ +\S[^\n]*(?:\n#+(?=$|[ \n])[^\n]*)*(?:$|\n)/y, input => {
|
|
5432
|
+
const {
|
|
5433
|
+
context
|
|
5434
|
+
} = input;
|
|
5435
|
+
const {
|
|
5425
5436
|
source
|
|
5437
|
+
} = context;
|
|
5438
|
+
const acc = new parser_1.List();
|
|
5439
|
+
for (; context.position < source.length;) {
|
|
5440
|
+
const line = (0, combinator_1.firstline)(source, context.position);
|
|
5441
|
+
acc.push(new parser_1.Data(line));
|
|
5442
|
+
context.position += line.length;
|
|
5426
5443
|
}
|
|
5427
|
-
|
|
5444
|
+
return acc;
|
|
5445
|
+
}));
|
|
5428
5446
|
exports.heading = (0, combinator_1.block)((0, combinator_1.rewrite)(exports.segment,
|
|
5429
5447
|
// その他の表示制御は各所のCSSで行う。
|
|
5430
5448
|
(0, combinator_1.state)(128 /* State.annotation */ | 64 /* State.reference */ | 32 /* State.index */ | 16 /* State.label */ | 8 /* State.link */, (0, combinator_1.line)((0, inline_1.indexee)((0, combinator_1.fmap)((0, combinator_1.union)([(0, combinator_1.open)((0, source_1.str)(/##+/y), (0, visibility_1.visualize)((0, visibility_1.trimBlank)((0, combinator_1.some)((0, combinator_1.union)([inline_1.indexer, inline_1.inline])))), true), (0, combinator_1.open)((0, source_1.str)('#'), (0, combinator_1.state)(251 /* State.linkers */, (0, visibility_1.visualize)((0, visibility_1.trimBlank)((0, combinator_1.some)((0, combinator_1.union)([inline_1.indexer, inline_1.inline]))))), true)]), (nodes, context) => {
|
|
@@ -5811,7 +5829,7 @@ exports.quote = (0, combinator_1.lazy)(() => (0, combinator_1.block)((0, combina
|
|
|
5811
5829
|
// TODO: インデント数を渡してインデント数前の行頭確認を行う実装に置き換える
|
|
5812
5830
|
source => source.replace(/(?<=^>+ )/mg, '\r'), (0, combinator_1.some)((0, combinator_1.union)([
|
|
5813
5831
|
// quote補助関数が残した数式をパースする。
|
|
5814
|
-
math_1.math, autolink_1.autolink, source_1.
|
|
5832
|
+
math_1.math, autolink_1.autolink, source_1.unescsource])), false)), (ns, {
|
|
5815
5833
|
source,
|
|
5816
5834
|
position
|
|
5817
5835
|
}) => new parser_1.List([new parser_1.Data(source[position - 1] === '\n' ? ns.pop().value : (0, dom_1.html)('br')), new parser_1.Data((0, dom_1.html)('span', {
|
|
@@ -5924,7 +5942,7 @@ const inline_1 = __webpack_require__(7973);
|
|
|
5924
5942
|
const visibility_1 = __webpack_require__(6364);
|
|
5925
5943
|
const util_1 = __webpack_require__(4992);
|
|
5926
5944
|
const dom_1 = __webpack_require__(394);
|
|
5927
|
-
exports.ulist = (0, combinator_1.lazy)(() => (0, combinator_1.block)((0, combinator_1.validate)(
|
|
5945
|
+
exports.ulist = (0, combinator_1.lazy)(() => (0, combinator_1.block)((0, combinator_1.validate)('- ', exports.ulist_)));
|
|
5928
5946
|
exports.ulist_ = (0, combinator_1.lazy)(() => (0, combinator_1.block)((0, combinator_1.fmap)((0, combinator_1.validate)(/-(?=$|[ \n])/y, (0, combinator_1.some)((0, combinator_1.recursion)(3 /* Recursion.listitem */, (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)(/-(?:$|[ \n])/y, (0, combinator_1.subsequence)([exports.checkbox, (0, visibility_1.visualize)((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_]))]), ilist_1.ilistitem), ns => new parser_1.List([new parser_1.Data((0, dom_1.html)('li', {
|
|
5929
5947
|
'data-index': (0, inline_1.dataindex)(ns)
|
|
5930
5948
|
}, (0, dom_1.defrag)((0, util_1.unwrap)(fillFirstLine(ns)))))])))])))), ns => new parser_1.List([new parser_1.Data(format((0, dom_1.html)('ul', (0, util_1.unwrap)(ns))))]))));
|
|
@@ -5967,24 +5985,11 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
5967
5985
|
exports.header = void 0;
|
|
5968
5986
|
const parser_1 = __webpack_require__(605);
|
|
5969
5987
|
const combinator_1 = __webpack_require__(3484);
|
|
5970
|
-
const segment_1 = __webpack_require__(3967);
|
|
5971
5988
|
const source_1 = __webpack_require__(8745);
|
|
5972
5989
|
const util_1 = __webpack_require__(4992);
|
|
5973
5990
|
const normalize_1 = __webpack_require__(4490);
|
|
5974
5991
|
const dom_1 = __webpack_require__(394);
|
|
5975
|
-
exports.header = (0, combinator_1.lazy)(() => (0, combinator_1.validate)(/---+ *\r?\n(?=\S)/y, (0, combinator_1.inits)([(0, combinator_1.
|
|
5976
|
-
context
|
|
5977
|
-
}) => {
|
|
5978
|
-
const {
|
|
5979
|
-
source
|
|
5980
|
-
} = context;
|
|
5981
|
-
if (context.header ?? true) {
|
|
5982
|
-
context.position += (0, segment_1.segment)(source).next().value.length;
|
|
5983
|
-
} else {
|
|
5984
|
-
context.position = source.length;
|
|
5985
|
-
}
|
|
5986
|
-
return new parser_1.List();
|
|
5987
|
-
}, (0, combinator_1.block)((0, combinator_1.union)([(0, combinator_1.validate)(({
|
|
5992
|
+
exports.header = (0, combinator_1.lazy)(() => (0, combinator_1.validate)(/---+ *\r?\n(?=\S)/y, (0, combinator_1.inits)([(0, combinator_1.block)((0, combinator_1.union)([(0, combinator_1.validate)(({
|
|
5988
5993
|
context
|
|
5989
5994
|
}) => context.header ?? true, (0, combinator_1.focus)(/(---+) *\r?\n(?:[A-Za-z][0-9A-Za-z]*(?:-[0-9A-Za-z]+)*:[ \t]+\S[^\r\n]*\r?\n){1,100}\1 *(?:$|\r?\n)/y, (0, combinator_1.convert)(source => (0, normalize_1.normalize)(source.slice(source.indexOf('\n') + 1, source.trimEnd().lastIndexOf('\n'))).replace(/(\S)\s+$/mg, '$1'), (0, combinator_1.fmap)((0, combinator_1.some)((0, combinator_1.union)([field])), ns => new parser_1.List([new parser_1.Data((0, dom_1.html)('aside', {
|
|
5990
5995
|
class: 'header'
|
|
@@ -6003,7 +6008,7 @@ exports.header = (0, combinator_1.lazy)(() => (0, combinator_1.validate)(/---+ *
|
|
|
6003
6008
|
translate: 'no',
|
|
6004
6009
|
...(0, util_1.invalid)('header', 'syntax', 'Invalid syntax')
|
|
6005
6010
|
}, (0, normalize_1.normalize)(source.slice(position))))]);
|
|
6006
|
-
}]))
|
|
6011
|
+
}])), (0, combinator_1.clear)((0, source_1.str)(/ *\r?\n/y))])));
|
|
6007
6012
|
const field = (0, combinator_1.line)(({
|
|
6008
6013
|
context: {
|
|
6009
6014
|
source,
|
|
@@ -6185,9 +6190,9 @@ const inline_1 = __webpack_require__(7973);
|
|
|
6185
6190
|
const visibility_1 = __webpack_require__(6364);
|
|
6186
6191
|
const util_1 = __webpack_require__(4992);
|
|
6187
6192
|
const dom_1 = __webpack_require__(394);
|
|
6188
|
-
exports.annotation = (0, combinator_1.lazy)(() => (0, combinator_1.constraint)(128 /* State.annotation */, (0, combinator_1.surround)('((', (0, combinator_1.precedence)(1, (0, combinator_1.state)(128 /* State.annotation */, (0, visibility_1.trimBlankStart)((0, combinator_1.some)((0, combinator_1.union)([inline_1.inline]), ')', [[')', 1]])))), '))', false, ([, ns], context) => context.linebreak === 0 ? new parser_1.List([new parser_1.Data((0, dom_1.html)('sup', {
|
|
6193
|
+
exports.annotation = (0, combinator_1.lazy)(() => (0, combinator_1.constraint)(128 /* State.annotation */, (0, combinator_1.surround)('((', (0, combinator_1.precedence)(1, (0, combinator_1.state)(128 /* State.annotation */, (0, visibility_1.trimBlankStart)((0, combinator_1.some)((0, combinator_1.union)([inline_1.inline]), ')', [[')', 1]])))), '))', false, [1 | 64 /* Backtrack.bracket */, 3 | 32 /* Backtrack.doublebracket */], ([, ns], context) => context.linebreak === 0 ? new parser_1.List([new parser_1.Data((0, dom_1.html)('sup', {
|
|
6189
6194
|
class: 'annotation'
|
|
6190
|
-
}, [(0, dom_1.html)('span', (0, dom_1.defrag)((0, util_1.unwrap)((0, visibility_1.trimBlankNodeEnd)(ns))))]))]) : undefined
|
|
6195
|
+
}, [(0, dom_1.html)('span', (0, dom_1.defrag)((0, util_1.unwrap)((0, visibility_1.trimBlankNodeEnd)(ns))))]))]) : undefined)));
|
|
6191
6196
|
|
|
6192
6197
|
/***/ },
|
|
6193
6198
|
|
|
@@ -6204,7 +6209,6 @@ exports.autolink = void 0;
|
|
|
6204
6209
|
const combinator_1 = __webpack_require__(3484);
|
|
6205
6210
|
const url_1 = __webpack_require__(2129);
|
|
6206
6211
|
const email_1 = __webpack_require__(5836);
|
|
6207
|
-
const channel_1 = __webpack_require__(4639);
|
|
6208
6212
|
const account_1 = __webpack_require__(4107);
|
|
6209
6213
|
const hashtag_1 = __webpack_require__(5764);
|
|
6210
6214
|
const hashnum_1 = __webpack_require__(8684);
|
|
@@ -6221,7 +6225,7 @@ exports.autolink = (0, combinator_1.lazy)(() => (0, combinator_1.state)(~1 /* St
|
|
|
6221
6225
|
const fst = source[position];
|
|
6222
6226
|
switch (fst) {
|
|
6223
6227
|
case '@':
|
|
6224
|
-
return (0,
|
|
6228
|
+
return (0, account_1.account)(input);
|
|
6225
6229
|
case '#':
|
|
6226
6230
|
return (0, hashtag_1.hashtag)(input) || (0, hashnum_1.hashnum)(input);
|
|
6227
6231
|
case '>':
|
|
@@ -6264,13 +6268,37 @@ exports.account = void 0;
|
|
|
6264
6268
|
const parser_1 = __webpack_require__(605);
|
|
6265
6269
|
const combinator_1 = __webpack_require__(3484);
|
|
6266
6270
|
const link_1 = __webpack_require__(3628);
|
|
6271
|
+
const hashtag_1 = __webpack_require__(5764);
|
|
6272
|
+
const source_1 = __webpack_require__(8745);
|
|
6267
6273
|
const dom_1 = __webpack_require__(394);
|
|
6268
6274
|
// https://example/@user must be a user page or a redirect page going there.
|
|
6269
|
-
|
|
6275
|
+
// https://example/@user?ch=a+b must be a user channel page or a redirect page going there.
|
|
6276
|
+
exports.account = (0, combinator_1.lazy)(() => (0, combinator_1.constraint)(1 /* State.autolink */, (0, combinator_1.state)(1 /* State.autolink */, (0, combinator_1.surround)((0, combinator_1.surround)(/(?<![0-9a-z])@/yi, (0, source_1.str)(/[0-9a-z](?:[.-](?=[0-9a-z])|[0-9a-z]){0,254}\/|/yi), (0, source_1.str)(/[a-z][0-9a-z]*(?:[-.][0-9a-z]+)*(?![-.]?[0-9a-z@]|>>|:\S)/yi)), (0, combinator_1.some)((0, combinator_1.surround)('#', (0, combinator_1.verify)((0, source_1.str)(new RegExp([/(?!['_])(?:[^\p{C}\p{S}\p{P}\s]|emoji|'(?=[0-9A-Za-z])|_(?=[^\p{C}\p{S}\p{P}\s]|emoji))+/yu.source].join('|').replace(/emoji/g, hashtag_1.emoji.source), 'yu')), ([{
|
|
6270
6277
|
value
|
|
6271
|
-
}]) => new
|
|
6272
|
-
|
|
6273
|
-
}
|
|
6278
|
+
}]) => /^[0-9]{0,4}[^0-9]/.test(value)), new RegExp([/(?![0-9a-z@]|>>|:\S|[^\p{C}\p{S}\p{P}\s]|emoji)/yu.source].join('|').replace(/emoji/g, hashtag_1.emoji.source), 'yu'), false, [3 | 0 /* Backtrack.autolink */])), '', false, [3 | 0 /* Backtrack.autolink */], ([[{
|
|
6279
|
+
value: host
|
|
6280
|
+
}, {
|
|
6281
|
+
value: account
|
|
6282
|
+
}], nodes], context) => {
|
|
6283
|
+
const hashes = nodes.foldl((acc, {
|
|
6284
|
+
value
|
|
6285
|
+
}) => acc + '#' + value, '');
|
|
6286
|
+
const param = nodes.foldl((acc, {
|
|
6287
|
+
value
|
|
6288
|
+
}) => acc ? acc + '+' + value : value, '');
|
|
6289
|
+
return new parser_1.List([new parser_1.Data((0, dom_1.define)((0, link_1.parse)(new parser_1.List([new parser_1.Data(`@${host}${account}${hashes}`)]), new parser_1.List([new parser_1.Data(host ? `https://${host}@${account}?ch=${param}` : `/@${account}?ch=${param}`)]), context), {
|
|
6290
|
+
class: 'channel'
|
|
6291
|
+
}))]);
|
|
6292
|
+
}, ([[{
|
|
6293
|
+
value: host
|
|
6294
|
+
}, {
|
|
6295
|
+
value: account
|
|
6296
|
+
}]], context) => {
|
|
6297
|
+
if (context.source[context.position] === '#') return;
|
|
6298
|
+
return new parser_1.List([new parser_1.Data((0, dom_1.define)((0, link_1.parse)(new parser_1.List([new parser_1.Data(`@${host}${account}`)]), new parser_1.List([new parser_1.Data(host ? `https://${host}@${account}` : `/@${account}`)]), context), {
|
|
6299
|
+
class: 'account'
|
|
6300
|
+
}))]);
|
|
6301
|
+
}))));
|
|
6274
6302
|
|
|
6275
6303
|
/***/ },
|
|
6276
6304
|
|
|
@@ -6287,6 +6315,7 @@ exports.anchor = void 0;
|
|
|
6287
6315
|
const parser_1 = __webpack_require__(605);
|
|
6288
6316
|
const combinator_1 = __webpack_require__(3484);
|
|
6289
6317
|
const link_1 = __webpack_require__(3628);
|
|
6318
|
+
const source_1 = __webpack_require__(8745);
|
|
6290
6319
|
const dom_1 = __webpack_require__(394);
|
|
6291
6320
|
// Timeline(pseudonym): user/tid
|
|
6292
6321
|
// Thread(anonymous): cid
|
|
@@ -6295,47 +6324,11 @@ const dom_1 = __webpack_require__(394);
|
|
|
6295
6324
|
// cid: YYYY-MMDD-HHMM-SSmmm
|
|
6296
6325
|
// 内部表現はUnixTimeに統一する(時系列順)
|
|
6297
6326
|
// 外部表現は投稿ごとに投稿者の投稿時のタイムゾーンに統一する(非時系列順)
|
|
6298
|
-
exports.anchor = (0, combinator_1.lazy)(() => (0, combinator_1.
|
|
6327
|
+
exports.anchor = (0, combinator_1.lazy)(() => (0, combinator_1.constraint)(1 /* State.autolink */, (0, combinator_1.state)(1 /* State.autolink */, (0, combinator_1.surround)(/(?<![0-9a-z])>>/yi, (0, source_1.str)(/[0-9a-z]+(?:-[0-9a-z]+)*(?!-?[0-9a-z@#]|>>|:\S)/yi), '', false, [3 | 0 /* Backtrack.autolink */], ([, [{
|
|
6299
6328
|
value
|
|
6300
|
-
}]) => new parser_1.List([new parser_1.Data((0, dom_1.define)(value, {
|
|
6329
|
+
}]], context) => new parser_1.List([new parser_1.Data((0, dom_1.define)((0, link_1.parse)(new parser_1.List([new parser_1.Data(`>>${value}`)]), new parser_1.List([new parser_1.Data(`?at=${value}`)]), context), {
|
|
6301
6330
|
class: 'anchor'
|
|
6302
|
-
}))])))))
|
|
6303
|
-
|
|
6304
|
-
/***/ },
|
|
6305
|
-
|
|
6306
|
-
/***/ 4639
|
|
6307
|
-
(__unused_webpack_module, exports, __webpack_require__) {
|
|
6308
|
-
|
|
6309
|
-
"use strict";
|
|
6310
|
-
|
|
6311
|
-
|
|
6312
|
-
Object.defineProperty(exports, "__esModule", ({
|
|
6313
|
-
value: true
|
|
6314
|
-
}));
|
|
6315
|
-
exports.channel = void 0;
|
|
6316
|
-
const parser_1 = __webpack_require__(605);
|
|
6317
|
-
const combinator_1 = __webpack_require__(3484);
|
|
6318
|
-
const link_1 = __webpack_require__(3628);
|
|
6319
|
-
const hashtag_1 = __webpack_require__(5764);
|
|
6320
|
-
const source_1 = __webpack_require__(8745);
|
|
6321
|
-
const dom_1 = __webpack_require__(394);
|
|
6322
|
-
// https://example/@user?ch=a+b must be a user channel page or a redirect page going there.
|
|
6323
|
-
exports.channel = (0, combinator_1.lazy)(() => (0, combinator_1.rewrite)((0, combinator_1.sequence)([(0, combinator_1.surround)(/(?<![0-9a-z])@/yi, /[0-9a-z](?:(?:[0-9a-z]|-(?=[0-9a-z])){0,61}[0-9a-z])?(?:\.[0-9a-z](?:(?:[0-9a-z]|-(?=[0-9a-z])){0,61}[0-9a-z])?)*\//yi, /[a-z][0-9a-z]*(?:[-.][0-9a-z]+)*(?![-.]?[0-9a-z@]|>>|:\S)/yi, true, undefined, undefined, [3 | 0 /* Backtrack.autolink */]), (0, combinator_1.some)((0, combinator_1.verify)((0, combinator_1.surround)('#', (0, source_1.str)(new RegExp([/(?!['_])(?:[^\p{C}\p{S}\p{P}\s]|emoji|'(?=[0-9A-Za-z])|_(?=[^\p{C}\p{S}\p{P}\s]|emoji))+/yu.source].join('|').replace(/emoji/g, hashtag_1.emoji.source), 'yu')), new RegExp([/(?![0-9a-z@]|>>|:\S|[^\p{C}\p{S}\p{P}\s]|emoji)/yu.source].join('|').replace(/emoji/g, hashtag_1.emoji.source), 'yu'), false, undefined, undefined, [3 | 0 /* Backtrack.autolink */]), ([{
|
|
6324
|
-
value
|
|
6325
|
-
}]) => !/^[0-9]{1,4}$|^[0-9]{5}/.test(value)))]), (0, combinator_1.constraint)(1 /* State.autolink */, (0, combinator_1.state)(1 /* State.autolink */, (0, combinator_1.fmap)((0, combinator_1.convert)(source => `[${source}]{ ${source.includes('/') ? `https://${source.slice(1, source.indexOf('#')).replace('/', '/@')}` : `/${source.slice(0, source.indexOf('#'))}`} }`, (0, combinator_1.union)([link_1.unsafelink]), false), ([{
|
|
6326
|
-
value: el
|
|
6327
|
-
}], {
|
|
6328
|
-
source,
|
|
6329
|
-
position,
|
|
6330
|
-
range = 0
|
|
6331
|
-
}) => {
|
|
6332
|
-
const src = source.slice(position - range, position);
|
|
6333
|
-
const url = `${el.getAttribute('href')}?ch=${src.slice(src.indexOf('#') + 1).replace(/#/g, '+')}`;
|
|
6334
|
-
return new parser_1.List([new parser_1.Data((0, dom_1.define)(el, {
|
|
6335
|
-
class: 'channel',
|
|
6336
|
-
href: url
|
|
6337
|
-
}, src))]);
|
|
6338
|
-
})))));
|
|
6331
|
+
}))])))));
|
|
6339
6332
|
|
|
6340
6333
|
/***/ },
|
|
6341
6334
|
|
|
@@ -6354,16 +6347,14 @@ const combinator_1 = __webpack_require__(3484);
|
|
|
6354
6347
|
const source_1 = __webpack_require__(8745);
|
|
6355
6348
|
const dom_1 = __webpack_require__(394);
|
|
6356
6349
|
// https://html.spec.whatwg.org/multipage/input.html
|
|
6357
|
-
exports.email = (0, combinator_1.
|
|
6350
|
+
exports.email = (0, combinator_1.constraint)(1 /* State.autolink */, (0, combinator_1.state)(1 /* State.autolink */, (0, combinator_1.surround)(/(?<![0-9a-z][_.+-]?|[@#])(?=[0-9a-z])/yi, (0, combinator_1.verify)((0, source_1.str)(/[0-9a-z](?:[_.+-](?=[0-9a-z])|[0-9a-z]){0,63}@[0-9a-z](?:[.-](?=[0-9a-z])|[0-9a-z]){0,254}(?![.-]?[0-9a-z@#]|>>|:\S)/yi), ([{
|
|
6358
6351
|
value
|
|
6359
|
-
}]) => value.length <=
|
|
6360
|
-
|
|
6361
|
-
|
|
6362
|
-
}
|
|
6363
|
-
}) => new parser_1.List([new parser_1.Data((0, dom_1.html)('a', {
|
|
6352
|
+
}]) => value.length <= 254), '', false, [3 | 0 /* Backtrack.autolink */], ([, [{
|
|
6353
|
+
value
|
|
6354
|
+
}]]) => new parser_1.List([new parser_1.Data((0, dom_1.html)('a', {
|
|
6364
6355
|
class: 'email',
|
|
6365
|
-
href: `mailto:${
|
|
6366
|
-
},
|
|
6356
|
+
href: `mailto:${value}`
|
|
6357
|
+
}, value))]))));
|
|
6367
6358
|
|
|
6368
6359
|
/***/ },
|
|
6369
6360
|
|
|
@@ -6381,13 +6372,14 @@ const parser_1 = __webpack_require__(605);
|
|
|
6381
6372
|
const combinator_1 = __webpack_require__(3484);
|
|
6382
6373
|
const link_1 = __webpack_require__(3628);
|
|
6383
6374
|
const hashtag_1 = __webpack_require__(5764);
|
|
6375
|
+
const source_1 = __webpack_require__(8745);
|
|
6384
6376
|
const dom_1 = __webpack_require__(394);
|
|
6385
|
-
exports.hashnum = (0, combinator_1.lazy)(() => (0, combinator_1.
|
|
6377
|
+
exports.hashnum = (0, combinator_1.lazy)(() => (0, combinator_1.constraint)(1 /* State.autolink */, (0, combinator_1.state)(1 /* State.autolink */, (0, combinator_1.surround)(new RegExp([/(?<![^\p{C}\p{S}\p{P}\s]|emoji)#/yu.source].join('|').replace(/emoji/g, hashtag_1.emoji.source), 'yu'), (0, source_1.str)(new RegExp([/[0-9]{1,9}(?![0-9a-z@#]|>>|:\S|[^\p{C}\p{S}\p{P}\s]|emoji)/yu.source].join('|').replace(/emoji/g, hashtag_1.emoji.source), 'yu')), '', false, [1 | 0 /* Backtrack.autolink */], ([, [{
|
|
6386
6378
|
value
|
|
6387
|
-
}]) => new parser_1.List([new parser_1.Data((0, dom_1.define)(value, {
|
|
6379
|
+
}]], context) => new parser_1.List([new parser_1.Data((0, dom_1.define)((0, link_1.parse)(new parser_1.List([new parser_1.Data(`#${value}`)]), new parser_1.List([new parser_1.Data(value)]), context), {
|
|
6388
6380
|
class: 'hashnum',
|
|
6389
6381
|
href: null
|
|
6390
|
-
}))])))))
|
|
6382
|
+
}))])))));
|
|
6391
6383
|
|
|
6392
6384
|
/***/ },
|
|
6393
6385
|
|
|
@@ -6409,13 +6401,13 @@ const dom_1 = __webpack_require__(394);
|
|
|
6409
6401
|
// https://example/hashtags/a must be a hashtag page or a redirect page going there.
|
|
6410
6402
|
// https://github.com/tc39/proposal-regexp-unicode-property-escapes#matching-emoji
|
|
6411
6403
|
exports.emoji = /\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F|\u200D/u;
|
|
6412
|
-
exports.hashtag = (0, combinator_1.lazy)(() => (0, combinator_1.
|
|
6404
|
+
exports.hashtag = (0, combinator_1.lazy)(() => (0, combinator_1.constraint)(1 /* State.autolink */, (0, combinator_1.state)(1 /* State.autolink */, (0, combinator_1.surround)(new RegExp([/(?<![^\p{C}\p{S}\p{P}\s]|emoji)#/yu.source].join('|').replace(/emoji/g, exports.emoji.source), 'yu'), (0, combinator_1.verify)((0, source_1.str)(new RegExp([/(?!['_])(?:[^\p{C}\p{S}\p{P}\s]|emoji|'(?=[0-9A-Za-z])|_(?=[^\p{C}\p{S}\p{P}\s]|emoji))+/yu.source].join('|').replace(/emoji/g, exports.emoji.source), 'yu')), ([{
|
|
6413
6405
|
value
|
|
6414
|
-
}]) =>
|
|
6406
|
+
}]) => /^[0-9]{0,4}[^0-9]/.test(value)), new RegExp([/(?![0-9a-z@#]|>>|:\S|[^\p{C}\p{S}\p{P}\s]|emoji)/yu.source].join('|').replace(/emoji/g, exports.emoji.source), 'yu'), false, [3 | 0 /* Backtrack.autolink */], ([, [{
|
|
6415
6407
|
value
|
|
6416
|
-
}]) => new parser_1.List([new parser_1.Data((0, dom_1.define)(value, {
|
|
6408
|
+
}]], context) => new parser_1.List([new parser_1.Data((0, dom_1.define)((0, link_1.parse)(new parser_1.List([new parser_1.Data(`#${value}`)]), new parser_1.List([new parser_1.Data(`/hashtags/${value}`)]), context), {
|
|
6417
6409
|
class: 'hashtag'
|
|
6418
|
-
}))])))))
|
|
6410
|
+
}))])))));
|
|
6419
6411
|
|
|
6420
6412
|
/***/ },
|
|
6421
6413
|
|
|
@@ -6434,9 +6426,21 @@ const combinator_1 = __webpack_require__(3484);
|
|
|
6434
6426
|
const inline_1 = __webpack_require__(7973);
|
|
6435
6427
|
const link_1 = __webpack_require__(3628);
|
|
6436
6428
|
const source_1 = __webpack_require__(8745);
|
|
6437
|
-
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 */, (
|
|
6438
|
-
|
|
6439
|
-
|
|
6429
|
+
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 */, ({
|
|
6430
|
+
context
|
|
6431
|
+
}) => new parser_1.List([new parser_1.Data((0, link_1.parse)(new parser_1.List(), new parser_1.List([new parser_1.Data(context.source)]), context))]))), (0, combinator_1.open)((0, source_1.str)(/[^:]+/y), (0, combinator_1.some)(inline_1.inline))])));
|
|
6432
|
+
exports.lineurl = (0, combinator_1.lazy)(() => (0, combinator_1.focus)(/(?<=^|[\r\n])!?https?:\/\/\S+(?=[^\S\n]*(?=$|\n))/y, (0, combinator_1.tails)([(0, source_1.str)('!'), (0, combinator_1.union)([(0, combinator_1.constraint)(1 /* State.autolink */, (0, combinator_1.state)(1 /* State.autolink */, ({
|
|
6433
|
+
context
|
|
6434
|
+
}) => {
|
|
6435
|
+
const {
|
|
6436
|
+
source,
|
|
6437
|
+
position
|
|
6438
|
+
} = context;
|
|
6439
|
+
context.position -= source[0] === '!' ? 1 : 0;
|
|
6440
|
+
context.position += source.length;
|
|
6441
|
+
return new parser_1.List([new parser_1.Data((0, link_1.parse)(new parser_1.List(), new parser_1.List([new parser_1.Data(source.slice(position))]), context))]);
|
|
6442
|
+
})), (0, combinator_1.open)((0, source_1.str)(/[^:]+/y), (0, combinator_1.some)(inline_1.inline))])])));
|
|
6443
|
+
const bracket = (0, combinator_1.lazy)(() => (0, combinator_1.union)([(0, combinator_1.surround)((0, source_1.str)('('), (0, combinator_1.recursion)(6 /* Recursion.terminal */, (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.unescsource]), ')')), (0, source_1.str)(')'), true, [3 | 0 /* Backtrack.autolink */], undefined, () => new parser_1.List()), (0, combinator_1.surround)((0, source_1.str)('['), (0, combinator_1.recursion)(6 /* Recursion.terminal */, (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.unescsource]), ']')), (0, source_1.str)(']'), true, [3 | 0 /* Backtrack.autolink */], undefined, () => new parser_1.List()), (0, combinator_1.surround)((0, source_1.str)('{'), (0, combinator_1.recursion)(6 /* Recursion.terminal */, (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.unescsource]), '}')), (0, source_1.str)('}'), true, [3 | 0 /* Backtrack.autolink */], undefined, () => new parser_1.List()), (0, combinator_1.surround)((0, source_1.str)('"'), (0, combinator_1.precedence)(2, (0, combinator_1.recursion)(6 /* Recursion.terminal */, (0, combinator_1.some)(source_1.unescsource, '"'))), (0, source_1.str)('"'), true, [3 | 0 /* Backtrack.autolink */], undefined, () => new parser_1.List())]));
|
|
6440
6444
|
|
|
6441
6445
|
/***/ },
|
|
6442
6446
|
|
|
@@ -6483,7 +6487,7 @@ exports.bracket = (0, combinator_1.lazy)(() => (0, combinator_1.union)([input =>
|
|
|
6483
6487
|
return d1(input);
|
|
6484
6488
|
}
|
|
6485
6489
|
}]));
|
|
6486
|
-
const p1 = (0, combinator_1.lazy)(() => (0, combinator_1.surround)((0, source_1.str)('('), (0, combinator_1.precedence)(1, (0, combinator_1.recursion)(5 /* Recursion.bracket */, (0, combinator_1.some)(inline_1.inline, ')', [[')', 1]]))), (0, source_1.str)(')'), true, ([as, bs = new parser_1.List(), cs], {
|
|
6490
|
+
const p1 = (0, combinator_1.lazy)(() => (0, combinator_1.surround)((0, source_1.str)('('), (0, combinator_1.precedence)(1, (0, combinator_1.recursion)(5 /* Recursion.bracket */, (0, combinator_1.some)(inline_1.inline, ')', [[')', 1]]))), (0, source_1.str)(')'), true, [2 | 64 /* Backtrack.bracket */], ([as, bs = new parser_1.List(), cs], {
|
|
6487
6491
|
source,
|
|
6488
6492
|
position,
|
|
6489
6493
|
range = 0
|
|
@@ -6492,8 +6496,8 @@ const p1 = (0, combinator_1.lazy)(() => (0, combinator_1.surround)((0, source_1.
|
|
|
6492
6496
|
return indexA.test(str) ? new parser_1.List([new parser_1.Data(as.head.value), new parser_1.Data(str), new parser_1.Data(cs.head.value)]) : new parser_1.List([new parser_1.Data((0, dom_1.html)('span', {
|
|
6493
6497
|
class: 'paren'
|
|
6494
6498
|
}, (0, dom_1.defrag)((0, util_1.unwrap)(as.import(bs).import(cs)))))]);
|
|
6495
|
-
}, ([as, bs = new parser_1.List()]) => as.import(bs)
|
|
6496
|
-
const p2 = (0, combinator_1.lazy)(() => (0, combinator_1.surround)((0, source_1.str)('('), (0, combinator_1.precedence)(1, (0, combinator_1.recursion)(5 /* Recursion.bracket */, (0, combinator_1.some)(inline_1.inline, ')', [[')', 1]]))), (0, source_1.str)(')'), true, ([as, bs = [], cs], {
|
|
6499
|
+
}, ([as, bs = new parser_1.List()]) => as.import(bs)));
|
|
6500
|
+
const p2 = (0, combinator_1.lazy)(() => (0, combinator_1.surround)((0, source_1.str)('('), (0, combinator_1.precedence)(1, (0, combinator_1.recursion)(5 /* Recursion.bracket */, (0, combinator_1.some)(inline_1.inline, ')', [[')', 1]]))), (0, source_1.str)(')'), true, [2 | 64 /* Backtrack.bracket */], ([as, bs = [], cs], {
|
|
6497
6501
|
source,
|
|
6498
6502
|
position,
|
|
6499
6503
|
range = 0
|
|
@@ -6502,8 +6506,8 @@ const p2 = (0, combinator_1.lazy)(() => (0, combinator_1.surround)((0, source_1.
|
|
|
6502
6506
|
return indexF.test(str) ? new parser_1.List([new parser_1.Data(as.head.value), new parser_1.Data(str), new parser_1.Data(cs.head.value)]) : new parser_1.List([new parser_1.Data((0, dom_1.html)('span', {
|
|
6503
6507
|
class: 'paren'
|
|
6504
6508
|
}, (0, dom_1.defrag)((0, util_1.unwrap)(as.import(bs).import(cs)))))]);
|
|
6505
|
-
}, ([as, bs = new parser_1.List()]) => as.import(bs)
|
|
6506
|
-
const s1 = (0, combinator_1.lazy)(() => (0, combinator_1.surround)((0, source_1.str)('['), (0, combinator_1.precedence)(1, (0, combinator_1.recursion)(5 /* Recursion.bracket */, (0, combinator_1.some)(inline_1.inline, ']', [[']', 1]]))), (0, source_1.str)(']'), true, ([as, bs = new parser_1.List(), cs], context) => {
|
|
6509
|
+
}, ([as, bs = new parser_1.List()]) => as.import(bs)));
|
|
6510
|
+
const s1 = (0, combinator_1.lazy)(() => (0, combinator_1.surround)((0, source_1.str)('['), (0, combinator_1.precedence)(1, (0, combinator_1.recursion)(5 /* Recursion.bracket */, (0, combinator_1.some)(inline_1.inline, ']', [[']', 1]]))), (0, source_1.str)(']'), true, [2 | 64 /* Backtrack.bracket */], ([as, bs = new parser_1.List(), cs], context) => {
|
|
6507
6511
|
if (context.state & 8 /* State.link */) {
|
|
6508
6512
|
const {
|
|
6509
6513
|
source,
|
|
@@ -6527,13 +6531,13 @@ const s1 = (0, combinator_1.lazy)(() => (0, combinator_1.surround)((0, source_1.
|
|
|
6527
6531
|
}
|
|
6528
6532
|
}
|
|
6529
6533
|
return as.import(bs).import(cs);
|
|
6530
|
-
}, ([as, bs = new parser_1.List()]) => as.import(bs)
|
|
6531
|
-
const s2 = (0, combinator_1.lazy)(() => (0, combinator_1.surround)((0, source_1.str)('['), (0, combinator_1.precedence)(1, (0, combinator_1.recursion)(5 /* Recursion.bracket */, (0, combinator_1.some)(inline_1.inline, ']', [[']', 1]]))), (0, source_1.str)(']'), true, undefined, ([as, bs = new parser_1.List()]) => as.import(bs)
|
|
6532
|
-
const c1 = (0, combinator_1.lazy)(() => (0, combinator_1.surround)((0, source_1.str)('{'), (0, combinator_1.precedence)(1, (0, combinator_1.recursion)(5 /* Recursion.bracket */, (0, combinator_1.some)(inline_1.inline, '}', [['}', 1]]))), (0, source_1.str)('}'), true, undefined, ([as, bs = new parser_1.List()]) => as.import(bs)
|
|
6533
|
-
const c2 = (0, combinator_1.lazy)(() => (0, combinator_1.surround)((0, source_1.str)('{'), (0, combinator_1.precedence)(1, (0, combinator_1.recursion)(5 /* Recursion.bracket */, (0, combinator_1.some)(inline_1.inline, '}', [['}', 1]]))), (0, source_1.str)('}'), true, undefined, ([as, bs = new parser_1.List()]) => as.import(bs)
|
|
6534
|
+
}, ([as, bs = new parser_1.List()]) => as.import(bs)));
|
|
6535
|
+
const s2 = (0, combinator_1.lazy)(() => (0, combinator_1.surround)((0, source_1.str)('['), (0, combinator_1.precedence)(1, (0, combinator_1.recursion)(5 /* Recursion.bracket */, (0, combinator_1.some)(inline_1.inline, ']', [[']', 1]]))), (0, source_1.str)(']'), true, [2 | 64 /* Backtrack.bracket */], undefined, ([as, bs = new parser_1.List()]) => as.import(bs)));
|
|
6536
|
+
const c1 = (0, combinator_1.lazy)(() => (0, combinator_1.surround)((0, source_1.str)('{'), (0, combinator_1.precedence)(1, (0, combinator_1.recursion)(5 /* Recursion.bracket */, (0, combinator_1.some)(inline_1.inline, '}', [['}', 1]]))), (0, source_1.str)('}'), true, [2 | 64 /* Backtrack.bracket */], undefined, ([as, bs = new parser_1.List()]) => as.import(bs)));
|
|
6537
|
+
const c2 = (0, combinator_1.lazy)(() => (0, combinator_1.surround)((0, source_1.str)('{'), (0, combinator_1.precedence)(1, (0, combinator_1.recursion)(5 /* Recursion.bracket */, (0, combinator_1.some)(inline_1.inline, '}', [['}', 1]]))), (0, source_1.str)('}'), true, [2 | 64 /* Backtrack.bracket */], undefined, ([as, bs = new parser_1.List()]) => as.import(bs)));
|
|
6534
6538
|
const d1 = (0, combinator_1.lazy)(() => (0, combinator_1.surround)((0, source_1.str)('"'),
|
|
6535
6539
|
// 改行の優先度を構文ごとに変える場合シグネチャの優先度対応が必要
|
|
6536
|
-
(0, combinator_1.precedence)(2, (0, combinator_1.recursion)(5 /* Recursion.bracket */, (0, combinator_1.some)(inline_1.inline, /["\n]/y, [['"', 2], ['\n', 3]]))), (0, source_1.str)('"'), true, undefined, ([as, bs = new parser_1.List()]) => as.import(bs)
|
|
6540
|
+
(0, combinator_1.precedence)(2, (0, combinator_1.recursion)(5 /* Recursion.bracket */, (0, combinator_1.some)(inline_1.inline, /["\n]/y, [['"', 2], ['\n', 3]]))), (0, source_1.str)('"'), true, [2 | 64 /* Backtrack.bracket */], undefined, ([as, bs = new parser_1.List()]) => as.import(bs)));
|
|
6537
6541
|
|
|
6538
6542
|
/***/ },
|
|
6539
6543
|
|
|
@@ -6579,7 +6583,7 @@ const inline_1 = __webpack_require__(7973);
|
|
|
6579
6583
|
const visibility_1 = __webpack_require__(6364);
|
|
6580
6584
|
const util_1 = __webpack_require__(4992);
|
|
6581
6585
|
const dom_1 = __webpack_require__(394);
|
|
6582
|
-
exports.deletion = (0, combinator_1.lazy)(() => (0, combinator_1.precedence)(0, (0, util_1.repeat)('~~', (0, combinator_1.surround)('', (0, combinator_1.recursion)(4 /* Recursion.inline */, (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)]))), '~~', false, ([, bs], {
|
|
6586
|
+
exports.deletion = (0, combinator_1.lazy)(() => (0, combinator_1.precedence)(0, (0, util_1.repeat)('~~', (0, combinator_1.surround)('', (0, combinator_1.recursion)(4 /* Recursion.inline */, (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)]))), '~~', false, [], ([, bs], {
|
|
6583
6587
|
buffer
|
|
6584
6588
|
}) => buffer.import(bs), ([, bs], {
|
|
6585
6589
|
buffer
|
|
@@ -6605,7 +6609,7 @@ const source_1 = __webpack_require__(8745);
|
|
|
6605
6609
|
const visibility_1 = __webpack_require__(6364);
|
|
6606
6610
|
const util_1 = __webpack_require__(4992);
|
|
6607
6611
|
const dom_1 = __webpack_require__(394);
|
|
6608
|
-
exports.emphasis = (0, combinator_1.lazy)(() => (0, combinator_1.surround)((0, source_1.str)(/\*(?!\*)/y), (0, combinator_1.precedence)(0, (0, combinator_1.recursion)(4 /* Recursion.inline */, (0, visibility_1.tightStart)((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, '*'), inline_1.inline)]))))), (0, source_1.str)('*'), false, ([, bs]) => new parser_1.List([new parser_1.Data((0, dom_1.html)('em', (0, dom_1.defrag)((0, util_1.unwrap)(bs))))]), ([as, bs]) => bs && as.import(bs)));
|
|
6612
|
+
exports.emphasis = (0, combinator_1.lazy)(() => (0, combinator_1.surround)((0, source_1.str)(/\*(?!\*)/y), (0, combinator_1.precedence)(0, (0, combinator_1.recursion)(4 /* Recursion.inline */, (0, visibility_1.tightStart)((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, '*'), inline_1.inline)]))))), (0, source_1.str)('*'), false, [], ([, bs]) => new parser_1.List([new parser_1.Data((0, dom_1.html)('em', (0, dom_1.defrag)((0, util_1.unwrap)(bs))))]), ([as, bs]) => bs && as.import(bs)));
|
|
6609
6613
|
|
|
6610
6614
|
/***/ },
|
|
6611
6615
|
|
|
@@ -6633,7 +6637,7 @@ const subemphasis = (0, combinator_1.lazy)(() => (0, combinator_1.some)((0, comb
|
|
|
6633
6637
|
// 開閉が明示的でない構文は開閉の不明確な記号による再帰的適用を行わず
|
|
6634
6638
|
// 可能な限り早く閉じるよう解析しなければならない。
|
|
6635
6639
|
// このため終端記号の後ろを見て終端を中止し同じ構文を再帰的に適用してはならない。
|
|
6636
|
-
exports.emstrong = (0, combinator_1.lazy)(() => (0, combinator_1.precedence)(0, (0, util_1.repeat)('***', (0, combinator_1.surround)('', (0, combinator_1.recursion)(4 /* Recursion.inline */, (0, visibility_1.tightStart)((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}/y), false, ([, bs, cs], context) => {
|
|
6640
|
+
exports.emstrong = (0, combinator_1.lazy)(() => (0, combinator_1.precedence)(0, (0, util_1.repeat)('***', (0, combinator_1.surround)('', (0, combinator_1.recursion)(4 /* Recursion.inline */, (0, visibility_1.tightStart)((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}/y), false, [], ([, bs, cs], context) => {
|
|
6637
6641
|
const {
|
|
6638
6642
|
buffer = new parser_1.List()
|
|
6639
6643
|
} = context;
|
|
@@ -6789,9 +6793,9 @@ const source_1 = __webpack_require__(8745);
|
|
|
6789
6793
|
const visibility_1 = __webpack_require__(6364);
|
|
6790
6794
|
const util_1 = __webpack_require__(4992);
|
|
6791
6795
|
const dom_1 = __webpack_require__(394);
|
|
6792
|
-
exports.index = (0, combinator_1.lazy)(() => (0, combinator_1.constraint)(32 /* State.index */, (0, combinator_1.fmap)((0, indexee_1.indexee)((0, combinator_1.surround)((0, source_1.str)('[#'), (0, combinator_1.precedence)(1, (0, combinator_1.state)(251 /* State.linkers */, (0, visibility_1.tightStart)((0, combinator_1.some)((0, combinator_1.inits)([inline_1.inline, exports.signature]), ']', [[']', 1]])))), (0, source_1.str)(']'), false, ([, bs], context) => context.linebreak === 0 && (0, visibility_1.trimBlankNodeEnd)(bs).length > 0 ? new parser_1.List([new parser_1.Data((0, dom_1.html)('a', {
|
|
6796
|
+
exports.index = (0, combinator_1.lazy)(() => (0, combinator_1.constraint)(32 /* State.index */, (0, combinator_1.fmap)((0, indexee_1.indexee)((0, combinator_1.surround)((0, source_1.str)('[#'), (0, combinator_1.precedence)(1, (0, combinator_1.state)(251 /* State.linkers */, (0, visibility_1.tightStart)((0, combinator_1.some)((0, combinator_1.inits)([inline_1.inline, exports.signature]), ']', [[']', 1]])))), (0, source_1.str)(']'), false, [3 | 64 /* Backtrack.bracket */], ([, bs], context) => context.linebreak === 0 && (0, visibility_1.trimBlankNodeEnd)(bs).length > 0 ? new parser_1.List([new parser_1.Data((0, dom_1.html)('a', {
|
|
6793
6797
|
'data-index': dataindex(bs)
|
|
6794
|
-
}, (0, dom_1.defrag)((0, util_1.unwrap)(bs))))]) : undefined, undefined
|
|
6798
|
+
}, (0, dom_1.defrag)((0, util_1.unwrap)(bs))))]) : undefined, undefined)), ns => {
|
|
6795
6799
|
if (ns.length === 1) {
|
|
6796
6800
|
const el = ns.head.value;
|
|
6797
6801
|
return new parser_1.List([new parser_1.Data((0, dom_1.define)(el, {
|
|
@@ -6804,7 +6808,7 @@ exports.index = (0, combinator_1.lazy)(() => (0, combinator_1.constraint)(32 /*
|
|
|
6804
6808
|
return ns;
|
|
6805
6809
|
}
|
|
6806
6810
|
})));
|
|
6807
|
-
exports.signature = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('|', (0, combinator_1.surround)((0, source_1.str)(/\|(?!\\?\s)/y), (0, combinator_1.some)((0, combinator_1.union)([htmlentity_1.unsafehtmlentity, (0, combinator_1.some)(source_1.txt, /(?:[$"`\[\](){}<>()[]{}])/y)]), ']'), /(?=])/y, false, ([, ns], context) => {
|
|
6811
|
+
exports.signature = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('|', (0, combinator_1.surround)((0, source_1.str)(/\|(?!\\?\s)/y), (0, combinator_1.some)((0, combinator_1.union)([htmlentity_1.unsafehtmlentity, (0, combinator_1.some)(source_1.txt, /(?:[$"`\[\](){}<>()[]{}])/y)]), ']'), /(?=])/y, false, [3 | 64 /* Backtrack.bracket */], ([, ns], context) => {
|
|
6808
6812
|
const index = (0, indexee_1.identity)('index', undefined, ns.foldl((acc, {
|
|
6809
6813
|
value
|
|
6810
6814
|
}) => acc + value, ''))?.slice(7);
|
|
@@ -6812,7 +6816,7 @@ exports.signature = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('|',
|
|
|
6812
6816
|
class: 'indexer',
|
|
6813
6817
|
'data-index': index
|
|
6814
6818
|
}))]) : undefined;
|
|
6815
|
-
}, ([as, bs]) => bs && as.import(bs)
|
|
6819
|
+
}, ([as, bs]) => bs && as.import(bs))));
|
|
6816
6820
|
function dataindex(nodes) {
|
|
6817
6821
|
let node = nodes.last;
|
|
6818
6822
|
if (typeof node?.value !== 'object') return;
|
|
@@ -6989,7 +6993,7 @@ const dom_1 = __webpack_require__(394);
|
|
|
6989
6993
|
exports.indexer = (0, combinator_1.surround)(/ \[(?=\|\S)/y, (0, combinator_1.union)([index_1.signature, (0, combinator_1.focus)(/\|(?=\])/y, () => new parser_1.List([new parser_1.Data((0, dom_1.html)('span', {
|
|
6990
6994
|
class: 'indexer',
|
|
6991
6995
|
'data-index': ''
|
|
6992
|
-
}))]))]), /\]\
|
|
6996
|
+
}))]))]), /\][^\S\n]*(?:$|\n)/y);
|
|
6993
6997
|
|
|
6994
6998
|
/***/ },
|
|
6995
6999
|
|
|
@@ -7009,7 +7013,7 @@ const source_1 = __webpack_require__(8745);
|
|
|
7009
7013
|
const dom_1 = __webpack_require__(394);
|
|
7010
7014
|
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]))/y);
|
|
7011
7015
|
exports.segment = (0, combinator_1.clear)((0, combinator_1.union)([(0, combinator_1.surround)('[', body, ']'), body]));
|
|
7012
|
-
exports.label = (0, combinator_1.constraint)(16 /* State.label */, (0, combinator_1.fmap)((0, combinator_1.union)([(0, combinator_1.surround)('[', body, ']', false,
|
|
7016
|
+
exports.label = (0, combinator_1.constraint)(16 /* State.label */, (0, combinator_1.fmap)((0, combinator_1.union)([(0, combinator_1.surround)('[', body, ']', false, [1 | 64 /* Backtrack.bracket */, 1]), body]), ([{
|
|
7013
7017
|
value
|
|
7014
7018
|
}]) => new parser_1.List([new parser_1.Data((0, dom_1.html)('a', {
|
|
7015
7019
|
class: 'label',
|
|
@@ -7056,10 +7060,10 @@ const dom_1 = __webpack_require__(394);
|
|
|
7056
7060
|
// All syntax surrounded by square brackets shouldn't contain line breaks.
|
|
7057
7061
|
exports.placeholder = (0, combinator_1.lazy)(() => (0, combinator_1.surround)(
|
|
7058
7062
|
// ^はabbrで使用済みだが^:などのようにして分離使用可能
|
|
7059
|
-
(0, source_1.str)(/\[[:^|]/y), (0, combinator_1.precedence)(1, (0, combinator_1.recursion)(4 /* Recursion.inline */, (0, visibility_1.tightStart)((0, combinator_1.some)((0, combinator_1.union)([inline_1.inline]), ']', [[']', 1]])))), (0, source_1.str)(']'), false, (_, context) => new parser_1.List([new parser_1.Data((0, dom_1.html)('span', {
|
|
7063
|
+
(0, source_1.str)(/\[[:^|]/y), (0, combinator_1.precedence)(1, (0, combinator_1.recursion)(4 /* Recursion.inline */, (0, visibility_1.tightStart)((0, combinator_1.some)((0, combinator_1.union)([inline_1.inline]), ']', [[']', 1]])))), (0, source_1.str)(']'), false, [3 | 64 /* Backtrack.bracket */], (_, context) => new parser_1.List([new parser_1.Data((0, dom_1.html)('span', {
|
|
7060
7064
|
class: 'invalid',
|
|
7061
7065
|
...(0, util_1.invalid)('extension', 'syntax', `Invalid start symbol or linebreak`)
|
|
7062
|
-
}, context.source.slice(context.position - context.range, context.position)))]), ([as, bs]) => bs && as.import(bs)
|
|
7066
|
+
}, context.source.slice(context.position - context.range, context.position)))]), ([as, bs]) => bs && as.import(bs)));
|
|
7063
7067
|
|
|
7064
7068
|
/***/ },
|
|
7065
7069
|
|
|
@@ -7092,14 +7096,14 @@ Object.setPrototypeOf(attrspecs, null);
|
|
|
7092
7096
|
Object.values(attrspecs).forEach(o => Object.setPrototypeOf(o, null));
|
|
7093
7097
|
exports.html = (0, combinator_1.lazy)(() => (0, combinator_1.validate)(/<[a-z]+(?=[ >])/yi, (0, combinator_1.union)([(0, combinator_1.surround)(
|
|
7094
7098
|
// https://html.spec.whatwg.org/multipage/syntax.html#void-elements
|
|
7095
|
-
(0, source_1.str)(/<(?:area|base|br|col|embed|hr|img|input|link|meta|source|track|wbr)(?=[ >])/y), (0, combinator_1.some)((0, combinator_1.union)([exports.attribute])), (0, combinator_1.open)((0, source_1.str)(/ ?/y), (0, source_1.str)('>'), true), true, ([as, bs = new parser_1.List(), cs], context) => new parser_1.List([new parser_1.Data(elem(as.head.value.slice(1), false, [...(0, util_1.unwrap)(as.import(bs).import(cs))], new parser_1.List(), new parser_1.List(), context))]), ([as, bs = new parser_1.List()], context) => new parser_1.List([new parser_1.Data(elem(as.head.value.slice(1), false, [...(0, util_1.unwrap)(as.import(bs))], new parser_1.List(), new parser_1.List(), context))])), (0, combinator_1.match)(new RegExp(String.raw`<(${TAGS.join('|')})(?=[ >])`, 'y'), (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, combinator_1.open)((0, source_1.str)(/ ?/y), (0, source_1.str)('>'), true), true, ([as, bs = new parser_1.List(), cs]) => as.import(bs).import(cs), ([as, bs = new parser_1.List()]) => as.import(bs)),
|
|
7099
|
+
(0, source_1.str)(/<(?:area|base|br|col|embed|hr|img|input|link|meta|source|track|wbr)(?=[ >])/y), (0, combinator_1.some)((0, combinator_1.union)([exports.attribute])), (0, combinator_1.open)((0, source_1.str)(/ ?/y), (0, source_1.str)('>'), true), true, [], ([as, bs = new parser_1.List(), cs], context) => new parser_1.List([new parser_1.Data(elem(as.head.value.slice(1), false, [...(0, util_1.unwrap)(as.import(bs).import(cs))], new parser_1.List(), new parser_1.List(), context))]), ([as, bs = new parser_1.List()], context) => new parser_1.List([new parser_1.Data(elem(as.head.value.slice(1), false, [...(0, util_1.unwrap)(as.import(bs))], new parser_1.List(), new parser_1.List(), context))])), (0, combinator_1.match)(new RegExp(String.raw`<(${TAGS.join('|')})(?=[ >])`, 'y'), (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, combinator_1.open)((0, source_1.str)(/ ?/y), (0, source_1.str)('>'), true), true, [], ([as, bs = new parser_1.List(), cs]) => as.import(bs).import(cs), ([as, bs = new parser_1.List()]) => as.import(bs)),
|
|
7096
7100
|
// 不可視のHTML構造が可視構造を変化させるべきでない。
|
|
7097
7101
|
// 可視のHTMLは優先度変更を検討する。
|
|
7098
7102
|
// このため<>は将来的に共通構造を変化させる可能性があり
|
|
7099
7103
|
// 共通構造を変化させない非構造文字列としては依然としてエスケープを要する。
|
|
7100
|
-
(0, combinator_1.precedence)(0, (0, combinator_1.recursion)(4 /* Recursion.inline */, (0, combinator_1.some)((0, combinator_1.union)([(0, combinator_1.some)(inline_1.inline, (0, visibility_1.blankWith)('\n', `</${tag}>`)), (0, combinator_1.open)('\n', (0, combinator_1.some)(inline_1.inline, `</${tag}>`), true)])))), (0, source_1.str)(`</${tag}>`), true, ([as, bs = new parser_1.List(), cs], context) => new parser_1.List([new parser_1.Data(elem(tag, true, [...(0, util_1.unwrap)(as)], bs, cs, context))]), ([as, bs = new parser_1.List()], context) => new parser_1.List([new parser_1.Data(elem(tag, true, [...(0, util_1.unwrap)(as)], bs, new parser_1.List(), context))])), ([, tag]) => tag, new Map())), (0, combinator_1.surround)(
|
|
7104
|
+
(0, combinator_1.precedence)(0, (0, combinator_1.recursion)(4 /* Recursion.inline */, (0, combinator_1.some)((0, combinator_1.union)([(0, combinator_1.some)(inline_1.inline, (0, visibility_1.blankWith)('\n', `</${tag}>`)), (0, combinator_1.open)('\n', (0, combinator_1.some)(inline_1.inline, `</${tag}>`), true)])))), (0, source_1.str)(`</${tag}>`), true, [], ([as, bs = new parser_1.List(), cs], context) => new parser_1.List([new parser_1.Data(elem(tag, true, [...(0, util_1.unwrap)(as)], bs, cs, context))]), ([as, bs = new parser_1.List()], context) => new parser_1.List([new parser_1.Data(elem(tag, true, [...(0, util_1.unwrap)(as)], bs, new parser_1.List(), context))])), ([, tag]) => tag, new Map())), (0, combinator_1.surround)(
|
|
7101
7105
|
// https://html.spec.whatwg.org/multipage/syntax.html#void-elements
|
|
7102
|
-
(0, source_1.str)(/<[a-z]+(?=[ >])/yi), (0, combinator_1.some)((0, combinator_1.union)([exports.attribute])), (0, combinator_1.open)((0, source_1.str)(/ ?/y), (0, source_1.str)('>'), true), true, ([as, bs = new parser_1.List(), cs], context) => new parser_1.List([new parser_1.Data(elem(as.head.value.slice(1), false, [...(0, util_1.unwrap)(as.import(bs).import(cs))], new parser_1.List(), new parser_1.List(), context))]), ([as, bs = new parser_1.List()], context) => new parser_1.List([new parser_1.Data(elem(as.head.value.slice(1), false, [...(0, util_1.unwrap)(as.import(bs))], new parser_1.List(), new parser_1.List(), context))]))])));
|
|
7106
|
+
(0, source_1.str)(/<[a-z]+(?=[ >])/yi), (0, combinator_1.some)((0, combinator_1.union)([exports.attribute])), (0, combinator_1.open)((0, source_1.str)(/ ?/y), (0, source_1.str)('>'), true), true, [], ([as, bs = new parser_1.List(), cs], context) => new parser_1.List([new parser_1.Data(elem(as.head.value.slice(1), false, [...(0, util_1.unwrap)(as.import(bs).import(cs))], new parser_1.List(), new parser_1.List(), context))]), ([as, bs = new parser_1.List()], context) => new parser_1.List([new parser_1.Data(elem(as.head.value.slice(1), false, [...(0, util_1.unwrap)(as.import(bs))], new parser_1.List(), new parser_1.List(), context))]))])));
|
|
7103
7107
|
exports.attribute = (0, combinator_1.union)([(0, source_1.str)(/ [a-z]+(?:-[a-z]+)*(?:="(?:\\[^\n]|[^\\\n"])*")?(?=[ >])/yi), (0, source_1.str)(/ [^\s<>]+/y)]);
|
|
7104
7108
|
function elem(tag, content, as, bs, cs, context) {
|
|
7105
7109
|
if (!tags.includes(tag)) return ielem('tag', `Invalid HTML tag name "${tag}"`, context);
|
|
@@ -7170,7 +7174,7 @@ const combinator_1 = __webpack_require__(3484);
|
|
|
7170
7174
|
const source_1 = __webpack_require__(8745);
|
|
7171
7175
|
const util_1 = __webpack_require__(4992);
|
|
7172
7176
|
const dom_1 = __webpack_require__(394);
|
|
7173
|
-
exports.unsafehtmlentity = (0, combinator_1.surround)((0, source_1.str)('&'), (0, source_1.str)(/[0-9A-Za-z]+/y), (0, source_1.str)(';'), false, ([as, bs, cs]) => new parser_1.List([new parser_1.Data(parser(as.head.value + bs.head.value + cs.head.value))]), ([as, bs]) => new parser_1.List([new parser_1.Data(as.head.value + (bs?.head?.value ?? ''))])
|
|
7177
|
+
exports.unsafehtmlentity = (0, combinator_1.surround)((0, source_1.str)('&'), (0, source_1.str)(/[0-9A-Za-z]+/y), (0, source_1.str)(';'), false, [3 | 64 /* Backtrack.bracket */], ([as, bs, cs]) => new parser_1.List([new parser_1.Data(parser(as.head.value + bs.head.value + cs.head.value))]), ([as, bs]) => new parser_1.List([new parser_1.Data(as.head.value + (bs?.head?.value ?? ''))]));
|
|
7174
7178
|
exports.htmlentity = (0, combinator_1.fmap)((0, combinator_1.union)([exports.unsafehtmlentity]), ([{
|
|
7175
7179
|
value
|
|
7176
7180
|
}]) => new parser_1.List([length === 1 || value.at(-1) !== ';' ? new parser_1.Data(value) : new parser_1.Data((0, dom_1.html)('span', {
|
|
@@ -7201,7 +7205,7 @@ const inline_1 = __webpack_require__(7973);
|
|
|
7201
7205
|
const visibility_1 = __webpack_require__(6364);
|
|
7202
7206
|
const util_1 = __webpack_require__(4992);
|
|
7203
7207
|
const dom_1 = __webpack_require__(394);
|
|
7204
|
-
exports.insertion = (0, combinator_1.lazy)(() => (0, combinator_1.precedence)(0, (0, util_1.repeat)('++', (0, combinator_1.surround)('', (0, combinator_1.recursion)(4 /* Recursion.inline */, (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)]))), '++', false, ([, bs], {
|
|
7208
|
+
exports.insertion = (0, combinator_1.lazy)(() => (0, combinator_1.precedence)(0, (0, util_1.repeat)('++', (0, combinator_1.surround)('', (0, combinator_1.recursion)(4 /* Recursion.inline */, (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)]))), '++', false, [], ([, bs], {
|
|
7205
7209
|
buffer
|
|
7206
7210
|
}) => buffer.import(bs), ([, bs], {
|
|
7207
7211
|
buffer
|
|
@@ -7228,7 +7232,7 @@ const dom_1 = __webpack_require__(394);
|
|
|
7228
7232
|
// 可読性のため実際にはオブリーク体を指定する。
|
|
7229
7233
|
// 斜体は単語に使うとかえって見づらく読み飛ばしやすくなるため使わないべきであり
|
|
7230
7234
|
// ある程度の長さのある文に使うのが望ましい。
|
|
7231
|
-
exports.italic = (0, combinator_1.lazy)(() => (0, combinator_1.precedence)(0, (0, util_1.repeat)('///', (0, combinator_1.surround)('', (0, combinator_1.recursion)(4 /* Recursion.inline */, (0, visibility_1.tightStart)((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)])))), '///', false, ([, bs], {
|
|
7235
|
+
exports.italic = (0, combinator_1.lazy)(() => (0, combinator_1.precedence)(0, (0, util_1.repeat)('///', (0, combinator_1.surround)('', (0, combinator_1.recursion)(4 /* Recursion.inline */, (0, visibility_1.tightStart)((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)])))), '///', false, [], ([, bs], {
|
|
7232
7236
|
buffer
|
|
7233
7237
|
}) => buffer.import(bs), ([, bs], {
|
|
7234
7238
|
buffer
|
|
@@ -7245,7 +7249,7 @@ exports.italic = (0, combinator_1.lazy)(() => (0, combinator_1.precedence)(0, (0
|
|
|
7245
7249
|
Object.defineProperty(exports, "__esModule", ({
|
|
7246
7250
|
value: true
|
|
7247
7251
|
}));
|
|
7248
|
-
exports.decode = exports.resolve = exports.
|
|
7252
|
+
exports.decode = exports.resolve = exports.parse = exports.option = exports.uri = exports.medialink = exports.textlink = void 0;
|
|
7249
7253
|
const parser_1 = __webpack_require__(605);
|
|
7250
7254
|
const combinator_1 = __webpack_require__(3484);
|
|
7251
7255
|
const inline_1 = __webpack_require__(7973);
|
|
@@ -7259,15 +7263,15 @@ const optspec = {
|
|
|
7259
7263
|
rel: ['nofollow']
|
|
7260
7264
|
};
|
|
7261
7265
|
Object.setPrototypeOf(optspec, null);
|
|
7262
|
-
exports.textlink = (0, combinator_1.lazy)(() => (0, combinator_1.constraint)(8 /* State.link */, (0, combinator_1.creation)(10, (0, combinator_1.precedence)(1, (0, combinator_1.state)(251 /* State.linkers */, (0, combinator_1.bind)((0, combinator_1.subsequence)([(0, combinator_1.dup)((0, combinator_1.surround)('[', (0, visibility_1.trimBlankStart)((0, combinator_1.some)((0, combinator_1.union)([inline_1.inline]), ']', [[']', 1]])), ']', true, ([, ns = new parser_1.List()], context) => context.linebreak === 0 ? ns.push(new parser_1.Data("\u001F" /* Command.Separator */)) && ns : undefined
|
|
7266
|
+
exports.textlink = (0, combinator_1.lazy)(() => (0, combinator_1.constraint)(8 /* State.link */, (0, combinator_1.creation)(10, (0, combinator_1.precedence)(1, (0, combinator_1.state)(251 /* State.linkers */, (0, combinator_1.bind)((0, combinator_1.subsequence)([(0, combinator_1.dup)((0, combinator_1.surround)('[', (0, visibility_1.trimBlankStart)((0, combinator_1.some)((0, combinator_1.union)([inline_1.inline]), ']', [[']', 1]])), ']', true, [3 | 64 /* Backtrack.bracket */, 3 | 16 /* Backtrack.link */, 2 | 8 /* Backtrack.ruby */], ([, ns = new parser_1.List()], context) => context.linebreak === 0 ? ns.push(new parser_1.Data("\u001F" /* Command.Separator */)) && ns : undefined)),
|
|
7263
7267
|
// `{ `と`{`で個別にバックトラックが発生し+1nされる。
|
|
7264
7268
|
// 自己再帰的にパースしてもオプションの不要なパースによる計算量の増加により相殺される。
|
|
7265
|
-
(0, combinator_1.dup)((0, combinator_1.surround)(/{(?![{}])/y, (0, combinator_1.inits)([exports.uri, (0, combinator_1.some)(exports.option)]), / ?}/y, false, undefined, ([as, bs], context) => {
|
|
7269
|
+
(0, combinator_1.dup)((0, combinator_1.surround)(/{(?![{}])/y, (0, combinator_1.inits)([exports.uri, (0, combinator_1.some)(exports.option)]), / ?}/y, false, [3 | 16 /* Backtrack.link */], undefined, ([as, bs], context) => {
|
|
7266
7270
|
if (!bs) return;
|
|
7267
7271
|
const head = context.position - context.range;
|
|
7268
7272
|
(0, combinator_1.setBacktrack)(context, [2 | 16 /* Backtrack.link */], head);
|
|
7269
7273
|
return as.import(bs).push(new parser_1.Data("\u0018" /* Command.Cancel */)) && as;
|
|
7270
|
-
}
|
|
7274
|
+
}))]), ([{
|
|
7271
7275
|
value: content
|
|
7272
7276
|
}, {
|
|
7273
7277
|
value: params = undefined
|
|
@@ -7297,11 +7301,6 @@ exports.medialink = (0, combinator_1.lazy)(() => (0, combinator_1.constraint)(8
|
|
|
7297
7301
|
}, {
|
|
7298
7302
|
value: params
|
|
7299
7303
|
}], context) => new parser_1.List([new parser_1.Data(parse(content, params, context))]))))));
|
|
7300
|
-
exports.unsafelink = (0, combinator_1.lazy)(() => (0, combinator_1.creation)(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)(/{(?![{}])/y, (0, combinator_1.inits)([exports.uri, (0, combinator_1.some)(exports.option)]), / ?}/y))])), ([{
|
|
7301
|
-
value: params
|
|
7302
|
-
}, {
|
|
7303
|
-
value: content
|
|
7304
|
-
} = new parser_1.Data(new parser_1.List())], context) => new parser_1.List([new parser_1.Data(parse(content, params, context))]))));
|
|
7305
7304
|
exports.uri = (0, combinator_1.union)([(0, combinator_1.open)(/ /y, (0, source_1.str)(/\S+/y)), (0, source_1.str)(/[^\s{}]+/y)]);
|
|
7306
7305
|
exports.option = (0, combinator_1.union)([(0, combinator_1.fmap)((0, source_1.str)(/ nofollow(?=[ }])/y), () => new parser_1.List([new parser_1.Data(' rel="nofollow"')])), (0, source_1.str)(/ [a-z]+(?:-[a-z]+)*(?:="(?:\\[^\n]|[^\\\n"])*")?(?=[ }])/yi), (0, source_1.str)(/ [^\s{}]+/y)]);
|
|
7307
7306
|
function parse(content, params, context) {
|
|
@@ -7313,6 +7312,7 @@ function parse(content, params, context) {
|
|
|
7313
7312
|
const el = elem(INSECURE_URI, content, uri, context.host?.origin || location.origin);
|
|
7314
7313
|
return el.classList.contains('invalid') ? el : (0, dom_1.define)(el, (0, html_1.attributes)('link', optspec, (0, util_1.unwrap)(params))[0]);
|
|
7315
7314
|
}
|
|
7315
|
+
exports.parse = parse;
|
|
7316
7316
|
function elem(INSECURE_URI, content, uri, origin) {
|
|
7317
7317
|
let type;
|
|
7318
7318
|
let message;
|
|
@@ -7410,7 +7410,7 @@ const indexee_1 = __webpack_require__(7610);
|
|
|
7410
7410
|
const visibility_1 = __webpack_require__(6364);
|
|
7411
7411
|
const util_1 = __webpack_require__(4992);
|
|
7412
7412
|
const dom_1 = __webpack_require__(394);
|
|
7413
|
-
exports.mark = (0, combinator_1.lazy)(() => (0, combinator_1.constraint)(251 /* State.linkers */ & ~2 /* State.mark */, (0, combinator_1.precedence)(0, (0, combinator_1.state)(2 /* State.mark */, (0, util_1.repeat)('==', (0, combinator_1.surround)('', (0, combinator_1.recursion)(4 /* Recursion.inline */, (0, visibility_1.tightStart)((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)])))), '==', false, ([, bs], {
|
|
7413
|
+
exports.mark = (0, combinator_1.lazy)(() => (0, combinator_1.constraint)(251 /* State.linkers */ & ~2 /* State.mark */, (0, combinator_1.precedence)(0, (0, combinator_1.state)(2 /* State.mark */, (0, util_1.repeat)('==', (0, combinator_1.surround)('', (0, combinator_1.recursion)(4 /* Recursion.inline */, (0, visibility_1.tightStart)((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)])))), '==', false, [], ([, bs], {
|
|
7414
7414
|
buffer
|
|
7415
7415
|
}) => buffer.import(bs), ([, bs], {
|
|
7416
7416
|
buffer
|
|
@@ -7444,7 +7444,7 @@ const source_1 = __webpack_require__(8745);
|
|
|
7444
7444
|
const util_1 = __webpack_require__(4992);
|
|
7445
7445
|
const dom_1 = __webpack_require__(394);
|
|
7446
7446
|
const forbiddenCommand = /\\(?:begin|tiny|huge|large)(?![a-z])|:\/\//i;
|
|
7447
|
-
exports.math = (0, combinator_1.lazy)(() => (0, combinator_1.rewrite)((0, combinator_1.union)([(0, combinator_1.surround)(/\$(?={)/y, (0, combinator_1.precedence)(4, bracket), '$', false,
|
|
7447
|
+
exports.math = (0, combinator_1.lazy)(() => (0, combinator_1.rewrite)((0, combinator_1.union)([(0, combinator_1.surround)(/\$(?={)/y, (0, combinator_1.precedence)(4, bracket), '$', false, [3 | 64 /* Backtrack.bracket */]), (0, combinator_1.surround)(/\$(?![\s{}])/y, (0, combinator_1.precedence)(2, (0, combinator_1.some)((0, combinator_1.union)([(0, combinator_1.some)(source_1.escsource, /\s?\$|[`"{}\n]/y), (0, combinator_1.precedence)(4, bracket)]))), /\$(?![-0-9A-Za-z])/y, false, [3 | 64 /* Backtrack.bracket */])]), ({
|
|
7448
7448
|
context: {
|
|
7449
7449
|
source,
|
|
7450
7450
|
caches: {
|
|
@@ -7490,12 +7490,12 @@ const optspec = {
|
|
|
7490
7490
|
rel: undefined
|
|
7491
7491
|
};
|
|
7492
7492
|
Object.setPrototypeOf(optspec, null);
|
|
7493
|
-
exports.media = (0, combinator_1.lazy)(() => (0, combinator_1.constraint)(4 /* State.media */, (0, combinator_1.creation)(10, (0, combinator_1.open)('!', (0, combinator_1.bind)((0, combinator_1.fmap)((0, combinator_1.tails)([(0, combinator_1.dup)((0, combinator_1.surround)('[', (0, combinator_1.precedence)(1, (0, combinator_1.some)((0, combinator_1.union)([htmlentity_1.unsafehtmlentity, bracket, source_1.txt]), ']')), ']', true, ([, ns = new parser_1.List()], context) => context.linebreak === 0 ? ns : undefined
|
|
7493
|
+
exports.media = (0, combinator_1.lazy)(() => (0, combinator_1.constraint)(4 /* State.media */, (0, combinator_1.creation)(10, (0, combinator_1.open)('!', (0, combinator_1.bind)((0, combinator_1.fmap)((0, combinator_1.tails)([(0, combinator_1.dup)((0, combinator_1.surround)('[', (0, combinator_1.precedence)(1, (0, combinator_1.some)((0, combinator_1.union)([htmlentity_1.unsafehtmlentity, bracket, source_1.txt]), ']')), ']', true, [3 | 4 /* Backtrack.escbracket */], ([, ns = new parser_1.List()], context) => context.linebreak === 0 ? ns : undefined)), (0, combinator_1.dup)((0, combinator_1.surround)(/{(?![{}])/y, (0, combinator_1.inits)([link_1.uri, (0, combinator_1.some)(option)]), / ?}/y, false, [3 | 16 /* Backtrack.link */], undefined, ([as, bs], context) => {
|
|
7494
7494
|
if (!bs) return;
|
|
7495
7495
|
const head = context.position - context.range;
|
|
7496
7496
|
(0, combinator_1.setBacktrack)(context, [2 | 16 /* Backtrack.link */], head);
|
|
7497
7497
|
return as.import(bs).push(new parser_1.Data("\u0018" /* Command.Cancel */)) && as;
|
|
7498
|
-
}
|
|
7498
|
+
}))]), nodes => nodes.length === 1 ? new parser_1.List([new parser_1.Data(new parser_1.List([new parser_1.Data('')])), nodes.delete(nodes.head)]) : new parser_1.List([new parser_1.Data(new parser_1.List([new parser_1.Data(nodes.head.value.foldl((acc, {
|
|
7499
7499
|
value
|
|
7500
7500
|
}) => acc + value, ''))])), nodes.delete(nodes.last)])), ([{
|
|
7501
7501
|
value: [{
|
|
@@ -7535,23 +7535,13 @@ exports.media = (0, combinator_1.lazy)(() => (0, combinator_1.constraint)(4 /* S
|
|
|
7535
7535
|
}
|
|
7536
7536
|
if (context.state & 8 /* State.link */) return new parser_1.List([new parser_1.Data(el)]);
|
|
7537
7537
|
if (cache && cache.tagName !== 'IMG') return new parser_1.List([new parser_1.Data(el)]);
|
|
7538
|
-
|
|
7539
|
-
|
|
7540
|
-
|
|
7541
|
-
}
|
|
7542
|
-
return (0, combinator_1.fmap)(link_1.unsafelink, ([{
|
|
7543
|
-
value
|
|
7544
|
-
}]) => {
|
|
7545
|
-
context.source = source;
|
|
7546
|
-
context.position = position;
|
|
7547
|
-
return new parser_1.List([new parser_1.Data((0, dom_1.define)(value, {
|
|
7548
|
-
class: null,
|
|
7549
|
-
target: '_blank'
|
|
7550
|
-
}, [el]))]);
|
|
7551
|
-
})((0, parser_1.subinput)(`{ ${INSECURE_URI}${linkparams.join('')} }`, context));
|
|
7538
|
+
return new parser_1.List([new parser_1.Data((0, dom_1.define)((0, link_1.parse)(new parser_1.List(), linkparams.reduce((acc, p) => acc.push(new parser_1.Data(p)) && acc, new parser_1.List([new parser_1.Data(INSECURE_URI)])), context), {
|
|
7539
|
+
class: null,
|
|
7540
|
+
target: '_blank'
|
|
7541
|
+
}, [el]))]);
|
|
7552
7542
|
})))));
|
|
7553
|
-
const bracket = (0, combinator_1.lazy)(() => (0, combinator_1.recursion)(6 /* Recursion.terminal */, (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,
|
|
7554
|
-
const option = (0, combinator_1.lazy)(() => (0, combinator_1.union)([(0, combinator_1.surround)((0, combinator_1.open)(/ /y, (0, source_1.str)(/[1-9][0-9]*/y)), (0, source_1.str)(/[x:]/y), (0, source_1.str)(/[1-9][0-9]*(?=[ }])/y), false, ([[{
|
|
7543
|
+
const bracket = (0, combinator_1.lazy)(() => (0, combinator_1.recursion)(6 /* Recursion.terminal */, (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, [3 | 4 /* Backtrack.escbracket */], undefined, () => new parser_1.List()), (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, [3 | 4 /* Backtrack.escbracket */], undefined, () => new parser_1.List()), (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, [3 | 4 /* Backtrack.escbracket */], undefined, () => new parser_1.List()), (0, combinator_1.surround)((0, source_1.str)('"'), (0, combinator_1.precedence)(2, (0, combinator_1.some)((0, combinator_1.union)([htmlentity_1.unsafehtmlentity, source_1.txt]), '"')), (0, source_1.str)('"'), true, [3 | 4 /* Backtrack.escbracket */], undefined, () => new parser_1.List())])));
|
|
7544
|
+
const option = (0, combinator_1.lazy)(() => (0, combinator_1.union)([(0, combinator_1.surround)((0, combinator_1.open)(/ /y, (0, source_1.str)(/[1-9][0-9]*/y)), (0, source_1.str)(/[x:]/y), (0, source_1.str)(/[1-9][0-9]*(?=[ }])/y), false, [], ([[{
|
|
7555
7545
|
value: a
|
|
7556
7546
|
}], [{
|
|
7557
7547
|
value: b
|
|
@@ -7609,7 +7599,7 @@ const source_1 = __webpack_require__(8745);
|
|
|
7609
7599
|
const visibility_1 = __webpack_require__(6364);
|
|
7610
7600
|
const util_1 = __webpack_require__(4992);
|
|
7611
7601
|
const dom_1 = __webpack_require__(394);
|
|
7612
|
-
exports.reference = (0, combinator_1.lazy)(() => (0, combinator_1.constraint)(64 /* State.reference */, (0, combinator_1.surround)((0, source_1.str)('[['), (0, combinator_1.precedence)(1, (0, combinator_1.state)(128 /* State.annotation */ | 64 /* State.reference */, (0, combinator_1.subsequence)([abbr, (0, visibility_1.trimBlankStart)((0, combinator_1.some)(inline_1.inline, ']', [[']', 1]]))]))), ']]', false, ([, ns], context) => {
|
|
7602
|
+
exports.reference = (0, combinator_1.lazy)(() => (0, combinator_1.constraint)(64 /* State.reference */, (0, combinator_1.surround)((0, source_1.str)('[['), (0, combinator_1.precedence)(1, (0, combinator_1.state)(128 /* State.annotation */ | 64 /* State.reference */, (0, combinator_1.subsequence)([abbr, (0, visibility_1.trimBlankStart)((0, combinator_1.some)(inline_1.inline, ']', [[']', 1]]))]))), ']]', false, [1 | 64 /* Backtrack.bracket */, 3 | 32 /* Backtrack.doublebracket */], ([, ns], context) => {
|
|
7613
7603
|
const {
|
|
7614
7604
|
position,
|
|
7615
7605
|
range = 0,
|
|
@@ -7657,7 +7647,7 @@ exports.reference = (0, combinator_1.lazy)(() => (0, combinator_1.constraint)(64
|
|
|
7657
7647
|
if (context.position === source.length) {
|
|
7658
7648
|
(0, combinator_1.setBacktrack)(context, [2 | 16 /* Backtrack.link */], head);
|
|
7659
7649
|
} else {
|
|
7660
|
-
const next = (0, combinator_1.surround)('', (0, combinator_1.some)(inline_1.inline, ']', [[']', 1]]), (0, source_1.str)(']'), true, ([, cs = new parser_1.List(), ds]) => cs.import(ds), ([, cs = new parser_1.List()]) => {
|
|
7650
|
+
const next = (0, combinator_1.surround)('', (0, combinator_1.some)(inline_1.inline, ']', [[']', 1]]), (0, source_1.str)(']'), true, [], ([, cs = new parser_1.List(), ds]) => cs.import(ds), ([, cs = new parser_1.List()]) => {
|
|
7661
7651
|
(0, combinator_1.setBacktrack)(context, [2 | 16 /* Backtrack.link */], head);
|
|
7662
7652
|
return cs;
|
|
7663
7653
|
})({
|
|
@@ -7670,9 +7660,9 @@ exports.reference = (0, combinator_1.lazy)(() => (0, combinator_1.constraint)(64
|
|
|
7670
7660
|
context.position = position;
|
|
7671
7661
|
}
|
|
7672
7662
|
return state & 128 /* State.annotation */ ? as.import(bs) : undefined;
|
|
7673
|
-
}
|
|
7663
|
+
})));
|
|
7674
7664
|
// Chicago-Style
|
|
7675
|
-
const abbr = (0, combinator_1.surround)((0, source_1.str)('^'), (0, combinator_1.union)([(0, source_1.str)(/(?=[A-Z])(?:[0-9A-Za-z]'?|(?:[-.:]|\.?\??,? ?)(?!['\-.:?, ]))+/y)]), /\|?(?=]])|\|/y, true, ([, ns], context) => {
|
|
7665
|
+
const abbr = (0, combinator_1.surround)((0, source_1.str)('^'), (0, combinator_1.union)([(0, source_1.str)(/(?=[A-Z])(?:[0-9A-Za-z]'?|(?:[-.:]|\.?\??,? ?)(?!['\-.:?, ]))+/y)]), /\|?(?=]])|\|/y, true, [], ([, ns], context) => {
|
|
7676
7666
|
const {
|
|
7677
7667
|
source,
|
|
7678
7668
|
position,
|
|
@@ -7724,7 +7714,7 @@ const inline_1 = __webpack_require__(7973);
|
|
|
7724
7714
|
const source_1 = __webpack_require__(8745);
|
|
7725
7715
|
const util_1 = __webpack_require__(4992);
|
|
7726
7716
|
const dom_1 = __webpack_require__(394);
|
|
7727
|
-
exports.remark = (0, combinator_1.lazy)(() => (0, combinator_1.fallback)((0, combinator_1.surround)((0, source_1.str)(/\[%(?=[ \n])/y), (0, combinator_1.precedence)(3, (0, combinator_1.recursion)(4 /* Recursion.inline */, (0, combinator_1.some)((0, combinator_1.union)([inline_1.inline]), /[ \n]%\]/y, [[/[ \n]%\]/y, 3]]))), (0, combinator_1.close)(source_1.text, (0, source_1.str)(`%]`)), true, ([as, bs = new parser_1.List(), cs]) => new parser_1.List([new parser_1.Data((0, dom_1.html)('span', {
|
|
7717
|
+
exports.remark = (0, combinator_1.lazy)(() => (0, combinator_1.fallback)((0, combinator_1.surround)((0, source_1.str)(/\[%(?=[ \n])/y), (0, combinator_1.precedence)(3, (0, combinator_1.recursion)(4 /* Recursion.inline */, (0, combinator_1.some)((0, combinator_1.union)([inline_1.inline]), /[ \n]%\]/y, [[/[ \n]%\]/y, 3]]))), (0, combinator_1.close)(source_1.text, (0, source_1.str)(`%]`)), true, [], ([as, bs = new parser_1.List(), cs]) => new parser_1.List([new parser_1.Data((0, dom_1.html)('span', {
|
|
7728
7718
|
class: 'remark'
|
|
7729
7719
|
}, [(0, dom_1.html)('input', {
|
|
7730
7720
|
type: 'checkbox'
|
|
@@ -7756,10 +7746,10 @@ const source_1 = __webpack_require__(8745);
|
|
|
7756
7746
|
const visibility_1 = __webpack_require__(6364);
|
|
7757
7747
|
const util_1 = __webpack_require__(4992);
|
|
7758
7748
|
const dom_1 = __webpack_require__(394);
|
|
7759
|
-
exports.ruby = (0, combinator_1.lazy)(() => (0, combinator_1.bind)((0, combinator_1.inits)([(0, combinator_1.dup)((0, combinator_1.surround)('[', text, ']', false, ([, ns]) => {
|
|
7749
|
+
exports.ruby = (0, combinator_1.lazy)(() => (0, combinator_1.bind)((0, combinator_1.inits)([(0, combinator_1.dup)((0, combinator_1.surround)('[', text, ']', false, [1 | 64 /* Backtrack.bracket */, 3 | 8 /* Backtrack.ruby */], ([, ns]) => {
|
|
7760
7750
|
ns && ns.last?.value === '' && ns.pop();
|
|
7761
7751
|
return (0, visibility_1.isTightNodeStart)(ns) ? ns : undefined;
|
|
7762
|
-
}
|
|
7752
|
+
})), (0, combinator_1.dup)((0, combinator_1.surround)('(', text, ')', false, [1 | 64 /* Backtrack.bracket */, 3 | 8 /* Backtrack.ruby */]))]), ([{
|
|
7763
7753
|
value: texts
|
|
7764
7754
|
}, {
|
|
7765
7755
|
value: rubies = undefined
|
|
@@ -7879,7 +7869,7 @@ const source_1 = __webpack_require__(8745);
|
|
|
7879
7869
|
const visibility_1 = __webpack_require__(6364);
|
|
7880
7870
|
const util_1 = __webpack_require__(4992);
|
|
7881
7871
|
const dom_1 = __webpack_require__(394);
|
|
7882
|
-
exports.strong = (0, combinator_1.lazy)(() => (0, combinator_1.surround)((0, source_1.str)(/\*\*(?!\*)/y), (0, combinator_1.precedence)(0, (0, combinator_1.recursion)(4 /* Recursion.inline */, (0, visibility_1.tightStart)((0, combinator_1.some)((0, combinator_1.union)([emphasis_1.emphasis, (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)('**'), false, ([, bs]) => new parser_1.List([new parser_1.Data((0, dom_1.html)('strong', (0, dom_1.defrag)((0, util_1.unwrap)(bs))))]), ([as, bs]) => bs && as.import(bs)));
|
|
7872
|
+
exports.strong = (0, combinator_1.lazy)(() => (0, combinator_1.surround)((0, source_1.str)(/\*\*(?!\*)/y), (0, combinator_1.precedence)(0, (0, combinator_1.recursion)(4 /* Recursion.inline */, (0, visibility_1.tightStart)((0, combinator_1.some)((0, combinator_1.union)([emphasis_1.emphasis, (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)('**'), false, [], ([, bs]) => new parser_1.List([new parser_1.Data((0, dom_1.html)('strong', (0, dom_1.defrag)((0, util_1.unwrap)(bs))))]), ([as, bs]) => bs && as.import(bs)));
|
|
7883
7873
|
|
|
7884
7874
|
/***/ },
|
|
7885
7875
|
|
|
@@ -7898,13 +7888,13 @@ const combinator_1 = __webpack_require__(3484);
|
|
|
7898
7888
|
const source_1 = __webpack_require__(8745);
|
|
7899
7889
|
const util_1 = __webpack_require__(4992);
|
|
7900
7890
|
const dom_1 = __webpack_require__(394);
|
|
7901
|
-
exports.template = (0, combinator_1.lazy)(() => (0, combinator_1.surround)((0, source_1.str)('{{'), (0, combinator_1.precedence)(1, (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.escsource]), '}')), (0, source_1.str)('}}'), true, ([as, bs = new parser_1.List(), cs]) => new parser_1.List([new parser_1.Data((0, dom_1.html)('span', {
|
|
7891
|
+
exports.template = (0, combinator_1.lazy)(() => (0, combinator_1.surround)((0, source_1.str)('{{'), (0, combinator_1.precedence)(1, (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.escsource]), '}')), (0, source_1.str)('}}'), true, [3 | 32 /* Backtrack.doublebracket */, 3 | 4 /* Backtrack.escbracket */], ([as, bs = new parser_1.List(), cs]) => new parser_1.List([new parser_1.Data((0, dom_1.html)('span', {
|
|
7902
7892
|
class: 'template'
|
|
7903
7893
|
}, (0, dom_1.defrag)((0, util_1.unwrap)(as.import(bs).import(cs)))))]), ([, bs], context) => bs && new parser_1.List([new parser_1.Data((0, dom_1.html)('span', {
|
|
7904
7894
|
class: 'invalid',
|
|
7905
7895
|
...(0, util_1.invalid)('template', 'syntax', `Missing the closing symbol "}}"`)
|
|
7906
|
-
}, context.source.slice(context.position - context.range, context.position)))])
|
|
7907
|
-
const bracket = (0, combinator_1.lazy)(() => (0, combinator_1.union)([(0, combinator_1.surround)((0, source_1.str)('('), (0, combinator_1.recursion)(6 /* Recursion.terminal */, (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.escsource]), ')')), (0, source_1.str)(')'), true,
|
|
7896
|
+
}, context.source.slice(context.position - context.range, context.position)))])));
|
|
7897
|
+
const bracket = (0, combinator_1.lazy)(() => (0, combinator_1.union)([(0, combinator_1.surround)((0, source_1.str)('('), (0, combinator_1.recursion)(6 /* Recursion.terminal */, (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.escsource]), ')')), (0, source_1.str)(')'), true, [3 | 4 /* Backtrack.escbracket */], undefined, () => new parser_1.List()), (0, combinator_1.surround)((0, source_1.str)('['), (0, combinator_1.recursion)(6 /* Recursion.terminal */, (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.escsource]), ']')), (0, source_1.str)(']'), true, [3 | 4 /* Backtrack.escbracket */], undefined, () => new parser_1.List()), (0, combinator_1.surround)((0, source_1.str)('{'), (0, combinator_1.recursion)(6 /* Recursion.terminal */, (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.escsource]), '}')), (0, source_1.str)('}'), true, [3 | 4 /* Backtrack.escbracket */], undefined, () => new parser_1.List()), (0, combinator_1.surround)((0, source_1.str)('"'), (0, combinator_1.precedence)(2, (0, combinator_1.recursion)(6 /* Recursion.terminal */, (0, combinator_1.some)(source_1.escsource, /["\n]/y, [['"', 2], ['\n', 3]]))), (0, source_1.str)('"'), true, [3 | 4 /* Backtrack.escbracket */], ([as, bs = new parser_1.List(), cs], context) => context.linebreak === 0 ? as.import(bs).import(cs) : (context.position -= 1, as.import(bs)), ([as, bs]) => bs && as.import(bs))]));
|
|
7908
7898
|
|
|
7909
7899
|
/***/ },
|
|
7910
7900
|
|
|
@@ -8233,7 +8223,7 @@ const extension_1 = __webpack_require__(6193);
|
|
|
8233
8223
|
const source_1 = __webpack_require__(8745);
|
|
8234
8224
|
exports.MAX_SEGMENT_SIZE = 100_000; // 100,000 bytes (Max value size of FDB)
|
|
8235
8225
|
exports.MAX_INPUT_SIZE = exports.MAX_SEGMENT_SIZE * 10;
|
|
8236
|
-
const parser = (0, combinator_1.union)([input => {
|
|
8226
|
+
const parser = (0, combinator_1.union)([(0, combinator_1.some)(source_1.emptyline), input => {
|
|
8237
8227
|
const {
|
|
8238
8228
|
context: {
|
|
8239
8229
|
source,
|
|
@@ -8259,7 +8249,7 @@ const parser = (0, combinator_1.union)([input => {
|
|
|
8259
8249
|
case '$':
|
|
8260
8250
|
return (0, extension_1.segment)(input);
|
|
8261
8251
|
}
|
|
8262
|
-
}, (0, combinator_1.some)(source_1.contentline
|
|
8252
|
+
}, (0, combinator_1.some)(source_1.contentline)]);
|
|
8263
8253
|
function* segment(source) {
|
|
8264
8254
|
if (!validate(source, exports.MAX_INPUT_SIZE)) return yield `${"\u0007" /* Command.Error */}Too large input over ${exports.MAX_INPUT_SIZE.toLocaleString('en')} bytes.\n${source.slice(0, 1001)}`;
|
|
8265
8255
|
for (let position = 0; position < source.length;) {
|
|
@@ -8297,7 +8287,7 @@ exports.validate = validate;
|
|
|
8297
8287
|
Object.defineProperty(exports, "__esModule", ({
|
|
8298
8288
|
value: true
|
|
8299
8289
|
}));
|
|
8300
|
-
exports.anyline = exports.emptyline = exports.contentline = exports.strs = exports.str = exports.unescsource = exports.escsource = exports.
|
|
8290
|
+
exports.anyline = exports.emptyline = exports.contentline = exports.strs = exports.str = exports.unescsource = exports.escsource = exports.txt = exports.text = void 0;
|
|
8301
8291
|
var text_1 = __webpack_require__(5655);
|
|
8302
8292
|
Object.defineProperty(exports, "text", ({
|
|
8303
8293
|
enumerable: true,
|
|
@@ -8311,12 +8301,6 @@ Object.defineProperty(exports, "txt", ({
|
|
|
8311
8301
|
return text_1.txt;
|
|
8312
8302
|
}
|
|
8313
8303
|
}));
|
|
8314
|
-
Object.defineProperty(exports, "linebreak", ({
|
|
8315
|
-
enumerable: true,
|
|
8316
|
-
get: function () {
|
|
8317
|
-
return text_1.linebreak;
|
|
8318
|
-
}
|
|
8319
|
-
}));
|
|
8320
8304
|
var escapable_1 = __webpack_require__(3770);
|
|
8321
8305
|
Object.defineProperty(exports, "escsource", ({
|
|
8322
8306
|
enumerable: true,
|
|
@@ -8393,9 +8377,6 @@ const escsource = ({
|
|
|
8393
8377
|
(0, combinator_1.consume)(1, context);
|
|
8394
8378
|
context.position += 1;
|
|
8395
8379
|
switch (char) {
|
|
8396
|
-
case '\r':
|
|
8397
|
-
(0, combinator_1.consume)(-1, context);
|
|
8398
|
-
return new parser_1.List();
|
|
8399
8380
|
case "\u001B" /* Command.Escape */:
|
|
8400
8381
|
(0, combinator_1.consume)(1, context);
|
|
8401
8382
|
context.position += 1;
|
|
@@ -8411,6 +8392,9 @@ const escsource = ({
|
|
|
8411
8392
|
context.position += 1;
|
|
8412
8393
|
return new parser_1.List([new parser_1.Data(source.slice(position, position + 2))]);
|
|
8413
8394
|
}
|
|
8395
|
+
case '\r':
|
|
8396
|
+
(0, combinator_1.consume)(-1, context);
|
|
8397
|
+
return new parser_1.List();
|
|
8414
8398
|
case '\n':
|
|
8415
8399
|
context.linebreak ||= source.length - position;
|
|
8416
8400
|
return new parser_1.List([new parser_1.Data((0, dom_1.html)('br'))]);
|
|
@@ -8536,7 +8520,7 @@ exports.strs = strs;
|
|
|
8536
8520
|
Object.defineProperty(exports, "__esModule", ({
|
|
8537
8521
|
value: true
|
|
8538
8522
|
}));
|
|
8539
|
-
exports.isAlphanumeric = exports.backToEmailHead = exports.backToUrlHead = exports.backToWhitespace = exports.next = exports.canSkip = exports.
|
|
8523
|
+
exports.isAlphanumeric = exports.backToEmailHead = exports.backToUrlHead = exports.backToWhitespace = exports.next = exports.canSkip = exports.txt = exports.text = exports.nonWhitespace = void 0;
|
|
8540
8524
|
const parser_1 = __webpack_require__(605);
|
|
8541
8525
|
const combinator_1 = __webpack_require__(3484);
|
|
8542
8526
|
const dom_1 = __webpack_require__(394);
|
|
@@ -8555,9 +8539,6 @@ const text = input => {
|
|
|
8555
8539
|
(0, combinator_1.consume)(1, context);
|
|
8556
8540
|
context.position += 1;
|
|
8557
8541
|
switch (char) {
|
|
8558
|
-
case '\r':
|
|
8559
|
-
(0, combinator_1.consume)(-1, context);
|
|
8560
|
-
return new parser_1.List();
|
|
8561
8542
|
case "\u001B" /* Command.Escape */:
|
|
8562
8543
|
case '\\':
|
|
8563
8544
|
switch (source[position + 1]) {
|
|
@@ -8570,6 +8551,9 @@ const text = input => {
|
|
|
8570
8551
|
context.position += 1;
|
|
8571
8552
|
return new parser_1.List([new parser_1.Data(source.slice(position + 1, context.position))]);
|
|
8572
8553
|
}
|
|
8554
|
+
case '\r':
|
|
8555
|
+
(0, combinator_1.consume)(-1, context);
|
|
8556
|
+
return new parser_1.List();
|
|
8573
8557
|
case '\n':
|
|
8574
8558
|
context.linebreak ||= source.length - position;
|
|
8575
8559
|
return new parser_1.List([new parser_1.Data((0, dom_1.html)('br'))]);
|
|
@@ -8589,7 +8573,6 @@ const text = input => {
|
|
|
8589
8573
|
};
|
|
8590
8574
|
exports.text = text;
|
|
8591
8575
|
exports.txt = (0, combinator_1.union)([exports.text]);
|
|
8592
|
-
exports.linebreak = (0, combinator_1.focus)(/[\r\n]/y, (0, combinator_1.union)([exports.text]));
|
|
8593
8576
|
function canSkip(source, position) {
|
|
8594
8577
|
if (!isWhitespace(source[position], false)) return false;
|
|
8595
8578
|
if (position + 1 === source.length) return true;
|
|
@@ -8841,13 +8824,12 @@ const unescsource = ({
|
|
|
8841
8824
|
(0, combinator_1.consume)(1, context);
|
|
8842
8825
|
context.position += 1;
|
|
8843
8826
|
switch (char) {
|
|
8844
|
-
case '\r':
|
|
8845
|
-
(0, combinator_1.consume)(-1, context);
|
|
8846
|
-
return new parser_1.List();
|
|
8847
8827
|
case "\u001B" /* Command.Escape */:
|
|
8848
8828
|
(0, combinator_1.consume)(1, context);
|
|
8849
8829
|
context.position += 1;
|
|
8850
8830
|
return new parser_1.List([new parser_1.Data(source.slice(position + 1, position + 2))]);
|
|
8831
|
+
case '\r':
|
|
8832
|
+
return new parser_1.List();
|
|
8851
8833
|
case '\n':
|
|
8852
8834
|
context.linebreak ||= source.length - position;
|
|
8853
8835
|
return new parser_1.List([new parser_1.Data((0, dom_1.html)('br'))]);
|