securemark 0.279.0 → 0.280.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/README.md +10 -10
- package/dist/index.js +118 -104
- package/markdown.d.ts +2 -2
- package/package.json +1 -1
- package/src/combinator/control/manipulation/indent.ts +1 -1
- package/src/combinator/data/parser/context/delimiter.ts +49 -21
- package/src/combinator/data/parser/context/memo.ts +6 -6
- package/src/combinator/data/parser/context.ts +23 -7
- package/src/debug.test.ts +2 -2
- package/src/parser/api/parse.test.ts +13 -13
- package/src/parser/block/extension/figure.ts +1 -1
- package/src/parser/block/extension/table.ts +1 -1
- package/src/parser/block.ts +2 -2
- package/src/parser/inline/annotation.ts +4 -4
- package/src/parser/inline/autolink/account.ts +1 -1
- package/src/parser/inline/autolink/url.ts +1 -1
- package/src/parser/inline/autolink.ts +2 -2
- package/src/parser/inline/bracket.test.ts +11 -10
- package/src/parser/inline/bracket.ts +10 -11
- package/src/parser/inline/deletion.ts +4 -4
- package/src/parser/inline/emphasis.ts +4 -4
- package/src/parser/inline/emstrong.ts +4 -4
- package/src/parser/inline/extension/index.test.ts +6 -0
- package/src/parser/inline/extension/index.ts +11 -11
- package/src/parser/inline/extension/placeholder.ts +4 -4
- package/src/parser/inline/html.test.ts +1 -1
- package/src/parser/inline/html.ts +6 -7
- package/src/parser/inline/insertion.ts +4 -4
- package/src/parser/inline/link.ts +6 -6
- package/src/parser/inline/mark.ts +4 -4
- package/src/parser/inline/media.ts +4 -4
- package/src/parser/inline/reference.ts +3 -3
- package/src/parser/inline/remark.test.ts +4 -3
- package/src/parser/inline/remark.ts +4 -4
- package/src/parser/inline/ruby.ts +2 -2
- package/src/parser/inline/strong.ts +4 -4
- package/src/parser/inline/template.ts +7 -4
- package/src/parser/inline.test.ts +12 -15
- package/src/parser/processor/figure.ts +0 -1
- package/src/parser/processor/note.ts +0 -3
- package/src/parser/source/str.ts +0 -19
- package/src/parser/source/text.test.ts +1 -1
- package/src/parser/source/text.ts +3 -3
- package/src/parser/source.ts +1 -1
- package/src/parser/visibility.ts +3 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! securemark v0.
|
|
1
|
+
/*! securemark v0.280.0 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"));
|
|
@@ -2956,7 +2956,7 @@ function indent(opener, parser, separation = false) {
|
|
|
2956
2956
|
if (typeof opener === 'function') return indent(/^([ \t])\1*/, opener, parser);
|
|
2957
2957
|
return (0, bind_1.bind)((0, block_1.block)((0, match_1.match)(opener, (0, memoize_1.memoize)(([indent]) => (0, some_1.some)((0, line_1.line)((0, surround_1.open)(indent, ({
|
|
2958
2958
|
source
|
|
2959
|
-
}) => [[source], '']))), ([indent]) => indent.length * 2 + +(indent[0] === ' '),
|
|
2959
|
+
}) => [[source], '']))), ([indent]) => indent.length * 2 + +(indent[0] === ' '), {})), separation), (lines, rest, context) => {
|
|
2960
2960
|
context.offset ??= 0;
|
|
2961
2961
|
context.offset += rest.length;
|
|
2962
2962
|
const result = parser({
|
|
@@ -3387,8 +3387,8 @@ function apply(parser, source, context, changes, values, reset = false) {
|
|
|
3387
3387
|
}
|
|
3388
3388
|
return result;
|
|
3389
3389
|
}
|
|
3390
|
-
function syntax(syntax, prec,
|
|
3391
|
-
return
|
|
3390
|
+
function syntax(syntax, prec, state, parser) {
|
|
3391
|
+
return precedence(prec, ({
|
|
3392
3392
|
source,
|
|
3393
3393
|
context
|
|
3394
3394
|
}) => {
|
|
@@ -3411,7 +3411,7 @@ function syntax(syntax, prec, cost, state, parser) {
|
|
|
3411
3411
|
}
|
|
3412
3412
|
context.state = stateOuter;
|
|
3413
3413
|
return result;
|
|
3414
|
-
})
|
|
3414
|
+
});
|
|
3415
3415
|
}
|
|
3416
3416
|
exports.syntax = syntax;
|
|
3417
3417
|
function creation(cost, recursion, parser) {
|
|
@@ -3422,11 +3422,11 @@ function creation(cost, recursion, parser) {
|
|
|
3422
3422
|
context
|
|
3423
3423
|
}) => {
|
|
3424
3424
|
const resources = context.resources ?? {
|
|
3425
|
-
clock: 1,
|
|
3425
|
+
clock: cost || 1,
|
|
3426
3426
|
recursion: 1
|
|
3427
3427
|
};
|
|
3428
3428
|
if (resources.clock <= 0) throw new Error('Too many creations');
|
|
3429
|
-
if (resources.recursion
|
|
3429
|
+
if (resources.recursion < +recursion) throw new Error('Too much recursion');
|
|
3430
3430
|
recursion && --resources.recursion;
|
|
3431
3431
|
const result = parser({
|
|
3432
3432
|
source,
|
|
@@ -3503,6 +3503,19 @@ function state(state, positive, parser) {
|
|
|
3503
3503
|
};
|
|
3504
3504
|
}
|
|
3505
3505
|
exports.state = state;
|
|
3506
|
+
//export function log<P extends Parser<unknown>>(log: number, parser: P, cond?: (ns: readonly Tree<P>[]) => boolean): P;
|
|
3507
|
+
//export function log<T>(log: number, parser: Parser<T>, cond: (ns: readonly T[]) => boolean = () => true): Parser<T> {
|
|
3508
|
+
// assert(log);
|
|
3509
|
+
// return ({ source, context }) => {
|
|
3510
|
+
// const l = context.log ?? 0;
|
|
3511
|
+
// context.log = 0;
|
|
3512
|
+
// const result = parser!({ source, context });
|
|
3513
|
+
// context.log = result && cond(eval(result))
|
|
3514
|
+
// ? l | log
|
|
3515
|
+
// : l;
|
|
3516
|
+
// return result;
|
|
3517
|
+
// };
|
|
3518
|
+
//}
|
|
3506
3519
|
|
|
3507
3520
|
/***/ }),
|
|
3508
3521
|
|
|
@@ -3520,9 +3533,9 @@ exports.Delimiters = void 0;
|
|
|
3520
3533
|
const memoize_1 = __webpack_require__(1808);
|
|
3521
3534
|
class Delimiters {
|
|
3522
3535
|
constructor() {
|
|
3523
|
-
this.
|
|
3524
|
-
this.
|
|
3525
|
-
this.
|
|
3536
|
+
this.registry = (0, memoize_1.memoize)(() => []);
|
|
3537
|
+
this.delimiters = [];
|
|
3538
|
+
this.order = [];
|
|
3526
3539
|
}
|
|
3527
3540
|
static signature(pattern) {
|
|
3528
3541
|
switch (typeof pattern) {
|
|
@@ -3534,36 +3547,62 @@ class Delimiters {
|
|
|
3534
3547
|
return `r/${pattern.source}/${pattern.flags}`;
|
|
3535
3548
|
}
|
|
3536
3549
|
}
|
|
3537
|
-
push(...
|
|
3538
|
-
|
|
3539
|
-
|
|
3550
|
+
push(...delims) {
|
|
3551
|
+
const {
|
|
3552
|
+
registry,
|
|
3553
|
+
delimiters,
|
|
3554
|
+
order
|
|
3555
|
+
} = this;
|
|
3556
|
+
for (let i = 0; i < delims.length; ++i) {
|
|
3540
3557
|
const {
|
|
3541
3558
|
signature,
|
|
3542
3559
|
matcher,
|
|
3543
3560
|
precedence = 1
|
|
3544
|
-
} =
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3561
|
+
} = delims[i];
|
|
3562
|
+
const stack = registry(signature);
|
|
3563
|
+
const index = stack[0]?.index ?? delimiters.length;
|
|
3564
|
+
if (stack.length === 0 || precedence > delimiters[index].precedence) {
|
|
3565
|
+
const delimiter = {
|
|
3566
|
+
index,
|
|
3567
|
+
signature,
|
|
3568
|
+
matcher,
|
|
3569
|
+
precedence
|
|
3570
|
+
};
|
|
3571
|
+
delimiters[index] = delimiter;
|
|
3572
|
+
stack.push(delimiter);
|
|
3573
|
+
order.push(index);
|
|
3574
|
+
} else {
|
|
3575
|
+
order.push(-1);
|
|
3548
3576
|
}
|
|
3549
|
-
++this.length;
|
|
3550
3577
|
}
|
|
3551
3578
|
}
|
|
3552
3579
|
pop(count = 1) {
|
|
3580
|
+
const {
|
|
3581
|
+
registry,
|
|
3582
|
+
delimiters,
|
|
3583
|
+
order
|
|
3584
|
+
} = this;
|
|
3553
3585
|
for (let i = 0; i < count; ++i) {
|
|
3554
|
-
|
|
3555
|
-
|
|
3586
|
+
const index = order.pop();
|
|
3587
|
+
if (index === -1) continue;
|
|
3588
|
+
const stack = registry(delimiters[index].signature);
|
|
3589
|
+
if (stack.length === 1) {
|
|
3590
|
+
stack.pop();
|
|
3591
|
+
delimiters.pop();
|
|
3592
|
+
} else {
|
|
3593
|
+
stack.pop();
|
|
3594
|
+
delimiters[index] = stack.at(-1);
|
|
3556
3595
|
}
|
|
3557
3596
|
}
|
|
3558
3597
|
}
|
|
3559
3598
|
match(source, precedence = 1) {
|
|
3560
3599
|
const {
|
|
3561
|
-
|
|
3600
|
+
delimiters
|
|
3562
3601
|
} = this;
|
|
3563
|
-
for (let i = 0; i <
|
|
3564
|
-
const
|
|
3565
|
-
if (precedence >=
|
|
3566
|
-
switch (matcher
|
|
3602
|
+
for (let i = 0; i < delimiters.length; ++i) {
|
|
3603
|
+
const delimiter = delimiters[i];
|
|
3604
|
+
if (precedence >= delimiter.precedence) continue;
|
|
3605
|
+
switch (delimiter.matcher(source)) {
|
|
3567
3606
|
case true:
|
|
3568
3607
|
return true;
|
|
3569
3608
|
case false:
|
|
@@ -3611,14 +3650,14 @@ class Memo {
|
|
|
3611
3650
|
return this.memory.length;
|
|
3612
3651
|
}
|
|
3613
3652
|
get(position, syntax, state) {
|
|
3614
|
-
//console.log('get', position, syntax, state, this.memory[position - 1]?.[
|
|
3615
|
-
const cache = this.memory[position - 1]?.[
|
|
3653
|
+
//console.log('get', position, syntax, state, this.memory[position - 1]?.[syntax]?.[state]);
|
|
3654
|
+
const cache = this.memory[position - 1]?.[syntax]?.[state];
|
|
3616
3655
|
return cache?.length === 2 ? [cache[0].slice(), cache[1]] : cache;
|
|
3617
3656
|
}
|
|
3618
3657
|
set(position, syntax, state, nodes, offset) {
|
|
3619
3658
|
const record = this.memory[position - 1] ??= {};
|
|
3620
|
-
record[
|
|
3621
|
-
//console.log('set', position, syntax, state, record[
|
|
3659
|
+
(record[syntax] ??= {})[state] = nodes ? [nodes.slice(), offset] : [];
|
|
3660
|
+
//console.log('set', position, syntax, state, record[syntax]?.[state]);
|
|
3622
3661
|
}
|
|
3623
3662
|
|
|
3624
3663
|
clear(position) {
|
|
@@ -4355,10 +4394,10 @@ const reply_1 = __webpack_require__(9978);
|
|
|
4355
4394
|
const paragraph_1 = __webpack_require__(6457);
|
|
4356
4395
|
const random_1 = __webpack_require__(7325);
|
|
4357
4396
|
const dom_1 = __webpack_require__(3252);
|
|
4358
|
-
exports.block = (0, combinator_1.creation)(
|
|
4397
|
+
exports.block = (0, combinator_1.creation)(0, false, error((0, combinator_1.reset)({
|
|
4359
4398
|
resources: {
|
|
4360
|
-
clock:
|
|
4361
|
-
recursion: 20
|
|
4399
|
+
clock: 20000,
|
|
4400
|
+
recursion: 20 + 1
|
|
4362
4401
|
}
|
|
4363
4402
|
}, (0, combinator_1.union)([source_1.emptyline, pagebreak_1.pagebreak, heading_1.heading, ulist_1.ulist, olist_1.olist, ilist_1.ilist, dlist_1.dlist, table_1.table, codeblock_1.codeblock, mathblock_1.mathblock, extension_1.extension, sidefence_1.sidefence, blockquote_1.blockquote, mediablock_1.mediablock, reply_1.reply, paragraph_1.paragraph]))));
|
|
4364
4403
|
function error(parser) {
|
|
@@ -4736,7 +4775,7 @@ const memoize_1 = __webpack_require__(1808);
|
|
|
4736
4775
|
const dom_1 = __webpack_require__(3252);
|
|
4737
4776
|
exports.segment = (0, combinator_1.block)((0, combinator_1.match)(/^(~{3,})(?:figure[^\S\n])?(?=\[?\$)/, (0, memoize_1.memoize)(([, fence], closer = new RegExp(String.raw`^${fence}[^\S\n]*(?:$|\n)`)) => (0, combinator_1.close)((0, combinator_1.sequence)([source_1.contentline, (0, combinator_1.inits)([
|
|
4738
4777
|
// All parsers which can include closing terms.
|
|
4739
|
-
(0, combinator_1.union)([codeblock_1.segment_, mathblock_1.segment_, table_2.segment_, blockquote_1.segment, placeholder_1.segment_, (0, combinator_1.some)(source_1.contentline, closer)]), source_1.emptyline, (0, combinator_1.union)([source_1.emptyline, (0, combinator_1.some)(source_1.contentline, closer)])])]), closer), ([, fence]) => fence.length,
|
|
4778
|
+
(0, combinator_1.union)([codeblock_1.segment_, mathblock_1.segment_, table_2.segment_, blockquote_1.segment, placeholder_1.segment_, (0, combinator_1.some)(source_1.contentline, closer)]), source_1.emptyline, (0, combinator_1.union)([source_1.emptyline, (0, combinator_1.some)(source_1.contentline, closer)])])]), closer), ([, fence]) => fence.length, {})));
|
|
4740
4779
|
exports.figure = (0, combinator_1.block)((0, combinator_1.fallback)((0, combinator_1.rewrite)(exports.segment, (0, combinator_1.fmap)((0, combinator_1.convert)(source => source.slice(source.match(/^~+(?:\w+\s+)?/)[0].length, source.trimEnd().lastIndexOf('\n')), (0, combinator_1.sequence)([(0, combinator_1.line)((0, combinator_1.sequence)([label_1.label, (0, source_1.str)(/^(?=\s).*\n/)])), (0, combinator_1.inits)([(0, combinator_1.block)((0, combinator_1.union)([ulist_1.ulist, olist_1.olist, table_1.table, codeblock_1.codeblock, mathblock_1.mathblock, example_1.example, table_2.table, blockquote_1.blockquote, placeholder_1.placeholder, (0, combinator_1.line)(inline_1.media), (0, combinator_1.line)(inline_1.shortmedia)])), source_1.emptyline, (0, combinator_1.block)((0, visibility_1.visualize)((0, visibility_1.trimBlankStart)((0, combinator_1.some)(inline_1.inline))))])])), ([label, param, content, ...caption]) => [(0, dom_1.html)('figure', attributes(label.getAttribute('data-label'), param, content, caption), [(0, dom_1.html)('figcaption', [(0, dom_1.html)('span', {
|
|
4741
4780
|
class: 'figindex'
|
|
4742
4781
|
}), (0, dom_1.html)('span', {
|
|
@@ -5858,9 +5897,9 @@ const combinator_1 = __webpack_require__(2087);
|
|
|
5858
5897
|
const inline_1 = __webpack_require__(1160);
|
|
5859
5898
|
const visibility_1 = __webpack_require__(7618);
|
|
5860
5899
|
const dom_1 = __webpack_require__(3252);
|
|
5861
|
-
exports.annotation = (0, combinator_1.lazy)(() => (0, combinator_1.surround)('((', (0, combinator_1.constraint)(256 /* State.annotation */, false, (0, combinator_1.syntax)(0 /* Syntax.none */, 6,
|
|
5900
|
+
exports.annotation = (0, combinator_1.lazy)(() => (0, combinator_1.creation)((0, combinator_1.surround)('((', (0, combinator_1.constraint)(256 /* State.annotation */, false, (0, combinator_1.syntax)(0 /* Syntax.none */, 6, 256 /* State.annotation */ | 8 /* State.media */, (0, visibility_1.trimBlankStart)((0, combinator_1.some)((0, combinator_1.union)([inline_1.inline]), ')', [[/^\\?\n/, 9], [')', 2], ['))', 6]])))), '))', false, ([, ns], rest) => [[(0, dom_1.html)('sup', {
|
|
5862
5901
|
class: 'annotation'
|
|
5863
|
-
}, [(0, dom_1.html)('span', (0, visibility_1.trimNodeEnd)((0, dom_1.defrag)(ns)))])], rest]));
|
|
5902
|
+
}, [(0, dom_1.html)('span', (0, visibility_1.trimNodeEnd)((0, dom_1.defrag)(ns)))])], rest])));
|
|
5864
5903
|
|
|
5865
5904
|
/***/ }),
|
|
5866
5905
|
|
|
@@ -5884,7 +5923,7 @@ const hashnum_1 = __webpack_require__(5631);
|
|
|
5884
5923
|
const anchor_1 = __webpack_require__(6495);
|
|
5885
5924
|
const source_1 = __webpack_require__(6743);
|
|
5886
5925
|
const util_1 = __webpack_require__(9437);
|
|
5887
|
-
exports.autolink = (0, combinator_1.lazy)(() => (0, combinator_1.validate)(/^(?:[@#>0-9a-z
|
|
5926
|
+
exports.autolink = (0, combinator_1.lazy)(() => (0, combinator_1.validate)(/^(?:[@#>0-9a-z]|\S[#>]|[\r\n]!?https?:\/\/)/iu, (0, combinator_1.constraint)(2 /* State.autolink */, false, (0, combinator_1.syntax)(2 /* Syntax.autolink */, 1, ~1 /* State.shortcut */, (0, combinator_1.union)([(0, combinator_1.some)((0, combinator_1.union)([url_1.lineurl])), (0, combinator_1.fmap)((0, combinator_1.some)((0, combinator_1.union)([url_1.url, email_1.email,
|
|
5888
5927
|
// Escape unmatched email-like strings.
|
|
5889
5928
|
(0, source_1.str)(/^[0-9a-z]+(?:[_.+-][0-9a-z]+)*(?:@(?:[0-9a-z]+(?:[.-][0-9a-z]+)*)?)*/i), channel_1.channel, account_1.account,
|
|
5890
5929
|
// Escape unmatched account-like strings.
|
|
@@ -6057,7 +6096,7 @@ const source_1 = __webpack_require__(6743);
|
|
|
6057
6096
|
const closer = /^[-+*=~^_,.;:!?]*(?=[\\"`|\[\](){}<>]|$)/;
|
|
6058
6097
|
exports.url = (0, combinator_1.lazy)(() => (0, combinator_1.validate)(['http://', 'https://'], (0, combinator_1.rewrite)((0, combinator_1.open)(/^https?:\/\/(?=[\x21-\x7E])/, (0, combinator_1.focus)(/^[\x21-\x7E]+/, (0, combinator_1.some)((0, combinator_1.union)([bracket, (0, combinator_1.some)(source_1.unescsource, closer)])))), (0, combinator_1.convert)(url => `{ ${url} }`, (0, combinator_1.union)([link_1.unsafelink])))));
|
|
6059
6098
|
exports.lineurl = (0, combinator_1.lazy)(() => (0, combinator_1.open)(source_1.linebreak, (0, combinator_1.tails)([(0, source_1.str)('!'), (0, combinator_1.focus)(/^https?:\/\/\S+(?=[^\S\n]*(?:$|\n))/, (0, combinator_1.convert)(url => `{ ${url} }`, link_1.unsafelink))])));
|
|
6060
|
-
const bracket = (0, combinator_1.lazy)(() => (0, combinator_1.creation)((0, combinator_1.precedence)(2, (0, combinator_1.union)([(0, combinator_1.surround)('(', (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.unescsource]), ')'), ')', true), (0, combinator_1.surround)('[', (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.unescsource]), ']'), ']', true), (0, combinator_1.surround)('{', (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.unescsource]), '}'), '}', true), (0, combinator_1.surround)('"', (0, combinator_1.precedence)(
|
|
6099
|
+
const bracket = (0, combinator_1.lazy)(() => (0, combinator_1.creation)((0, combinator_1.precedence)(2, (0, combinator_1.union)([(0, combinator_1.surround)('(', (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.unescsource]), ')'), ')', true), (0, combinator_1.surround)('[', (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.unescsource]), ']'), ']', true), (0, combinator_1.surround)('{', (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.unescsource]), '}'), '}', true), (0, combinator_1.surround)('"', (0, combinator_1.precedence)(3, (0, combinator_1.some)(source_1.unescsource, '"')), '"', true)]))));
|
|
6061
6100
|
|
|
6062
6101
|
/***/ }),
|
|
6063
6102
|
|
|
@@ -6077,13 +6116,11 @@ const source_1 = __webpack_require__(6743);
|
|
|
6077
6116
|
const array_1 = __webpack_require__(8112);
|
|
6078
6117
|
const dom_1 = __webpack_require__(3252);
|
|
6079
6118
|
const index = /^[0-9A-Za-z]+(?:(?:[.-]|, )[0-9A-Za-z]+)*/;
|
|
6080
|
-
exports.bracket = (0, combinator_1.lazy)(() => (0, combinator_1.union)([(0, combinator_1.surround)((0, source_1.str)('('), (0, combinator_1.syntax)(0 /* Syntax.none */, 2,
|
|
6119
|
+
exports.bracket = (0, combinator_1.lazy)(() => (0, combinator_1.union)([(0, combinator_1.surround)((0, source_1.str)('('), (0, combinator_1.creation)((0, combinator_1.syntax)(0 /* Syntax.none */, 2, 0 /* State.none */, (0, source_1.str)(index))), (0, source_1.str)(')')), (0, combinator_1.surround)((0, source_1.str)('('), (0, combinator_1.creation)((0, combinator_1.syntax)(8 /* Syntax.bracket */, 2, 0 /* State.none */, (0, combinator_1.some)(inline_1.inline, ')', [[/^\\?\n/, 3], [')', 2]]))), (0, source_1.str)(')'), true, ([as, bs = [], cs], rest) => [[(0, dom_1.html)('span', {
|
|
6081
6120
|
class: 'paren'
|
|
6082
|
-
}, (0, dom_1.defrag)((0, array_1.push)((0, array_1.unshift)(as, bs), cs)))], rest], ([as, bs = []], rest) => [(0, array_1.unshift)(
|
|
6121
|
+
}, (0, dom_1.defrag)((0, array_1.push)((0, array_1.unshift)(as, bs), cs)))], rest], ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), (0, combinator_1.surround)((0, source_1.str)('('), (0, combinator_1.creation)((0, combinator_1.syntax)(0 /* Syntax.none */, 2, 0 /* State.none */, (0, source_1.str)(new RegExp(index.source.replace(', ', '[,、]').replace(/[09AZaz.]|\-(?!\w)/g, c => c.trimStart() && String.fromCharCode(c.charCodeAt(0) + 0xFEE0)))))), (0, source_1.str)(')')), (0, combinator_1.surround)((0, source_1.str)('('), (0, combinator_1.creation)((0, combinator_1.syntax)(8 /* Syntax.bracket */, 2, 0 /* State.none */, (0, combinator_1.some)(inline_1.inline, ')', [[/^\\?\n/, 3], [')', 2]]))), (0, source_1.str)(')'), true, ([as, bs = [], cs], rest) => [[(0, dom_1.html)('span', {
|
|
6083
6122
|
class: 'paren'
|
|
6084
|
-
}, (0, dom_1.defrag)((0, array_1.push)((0, array_1.unshift)(as, bs), cs)))], rest], ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), (0, combinator_1.surround)((0, source_1.str)('['), (0, combinator_1.syntax)(8 /* Syntax.bracket */, 2,
|
|
6085
|
-
// Control media blinking in editing rather than control confusion of pairs of quote marks.
|
|
6086
|
-
(0, combinator_1.surround)((0, source_1.str)('"'), (0, combinator_1.syntax)(0 /* Syntax.none */, 3, 1, 0 /* State.none */, (0, combinator_1.some)(inline_1.inline, '"', [['"', 3]])), (0, source_1.str)('"'), true, undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest])]));
|
|
6123
|
+
}, (0, dom_1.defrag)((0, array_1.push)((0, array_1.unshift)(as, bs), cs)))], rest], ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), (0, combinator_1.surround)((0, source_1.str)('['), (0, combinator_1.creation)((0, combinator_1.syntax)(8 /* Syntax.bracket */, 2, 0 /* State.none */, (0, combinator_1.some)(inline_1.inline, ']', [[/^\\?\n/, 3], [']', 2]]))), (0, source_1.str)(']'), true, undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), (0, combinator_1.surround)((0, source_1.str)('{'), (0, combinator_1.creation)((0, combinator_1.syntax)(8 /* Syntax.bracket */, 2, 0 /* State.none */, (0, combinator_1.some)(inline_1.inline, '}', [[/^\\?\n/, 3], ['}', 2]]))), (0, source_1.str)('}'), true, undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), (0, combinator_1.surround)((0, source_1.str)('"'), (0, combinator_1.creation)((0, combinator_1.syntax)(0 /* Syntax.none */, 3, 0 /* State.none */, (0, combinator_1.some)(inline_1.inline, '"', [[/^\\?\n/, 4], ['"', 3]]))), (0, source_1.str)('"'), true, undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest])]));
|
|
6087
6124
|
|
|
6088
6125
|
/***/ }),
|
|
6089
6126
|
|
|
@@ -6126,7 +6163,7 @@ const source_1 = __webpack_require__(6743);
|
|
|
6126
6163
|
const visibility_1 = __webpack_require__(7618);
|
|
6127
6164
|
const array_1 = __webpack_require__(8112);
|
|
6128
6165
|
const dom_1 = __webpack_require__(3252);
|
|
6129
|
-
exports.deletion = (0, combinator_1.lazy)(() => (0, combinator_1.surround)((0, source_1.str)('~~', '~'), (0, combinator_1.syntax)(0 /* Syntax.none */, 1,
|
|
6166
|
+
exports.deletion = (0, combinator_1.lazy)(() => (0, combinator_1.creation)((0, combinator_1.surround)((0, source_1.str)('~~', '~'), (0, combinator_1.syntax)(0 /* Syntax.none */, 1, 0 /* State.none */, (0, combinator_1.some)((0, combinator_1.union)([(0, combinator_1.some)(inline_1.inline, (0, visibility_1.blankWith)('\n', '~~')), (0, combinator_1.open)('\n', (0, combinator_1.some)(inline_1.inline, '~'), true)]))), (0, source_1.str)('~~'), false, ([, bs], rest) => [[(0, dom_1.html)('del', (0, dom_1.defrag)(bs))], rest], ([as, bs], rest) => [(0, array_1.unshift)(as, bs), rest])));
|
|
6130
6167
|
|
|
6131
6168
|
/***/ }),
|
|
6132
6169
|
|
|
@@ -6148,7 +6185,7 @@ const source_1 = __webpack_require__(6743);
|
|
|
6148
6185
|
const visibility_1 = __webpack_require__(7618);
|
|
6149
6186
|
const array_1 = __webpack_require__(8112);
|
|
6150
6187
|
const dom_1 = __webpack_require__(3252);
|
|
6151
|
-
exports.emphasis = (0, combinator_1.lazy)(() => (0, combinator_1.surround)((0, source_1.str)('*', '*'), (0, combinator_1.syntax)(0 /* Syntax.none */, 1,
|
|
6188
|
+
exports.emphasis = (0, combinator_1.lazy)(() => (0, combinator_1.creation)((0, combinator_1.surround)((0, source_1.str)('*', '*'), (0, combinator_1.syntax)(0 /* Syntax.none */, 1, 0 /* State.none */, (0, visibility_1.startTight)((0, combinator_1.some)((0, combinator_1.union)([strong_1.strong, (0, combinator_1.some)(inline_1.inline, (0, visibility_1.blankWith)('*'), [[/^\\?\n/, 9]]), (0, combinator_1.open)((0, combinator_1.some)(inline_1.inline, '*', [[/^\\?\n/, 9]]), (0, combinator_1.union)([emstrong_1.emstrong, strong_1.strong, exports.emphasis]))])))), (0, source_1.str)('*'), false, ([, bs], rest) => [[(0, dom_1.html)('em', (0, dom_1.defrag)(bs))], rest], ([as, bs], rest) => [(0, array_1.unshift)(as, bs), rest])));
|
|
6152
6189
|
|
|
6153
6190
|
/***/ }),
|
|
6154
6191
|
|
|
@@ -6172,7 +6209,7 @@ const dom_1 = __webpack_require__(3252);
|
|
|
6172
6209
|
const array_1 = __webpack_require__(8112);
|
|
6173
6210
|
const substrong = (0, combinator_1.lazy)(() => (0, combinator_1.some)((0, combinator_1.union)([(0, combinator_1.some)(inline_1.inline, (0, visibility_1.blankWith)('**'), [[/^\\?\n/, 9]]), (0, combinator_1.open)((0, combinator_1.some)(inline_1.inline, '*', [[/^\\?\n/, 9]]), (0, combinator_1.union)([exports.emstrong, strong_1.strong]))])));
|
|
6174
6211
|
const subemphasis = (0, combinator_1.lazy)(() => (0, combinator_1.some)((0, combinator_1.union)([strong_1.strong, (0, combinator_1.some)(inline_1.inline, (0, visibility_1.blankWith)('*'), [[/^\\?\n/, 9]]), (0, combinator_1.open)((0, combinator_1.some)(inline_1.inline, '*', [[/^\\?\n/, 9]]), (0, combinator_1.union)([exports.emstrong, strong_1.strong, emphasis_1.emphasis]))])));
|
|
6175
|
-
exports.emstrong = (0, combinator_1.lazy)(() => (0, combinator_1.surround)((0, source_1.str)('***'), (0, combinator_1.syntax)(0 /* Syntax.none */, 1,
|
|
6212
|
+
exports.emstrong = (0, combinator_1.lazy)(() => (0, combinator_1.creation)((0, combinator_1.surround)((0, source_1.str)('***'), (0, combinator_1.syntax)(0 /* Syntax.none */, 1, 0 /* State.none */, (0, visibility_1.startTight)((0, combinator_1.some)((0, combinator_1.union)([(0, combinator_1.some)(inline_1.inline, (0, visibility_1.blankWith)('*'), [[/^\\?\n/, 9]]), (0, combinator_1.open)((0, combinator_1.some)(inline_1.inline, '*', [[/^\\?\n/, 9]]), inline_1.inline)])))), (0, source_1.str)(/^\*{1,3}/), false, ([, bs, cs], rest, context) => {
|
|
6176
6213
|
switch (cs[0]) {
|
|
6177
6214
|
case '***':
|
|
6178
6215
|
return [[(0, dom_1.html)('em', [(0, dom_1.html)('strong', (0, dom_1.defrag)(bs))])], rest];
|
|
@@ -6187,7 +6224,7 @@ exports.emstrong = (0, combinator_1.lazy)(() => (0, combinator_1.surround)((0, s
|
|
|
6187
6224
|
context
|
|
6188
6225
|
}) ?? [['**', (0, dom_1.html)('em', (0, dom_1.defrag)(bs))], rest];
|
|
6189
6226
|
}
|
|
6190
|
-
}, ([as, bs], rest) => [(0, array_1.unshift)(as, bs), rest]));
|
|
6227
|
+
}, ([as, bs], rest) => [(0, array_1.unshift)(as, bs), rest])));
|
|
6191
6228
|
|
|
6192
6229
|
/***/ }),
|
|
6193
6230
|
|
|
@@ -6225,16 +6262,16 @@ const indexee_1 = __webpack_require__(1269);
|
|
|
6225
6262
|
const source_1 = __webpack_require__(6743);
|
|
6226
6263
|
const visibility_1 = __webpack_require__(7618);
|
|
6227
6264
|
const dom_1 = __webpack_require__(3252);
|
|
6228
|
-
exports.index = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('[#', (0, combinator_1.fmap)((0, indexee_1.indexee)((0, combinator_1.surround)('[#', (0, combinator_1.constraint)(64 /* State.index */, false, (0, combinator_1.syntax)(128 /* Syntax.index */, 2,
|
|
6265
|
+
exports.index = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('[#', (0, combinator_1.creation)((0, combinator_1.fmap)((0, indexee_1.indexee)((0, combinator_1.surround)('[#', (0, combinator_1.constraint)(64 /* State.index */, false, (0, combinator_1.syntax)(128 /* Syntax.index */, 2, 502 /* State.linkers */ | 8 /* State.media */, (0, visibility_1.startTight)((0, combinator_1.some)((0, combinator_1.inits)([inline_1.inline, exports.signature]), ']', [[/^\\?\n/, 9], [']', 2]])))), ']', false, ([, ns], rest) => [[(0, dom_1.html)('a', (0, visibility_1.trimNodeEnd)((0, dom_1.defrag)(ns)))], rest])), ([el]) => [(0, dom_1.define)(el, {
|
|
6229
6266
|
id: el.id ? null : undefined,
|
|
6230
6267
|
class: 'index',
|
|
6231
6268
|
href: el.id ? `#${el.id}` : undefined
|
|
6232
|
-
})])));
|
|
6233
|
-
exports.signature = (0, combinator_1.lazy)(() => (0, combinator_1.creation)((0, combinator_1.fmap)((0, combinator_1.open)('|', (0, visibility_1.startTight)((0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.txt]), ']'))), ns => [(0, dom_1.html)('span', {
|
|
6269
|
+
})]))));
|
|
6270
|
+
exports.signature = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('|', (0, combinator_1.creation)((0, combinator_1.fmap)((0, combinator_1.open)('|', (0, visibility_1.startTight)((0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.txt]), ']'))), ns => [(0, dom_1.html)('span', {
|
|
6234
6271
|
class: 'indexer',
|
|
6235
6272
|
'data-index': (0, indexee_1.identity)(undefined, ns.join('')).slice(7)
|
|
6236
|
-
})])));
|
|
6237
|
-
const bracket = (0, combinator_1.lazy)(() => (0, combinator_1.creation)((0, combinator_1.union)([(0, combinator_1.surround)((0, source_1.str)('('), (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.txt]), ')'), (0, source_1.str)(')'), true), (0, combinator_1.surround)((0, source_1.str)('['), (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.txt]), ']'), (0, source_1.str)(']'), true), (0, combinator_1.surround)((0, source_1.str)('{'), (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.txt]), '}'), (0, source_1.str)('}'), true), (0, combinator_1.surround)((0, source_1.str)('"'), (0, combinator_1.precedence)(
|
|
6273
|
+
})]))));
|
|
6274
|
+
const bracket = (0, combinator_1.lazy)(() => (0, combinator_1.creation)((0, combinator_1.union)([(0, combinator_1.surround)((0, source_1.str)('('), (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.txt]), ')'), (0, source_1.str)(')'), true), (0, combinator_1.surround)((0, source_1.str)('['), (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.txt]), ']'), (0, source_1.str)(']'), true), (0, combinator_1.surround)((0, source_1.str)('{'), (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.txt]), '}'), (0, source_1.str)('}'), true), (0, combinator_1.surround)((0, source_1.str)('"'), (0, combinator_1.precedence)(3, (0, combinator_1.some)(source_1.txt, '"')), (0, source_1.str)('"'), true)])));
|
|
6238
6275
|
|
|
6239
6276
|
/***/ }),
|
|
6240
6277
|
|
|
@@ -6427,12 +6464,12 @@ const array_1 = __webpack_require__(8112);
|
|
|
6427
6464
|
const dom_1 = __webpack_require__(3252);
|
|
6428
6465
|
// Don't use the symbols already used: !#$%@&*+~=|
|
|
6429
6466
|
// All syntax surrounded by square brackets shouldn't contain line breaks.
|
|
6430
|
-
exports.placeholder = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('[', (0, combinator_1.surround)((0, source_1.str)(/^\[[:^|]/), (0, combinator_1.syntax)(64 /* Syntax.placeholder */, 2,
|
|
6467
|
+
exports.placeholder = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('[', (0, combinator_1.creation)((0, combinator_1.surround)((0, source_1.str)(/^\[[:^|]/), (0, combinator_1.syntax)(64 /* Syntax.placeholder */, 2, 0 /* State.none */, (0, visibility_1.startTight)((0, combinator_1.some)((0, combinator_1.union)([inline_1.inline]), ']', [[']', 2]]))), (0, source_1.str)(']'), false, ([, bs], rest) => [[(0, dom_1.html)('span', {
|
|
6431
6468
|
class: 'invalid',
|
|
6432
6469
|
'data-invalid-syntax': 'extension',
|
|
6433
6470
|
'data-invalid-type': 'syntax',
|
|
6434
6471
|
'data-invalid-message': `Invalid start symbol or linebreak`
|
|
6435
|
-
}, (0, dom_1.defrag)(bs))], rest], ([as, bs], rest) => [(0, array_1.unshift)(as, bs), rest])));
|
|
6472
|
+
}, (0, dom_1.defrag)(bs))], rest], ([as, bs], rest) => [(0, array_1.unshift)(as, bs), rest]))));
|
|
6436
6473
|
|
|
6437
6474
|
/***/ }),
|
|
6438
6475
|
|
|
@@ -6462,9 +6499,9 @@ const attrspecs = {
|
|
|
6462
6499
|
};
|
|
6463
6500
|
Object.setPrototypeOf(attrspecs, null);
|
|
6464
6501
|
Object.values(attrspecs).forEach(o => Object.setPrototypeOf(o, null));
|
|
6465
|
-
exports.html = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('<', (0, combinator_1.validate)(/^<[a-z]+(?=[^\S\n]|>)/i, (0, combinator_1.syntax)(0 /* Syntax.none */,
|
|
6502
|
+
exports.html = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('<', (0, combinator_1.validate)(/^<[a-z]+(?=[^\S\n]|>)/i, (0, combinator_1.creation)((0, combinator_1.syntax)(0 /* Syntax.none */, 4, 0 /* State.none */, (0, combinator_1.union)([(0, combinator_1.focus)(/^<wbr[^\S\n]*>/i, () => [[(0, dom_1.html)('wbr')], '']), (0, combinator_1.surround)(
|
|
6466
6503
|
// https://html.spec.whatwg.org/multipage/syntax.html#void-elements
|
|
6467
|
-
(0, source_1.str)(/^<(?:area|base|br|col|embed|hr|img|input|link|meta|source|track|wbr)(?=[^\S\n]|>)/i), (0, combinator_1.some)((0, combinator_1.union)([exports.attribute])), (0, source_1.str)(/^[^\S\n]*>/), true, ([as, bs = [], cs], rest) => [[elem(as[0].slice(1), (0, array_1.push)((0, array_1.unshift)(as, bs), cs), [], [])], rest]), (0, combinator_1.match)(new RegExp(String.raw`^<(${TAGS.join('|')})(?=[^\S\n]|>)`), (0, memoize_1.memoize)(([, tag]) => (0, combinator_1.surround)((0, combinator_1.surround)((0, source_1.str)(`<${tag}`), (0, combinator_1.some)(exports.attribute), (0, source_1.str)(/^[^\S\n]*>/), true), (0, combinator_1.subsequence)([(0, combinator_1.focus)(/^[^\S\n]*\n/, (0, combinator_1.some)(inline_1.inline)), (0, combinator_1.some)((0, combinator_1.open)(/^\n?/, (0, combinator_1.some)(inline_1.inline, (0, visibility_1.blankWith)('\n', `</${tag}>`), [[(0, visibility_1.blankWith)('\n', `</${tag}>`),
|
|
6504
|
+
(0, source_1.str)(/^<(?:area|base|br|col|embed|hr|img|input|link|meta|source|track|wbr)(?=[^\S\n]|>)/i), (0, combinator_1.some)((0, combinator_1.union)([exports.attribute])), (0, source_1.str)(/^[^\S\n]*>/), true, ([as, bs = [], cs], rest) => [[elem(as[0].slice(1), (0, array_1.push)((0, array_1.unshift)(as, bs), cs), [], [])], rest]), (0, combinator_1.match)(new RegExp(String.raw`^<(${TAGS.join('|')})(?=[^\S\n]|>)`), (0, memoize_1.memoize)(([, tag]) => (0, combinator_1.surround)((0, combinator_1.surround)((0, source_1.str)(`<${tag}`), (0, combinator_1.some)(exports.attribute), (0, source_1.str)(/^[^\S\n]*>/), true), (0, combinator_1.subsequence)([(0, combinator_1.focus)(/^[^\S\n]*\n/, (0, combinator_1.some)(inline_1.inline)), (0, combinator_1.some)((0, combinator_1.open)(/^\n?/, (0, combinator_1.some)(inline_1.inline, (0, visibility_1.blankWith)('\n', `</${tag}>`), [[(0, visibility_1.blankWith)('\n', `</${tag}>`), 4]]), true))]), (0, source_1.str)(`</${tag}>`), true, ([as, bs = [], cs], rest) => [[elem(tag, as, bs, cs)], rest], ([as, bs = []], rest) => [[elem(tag, as, bs, [])], rest]))), (0, combinator_1.match)(/^<([a-z]+)(?=[^\S\n]|>)/i, (0, memoize_1.memoize)(([, tag]) => (0, combinator_1.surround)((0, combinator_1.surround)((0, source_1.str)(`<${tag}`), (0, combinator_1.some)(exports.attribute), (0, source_1.str)(/^[^\S\n]*>/), true), (0, combinator_1.subsequence)([(0, combinator_1.focus)(/^[^\S\n]*\n/, (0, combinator_1.some)(inline_1.inline)), (0, combinator_1.some)(inline_1.inline, `</${tag}>`, [[`</${tag}>`, 4]])]), (0, source_1.str)(`</${tag}>`), true, ([as, bs = [], cs], rest) => [[elem(tag, as, bs, cs)], rest], ([as, bs = []], rest) => [[elem(tag, as, bs, [])], rest]), ([, tag]) => tag, new clock_1.Clock(10000)))]))))));
|
|
6468
6505
|
exports.attribute = (0, combinator_1.union)([(0, source_1.str)(/^[^\S\n]+[a-z]+(?:-[a-z]+)*(?:="[^"\n]*")?(?=[^\S\n]|>)/i)]);
|
|
6469
6506
|
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element
|
|
6470
6507
|
// [...document.querySelectorAll('tbody > tr > td:first-child')].map(el => el.textContent.slice(1, -1))
|
|
@@ -6558,7 +6595,7 @@ const source_1 = __webpack_require__(6743);
|
|
|
6558
6595
|
const visibility_1 = __webpack_require__(7618);
|
|
6559
6596
|
const array_1 = __webpack_require__(8112);
|
|
6560
6597
|
const dom_1 = __webpack_require__(3252);
|
|
6561
|
-
exports.insertion = (0, combinator_1.lazy)(() => (0, combinator_1.surround)((0, source_1.str)('++', '+'), (0, combinator_1.syntax)(0 /* Syntax.none */, 1,
|
|
6598
|
+
exports.insertion = (0, combinator_1.lazy)(() => (0, combinator_1.creation)((0, combinator_1.surround)((0, source_1.str)('++', '+'), (0, combinator_1.syntax)(0 /* Syntax.none */, 1, 0 /* State.none */, (0, combinator_1.some)((0, combinator_1.union)([(0, combinator_1.some)(inline_1.inline, (0, visibility_1.blankWith)('\n', '++')), (0, combinator_1.open)('\n', (0, combinator_1.some)(inline_1.inline, '+'), true)]))), (0, source_1.str)('++'), false, ([, bs], rest) => [[(0, dom_1.html)('ins', (0, dom_1.defrag)(bs))], rest], ([as, bs], rest) => [(0, array_1.unshift)(as, bs), rest])));
|
|
6562
6599
|
|
|
6563
6600
|
/***/ }),
|
|
6564
6601
|
|
|
@@ -6585,11 +6622,11 @@ const optspec = {
|
|
|
6585
6622
|
};
|
|
6586
6623
|
Object.setPrototypeOf(optspec, null);
|
|
6587
6624
|
exports.link = (0, combinator_1.lazy)(() => (0, combinator_1.validate)(['[', '{'], (0, combinator_1.union)([exports.medialink, exports.textlink])));
|
|
6588
|
-
exports.textlink = (0, combinator_1.lazy)(() => (0, combinator_1.constraint)(16 /* State.link */, false, (0, combinator_1.syntax)(16 /* Syntax.link */, 2,
|
|
6625
|
+
exports.textlink = (0, combinator_1.lazy)(() => (0, combinator_1.creation)(10, (0, combinator_1.constraint)(16 /* State.link */, false, (0, combinator_1.syntax)(16 /* Syntax.link */, 2, 502 /* State.linkers */ | 8 /* State.media */, (0, combinator_1.bind)((0, combinator_1.reverse)((0, combinator_1.tails)([(0, combinator_1.dup)((0, combinator_1.surround)('[', (0, visibility_1.trimBlankStart)((0, combinator_1.some)((0, combinator_1.union)([inline_1.inline]), ']', [[/^\\?\n/, 9], [']', 2]])), ']', true)), (0, combinator_1.dup)((0, combinator_1.surround)(/^{(?![{}])/, (0, combinator_1.inits)([exports.uri, (0, combinator_1.some)(exports.option)]), /^[^\S\n]*}/))])), ([params, content = []], rest, context) => {
|
|
6589
6626
|
if (content.length !== 0 && (0, visibility_1.trimNodeEnd)(content = (0, dom_1.defrag)(content)).length === 0) return;
|
|
6590
6627
|
return [[parse(content, params, context)], rest];
|
|
6591
|
-
}))));
|
|
6592
|
-
exports.medialink = (0, combinator_1.lazy)(() => (0, combinator_1.constraint)(16 /* State.link */ | 8 /* State.media */, false, (0, combinator_1.syntax)(16 /* Syntax.link */, 2,
|
|
6628
|
+
})))));
|
|
6629
|
+
exports.medialink = (0, combinator_1.lazy)(() => (0, combinator_1.creation)(10, (0, combinator_1.constraint)(16 /* State.link */ | 8 /* State.media */, false, (0, combinator_1.syntax)(16 /* Syntax.link */, 2, 502 /* State.linkers */, (0, combinator_1.bind)((0, combinator_1.reverse)((0, combinator_1.sequence)([(0, combinator_1.dup)((0, combinator_1.surround)('[', (0, combinator_1.union)([inline_1.media, inline_1.shortmedia]), ']')), (0, combinator_1.dup)((0, combinator_1.surround)(/^{(?![{}])/, (0, combinator_1.inits)([exports.uri, (0, combinator_1.some)(exports.option)]), /^[^\S\n]*}/))])), ([params, content = []], rest, context) => [[parse((0, dom_1.defrag)(content), params, context)], rest])))));
|
|
6593
6630
|
exports.linemedialink = (0, combinator_1.surround)(source_1.linebreak, (0, combinator_1.union)([exports.medialink]), /^(?=[^\S\n]*(?:$|\n))/);
|
|
6594
6631
|
exports.unsafelink = (0, combinator_1.lazy)(() => (0, combinator_1.creation)(10, (0, combinator_1.precedence)(2, (0, combinator_1.bind)((0, combinator_1.reverse)((0, combinator_1.tails)([(0, combinator_1.dup)((0, combinator_1.surround)('[', (0, combinator_1.some)((0, combinator_1.union)([source_1.unescsource]), ']'), ']')), (0, combinator_1.dup)((0, combinator_1.surround)(/^{(?![{}])/, (0, combinator_1.inits)([exports.uri, (0, combinator_1.some)(exports.option)]), /^[^\S\n]*}/))])), ([params, content = []], rest, context) => [[parse((0, dom_1.defrag)(content), params, context)], rest]))));
|
|
6595
6632
|
exports.uri = (0, combinator_1.union)([(0, combinator_1.open)(/^[^\S\n]+/, (0, source_1.str)(/^\S+/)), (0, source_1.str)(/^[^\s{}]+/)]);
|
|
@@ -6694,7 +6731,7 @@ const source_1 = __webpack_require__(6743);
|
|
|
6694
6731
|
const visibility_1 = __webpack_require__(7618);
|
|
6695
6732
|
const array_1 = __webpack_require__(8112);
|
|
6696
6733
|
const dom_1 = __webpack_require__(3252);
|
|
6697
|
-
exports.mark = (0, combinator_1.lazy)(() => (0, combinator_1.surround)((0, source_1.str)('==', '='), (0, combinator_1.constraint)(4 /* State.mark */, false, (0, combinator_1.syntax)(0 /* Syntax.none */, 1,
|
|
6734
|
+
exports.mark = (0, combinator_1.lazy)(() => (0, combinator_1.creation)((0, combinator_1.surround)((0, source_1.str)('==', '='), (0, combinator_1.constraint)(4 /* State.mark */, false, (0, combinator_1.syntax)(0 /* Syntax.none */, 1, 0 /* State.none */, (0, visibility_1.startTight)((0, combinator_1.some)((0, combinator_1.union)([(0, combinator_1.some)(inline_1.inline, (0, visibility_1.blankWith)('=='), [[/^\\?\n/, 9]]), (0, combinator_1.open)((0, combinator_1.some)(inline_1.inline, '=', [[/^\\?\n/, 9]]), exports.mark)]))))), (0, source_1.str)('=='), false, ([, bs], rest, {
|
|
6698
6735
|
id
|
|
6699
6736
|
}) => {
|
|
6700
6737
|
const el = (0, dom_1.html)('mark', (0, dom_1.defrag)(bs));
|
|
@@ -6703,7 +6740,7 @@ exports.mark = (0, combinator_1.lazy)(() => (0, combinator_1.surround)((0, sourc
|
|
|
6703
6740
|
}), el.id && (0, dom_1.html)('a', {
|
|
6704
6741
|
href: `#${el.id}`
|
|
6705
6742
|
})], rest];
|
|
6706
|
-
}, ([as, bs], rest) => [(0, array_1.unshift)(as, bs), rest]));
|
|
6743
|
+
}, ([as, bs], rest) => [(0, array_1.unshift)(as, bs), rest])));
|
|
6707
6744
|
|
|
6708
6745
|
/***/ }),
|
|
6709
6746
|
|
|
@@ -6769,7 +6806,7 @@ const optspec = {
|
|
|
6769
6806
|
rel: undefined
|
|
6770
6807
|
};
|
|
6771
6808
|
Object.setPrototypeOf(optspec, null);
|
|
6772
|
-
exports.media = (0, combinator_1.lazy)(() => (0, combinator_1.validate)(['![', '!{'], (0, combinator_1.open)('!', (0, combinator_1.constraint)(8 /* State.media */, false, (0, combinator_1.syntax)(4 /* Syntax.media */, 2,
|
|
6809
|
+
exports.media = (0, combinator_1.lazy)(() => (0, combinator_1.validate)(['![', '!{'], (0, combinator_1.creation)(10, (0, combinator_1.open)('!', (0, combinator_1.constraint)(8 /* State.media */, false, (0, combinator_1.syntax)(4 /* Syntax.media */, 2, ~16 /* State.link */, (0, combinator_1.bind)((0, combinator_1.verify)((0, combinator_1.fmap)((0, combinator_1.tails)([(0, combinator_1.dup)((0, combinator_1.surround)('[', (0, combinator_1.some)((0, combinator_1.union)([htmlentity_1.unsafehtmlentity, bracket, source_1.txt]), ']', [[/^\\?\n/, 9]]), ']', true)), (0, combinator_1.dup)((0, combinator_1.surround)(/^{(?![{}])/, (0, combinator_1.inits)([link_1.uri, (0, combinator_1.some)(option)]), /^[^\S\n]*}/))]), ([as, bs]) => bs ? [[as.join('').trim() || as.join('')], bs] : [[''], as]), ([[text]]) => text === '' || text.trim() !== ''), ([[text], params], rest, context) => {
|
|
6773
6810
|
const INSECURE_URI = params.shift();
|
|
6774
6811
|
const url = new url_1.ReadonlyURL((0, link_1.resolve)(INSECURE_URI, context.host ?? location, context.url ?? context.host ?? location), context.host?.href || location.href);
|
|
6775
6812
|
let cache;
|
|
@@ -6797,9 +6834,9 @@ exports.media = (0, combinator_1.lazy)(() => (0, combinator_1.validate)(['![', '
|
|
|
6797
6834
|
source: `{ ${INSECURE_URI}${params.join('')} }${rest}`,
|
|
6798
6835
|
context
|
|
6799
6836
|
});
|
|
6800
|
-
}))))));
|
|
6837
|
+
})))))));
|
|
6801
6838
|
exports.linemedia = (0, combinator_1.surround)(source_1.linebreak, (0, combinator_1.union)([exports.media]), /^(?=[^\S\n]*(?:$|\n))/);
|
|
6802
|
-
const bracket = (0, combinator_1.lazy)(() => (0, combinator_1.creation)((0, combinator_1.union)([(0, combinator_1.surround)((0, source_1.str)('('), (0, combinator_1.some)((0, combinator_1.union)([htmlentity_1.unsafehtmlentity, bracket, source_1.txt]), ')'), (0, source_1.str)(')'), true, undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), (0, combinator_1.surround)((0, source_1.str)('['), (0, combinator_1.some)((0, combinator_1.union)([htmlentity_1.unsafehtmlentity, bracket, source_1.txt]), ']'), (0, source_1.str)(']'), true, undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), (0, combinator_1.surround)((0, source_1.str)('{'), (0, combinator_1.some)((0, combinator_1.union)([htmlentity_1.unsafehtmlentity, bracket, source_1.txt]), '}'), (0, source_1.str)('}'), true, undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), (0, combinator_1.surround)((0, source_1.str)('"'), (0, combinator_1.precedence)(
|
|
6839
|
+
const bracket = (0, combinator_1.lazy)(() => (0, combinator_1.creation)((0, combinator_1.union)([(0, combinator_1.surround)((0, source_1.str)('('), (0, combinator_1.some)((0, combinator_1.union)([htmlentity_1.unsafehtmlentity, bracket, source_1.txt]), ')'), (0, source_1.str)(')'), true, undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), (0, combinator_1.surround)((0, source_1.str)('['), (0, combinator_1.some)((0, combinator_1.union)([htmlentity_1.unsafehtmlentity, bracket, source_1.txt]), ']'), (0, source_1.str)(']'), true, undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), (0, combinator_1.surround)((0, source_1.str)('{'), (0, combinator_1.some)((0, combinator_1.union)([htmlentity_1.unsafehtmlentity, bracket, source_1.txt]), '}'), (0, source_1.str)('}'), true, undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), (0, combinator_1.surround)((0, source_1.str)('"'), (0, combinator_1.precedence)(3, (0, combinator_1.some)((0, combinator_1.union)([htmlentity_1.unsafehtmlentity, source_1.txt]), '"')), (0, source_1.str)('"'), true)])));
|
|
6803
6840
|
const option = (0, combinator_1.lazy)(() => (0, combinator_1.union)([(0, combinator_1.fmap)((0, source_1.str)(/^[^\S\n]+[1-9][0-9]*x[1-9][0-9]*(?=[^\S\n]|})/), ([opt]) => [` width="${opt.slice(1).split('x')[0]}"`, ` height="${opt.slice(1).split('x')[1]}"`]), (0, combinator_1.fmap)((0, source_1.str)(/^[^\S\n]+[1-9][0-9]*:[1-9][0-9]*(?=[^\S\n]|})/), ([opt]) => [` aspect-ratio="${opt.slice(1).split(':').join('/')}"`]), link_1.option]));
|
|
6804
6841
|
function sanitize(target, uri, alt) {
|
|
6805
6842
|
switch (uri.protocol) {
|
|
@@ -6841,7 +6878,7 @@ const inline_1 = __webpack_require__(1160);
|
|
|
6841
6878
|
const source_1 = __webpack_require__(6743);
|
|
6842
6879
|
const visibility_1 = __webpack_require__(7618);
|
|
6843
6880
|
const dom_1 = __webpack_require__(3252);
|
|
6844
|
-
exports.reference = (0, combinator_1.lazy)(() => (0, combinator_1.surround)('[[', (0, combinator_1.constraint)(128 /* State.reference */, false, (0, combinator_1.syntax)(256 /* Syntax.reference */, 6,
|
|
6881
|
+
exports.reference = (0, combinator_1.lazy)(() => (0, combinator_1.creation)((0, combinator_1.surround)('[[', (0, combinator_1.constraint)(128 /* State.reference */, false, (0, combinator_1.syntax)(256 /* Syntax.reference */, 6, 256 /* State.annotation */ | 128 /* State.reference */ | 8 /* State.media */, (0, combinator_1.subsequence)([abbr, (0, visibility_1.trimBlankStart)((0, combinator_1.some)(inline_1.inline, ']', [[/^\\?\n/, 9], [']', 2], [']]', 6]]))]))), ']]', false, ([, ns], rest) => [[(0, dom_1.html)('sup', attributes(ns), [(0, dom_1.html)('span', (0, visibility_1.trimNodeEnd)((0, dom_1.defrag)(ns)))])], rest])));
|
|
6845
6882
|
// Chicago-Style
|
|
6846
6883
|
const abbr = (0, combinator_1.creation)((0, combinator_1.surround)('^', (0, combinator_1.union)([(0, source_1.str)(/^(?=[A-Z])(?:[0-9A-Za-z]'?|(?:[-.:]|\.?\??,? ?)(?!['\-.:?, ]))+/)]), /^\|?(?=]])|^\|[^\S\n]*/, true, ([, ns], rest) => ns ? [['\n', ns[0].trimEnd()], rest.replace(visibility_1.blank.start, '')] : [[''], `^${rest}`], ([,, rest]) => [[''], `^${rest}`]));
|
|
6847
6884
|
function attributes(ns) {
|
|
@@ -6885,11 +6922,11 @@ const source_1 = __webpack_require__(6743);
|
|
|
6885
6922
|
const memoize_1 = __webpack_require__(1808);
|
|
6886
6923
|
const array_1 = __webpack_require__(8112);
|
|
6887
6924
|
const dom_1 = __webpack_require__(3252);
|
|
6888
|
-
exports.remark = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('[%', (0, combinator_1.syntax)(0 /* Syntax.none */,
|
|
6925
|
+
exports.remark = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('[%', (0, combinator_1.creation)((0, combinator_1.syntax)(0 /* Syntax.none */, 5, 0 /* State.none */, (0, combinator_1.match)(/^\[(%+)\s/, (0, memoize_1.memoize)(([, fence]) => (0, combinator_1.surround)((0, combinator_1.open)((0, source_1.str)(`[${fence}`), (0, combinator_1.some)(source_1.text, new RegExp(String.raw`^\s+${fence}\]|^\S`)), true), (0, combinator_1.some)((0, combinator_1.union)([inline_1.inline]), new RegExp(String.raw`^\s+${fence}\]`), [[new RegExp(String.raw`^\s+${fence}\]`), 5]]), (0, combinator_1.close)((0, combinator_1.some)(source_1.text, /^\S/), (0, source_1.str)(`${fence}]`)), true, ([as, bs = [], cs], rest) => [[(0, dom_1.html)('span', {
|
|
6889
6926
|
class: 'remark'
|
|
6890
6927
|
}, [(0, dom_1.html)('input', {
|
|
6891
6928
|
type: 'checkbox'
|
|
6892
|
-
}), (0, dom_1.html)('span', (0, dom_1.defrag)((0, array_1.push)((0, array_1.unshift)(as, bs), cs)))])], rest], ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), ([, fence]) => fence.length,
|
|
6929
|
+
}), (0, dom_1.html)('span', (0, dom_1.defrag)((0, array_1.push)((0, array_1.unshift)(as, bs), cs)))])], rest], ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), ([, fence]) => fence.length, {}))))));
|
|
6893
6930
|
|
|
6894
6931
|
/***/ }),
|
|
6895
6932
|
|
|
@@ -6910,7 +6947,7 @@ const source_1 = __webpack_require__(6743);
|
|
|
6910
6947
|
const visibility_1 = __webpack_require__(7618);
|
|
6911
6948
|
const array_1 = __webpack_require__(8112);
|
|
6912
6949
|
const dom_1 = __webpack_require__(3252);
|
|
6913
|
-
exports.ruby = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('[', (0, combinator_1.syntax)(32 /* Syntax.ruby */, 2,
|
|
6950
|
+
exports.ruby = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('[', (0, combinator_1.creation)((0, combinator_1.syntax)(32 /* Syntax.ruby */, 2, -1 /* State.all */, (0, combinator_1.fmap)((0, combinator_1.verify)((0, combinator_1.fmap)((0, combinator_1.sequence)([(0, combinator_1.surround)('[', (0, source_1.str)(/^(?:\\[^\n]|[^\\[\](){}"\n])+/), ']'), (0, combinator_1.surround)('(', (0, source_1.str)(/^(?:\\[^\n]|[^\\[\](){}"\n])+/), ')')]), ([texts, rubies], _, context) => [(0, parser_1.eval)(text({
|
|
6914
6951
|
source: texts,
|
|
6915
6952
|
context
|
|
6916
6953
|
}), [])[0] ?? '', (0, parser_1.eval)(text({
|
|
@@ -6926,7 +6963,7 @@ exports.ruby = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('[', (0,
|
|
|
6926
6963
|
default:
|
|
6927
6964
|
return [(0, dom_1.html)('ruby', attributes(texts, rubies), (0, dom_1.defrag)((0, array_1.unshift)([texts.join(' ')], [(0, dom_1.html)('rp', '('), (0, dom_1.html)('rt', rubies.join(' ').trim()), (0, dom_1.html)('rp', ')')])))];
|
|
6928
6965
|
}
|
|
6929
|
-
}))));
|
|
6966
|
+
})))));
|
|
6930
6967
|
const text = (0, combinator_1.creation)(1, false, ({
|
|
6931
6968
|
source,
|
|
6932
6969
|
context
|
|
@@ -7023,7 +7060,7 @@ const source_1 = __webpack_require__(6743);
|
|
|
7023
7060
|
const visibility_1 = __webpack_require__(7618);
|
|
7024
7061
|
const array_1 = __webpack_require__(8112);
|
|
7025
7062
|
const dom_1 = __webpack_require__(3252);
|
|
7026
|
-
exports.strong = (0, combinator_1.lazy)(() => (0, combinator_1.surround)((0, source_1.str)('**', '*'), (0, combinator_1.syntax)(0 /* Syntax.none */, 1,
|
|
7063
|
+
exports.strong = (0, combinator_1.lazy)(() => (0, combinator_1.creation)((0, combinator_1.surround)((0, source_1.str)('**', '*'), (0, combinator_1.syntax)(0 /* Syntax.none */, 1, 0 /* State.none */, (0, visibility_1.startTight)((0, combinator_1.some)((0, combinator_1.union)([(0, combinator_1.some)(inline_1.inline, (0, visibility_1.blankWith)('**'), [[/^\\?\n/, 9]]), (0, combinator_1.open)((0, combinator_1.some)(inline_1.inline, '*', [[/^\\?\n/, 9]]), (0, combinator_1.union)([emstrong_1.emstrong, exports.strong]))])))), (0, source_1.str)('**'), false, ([, bs], rest) => [[(0, dom_1.html)('strong', (0, dom_1.defrag)(bs))], rest], ([as, bs], rest) => [(0, array_1.unshift)(as, bs), rest])));
|
|
7027
7064
|
|
|
7028
7065
|
/***/ }),
|
|
7029
7066
|
|
|
@@ -7041,10 +7078,10 @@ const combinator_1 = __webpack_require__(2087);
|
|
|
7041
7078
|
const source_1 = __webpack_require__(6743);
|
|
7042
7079
|
const array_1 = __webpack_require__(8112);
|
|
7043
7080
|
const dom_1 = __webpack_require__(3252);
|
|
7044
|
-
exports.template = (0, combinator_1.lazy)(() => (0, combinator_1.surround)('{{', (0, combinator_1.syntax)(0 /* Syntax.none */,
|
|
7081
|
+
exports.template = (0, combinator_1.lazy)(() => (0, combinator_1.creation)((0, combinator_1.surround)('{{', (0, combinator_1.syntax)(0 /* Syntax.none */, 6, -1 /* State.all */, (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.escsource]), '}', [['}}', 6]])), '}}', true, ([, ns = []], rest) => [[(0, dom_1.html)('span', {
|
|
7045
7082
|
class: 'template'
|
|
7046
|
-
}, `{{${ns.join('').replace(/\x1B/g, '')}}}`)], rest]));
|
|
7047
|
-
const bracket = (0, combinator_1.lazy)(() => (0, combinator_1.creation)((0, combinator_1.union)([(0, combinator_1.surround)((0, source_1.str)('('), (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.escsource]), ')'), (0, source_1.str)(')'), true, undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), (0, combinator_1.surround)((0, source_1.str)('['), (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.escsource]), ']'), (0, source_1.str)(']'), true, undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), (0, combinator_1.surround)((0, source_1.str)('{'), (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.escsource]), '}'), (0, source_1.str)('}'), true, undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), (0, combinator_1.surround)((0, source_1.str)('"'), (0, combinator_1.precedence)(
|
|
7083
|
+
}, `{{${ns.join('').replace(/\x1B/g, '')}}}`)], rest])));
|
|
7084
|
+
const bracket = (0, combinator_1.lazy)(() => (0, combinator_1.creation)((0, combinator_1.union)([(0, combinator_1.surround)((0, source_1.str)('('), (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.escsource]), ')'), (0, source_1.str)(')'), true, undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), (0, combinator_1.surround)((0, source_1.str)('['), (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.escsource]), ']'), (0, source_1.str)(']'), true, undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), (0, combinator_1.surround)((0, source_1.str)('{'), (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.escsource]), '}'), (0, source_1.str)('}'), true, undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), (0, combinator_1.surround)((0, source_1.str)('"'), (0, combinator_1.precedence)(3, (0, combinator_1.some)(source_1.escsource, /^"|^\\?\n/)), (0, source_1.str)('"'), true)])));
|
|
7048
7085
|
|
|
7049
7086
|
/***/ }),
|
|
7050
7087
|
|
|
@@ -7160,7 +7197,6 @@ function* figure(target, notes, opts = {}) {
|
|
|
7160
7197
|
}
|
|
7161
7198
|
yield ref;
|
|
7162
7199
|
}
|
|
7163
|
-
return;
|
|
7164
7200
|
}
|
|
7165
7201
|
exports.figure = figure;
|
|
7166
7202
|
const messages = {
|
|
@@ -7204,7 +7240,6 @@ const dom_1 = __webpack_require__(3252);
|
|
|
7204
7240
|
function* note(target, notes, opts = {}, bottom = null) {
|
|
7205
7241
|
yield* (0, exports.annotation)(target, notes?.annotations, opts, bottom);
|
|
7206
7242
|
yield* (0, exports.reference)(target, notes?.references, opts, bottom);
|
|
7207
|
-
return;
|
|
7208
7243
|
}
|
|
7209
7244
|
exports.note = note;
|
|
7210
7245
|
exports.annotation = build('annotation', n => `*${n}`, 'h1, h2, h3, h4, h5, h6, aside.aside, hr');
|
|
@@ -7323,7 +7358,6 @@ function build(syntax, marker, splitter = '') {
|
|
|
7323
7358
|
el.remove();
|
|
7324
7359
|
}
|
|
7325
7360
|
}
|
|
7326
|
-
return;
|
|
7327
7361
|
};
|
|
7328
7362
|
function* proc(defs, note) {
|
|
7329
7363
|
const {
|
|
@@ -7350,7 +7384,6 @@ function build(syntax, marker, splitter = '') {
|
|
|
7350
7384
|
yield note.removeChild(children[size]);
|
|
7351
7385
|
--length;
|
|
7352
7386
|
}
|
|
7353
|
-
return;
|
|
7354
7387
|
}
|
|
7355
7388
|
}
|
|
7356
7389
|
function equal(a, b) {
|
|
@@ -7412,7 +7445,7 @@ exports.validate = validate;
|
|
|
7412
7445
|
Object.defineProperty(exports, "__esModule", ({
|
|
7413
7446
|
value: true
|
|
7414
7447
|
}));
|
|
7415
|
-
exports.anyline = exports.emptyline = exports.contentline = exports.
|
|
7448
|
+
exports.anyline = exports.emptyline = exports.contentline = exports.str = exports.unescsource = exports.escsource = exports.linebreak = exports.txt = exports.text = void 0;
|
|
7416
7449
|
var text_1 = __webpack_require__(7763);
|
|
7417
7450
|
Object.defineProperty(exports, "text", ({
|
|
7418
7451
|
enumerable: true,
|
|
@@ -7453,12 +7486,6 @@ Object.defineProperty(exports, "str", ({
|
|
|
7453
7486
|
return str_1.str;
|
|
7454
7487
|
}
|
|
7455
7488
|
}));
|
|
7456
|
-
Object.defineProperty(exports, "stropt", ({
|
|
7457
|
-
enumerable: true,
|
|
7458
|
-
get: function () {
|
|
7459
|
-
return str_1.stropt;
|
|
7460
|
-
}
|
|
7461
|
-
}));
|
|
7462
7489
|
var line_1 = __webpack_require__(5034);
|
|
7463
7490
|
Object.defineProperty(exports, "contentline", ({
|
|
7464
7491
|
enumerable: true,
|
|
@@ -7556,7 +7583,7 @@ exports.contentline = (0, combinator_1.line)(i => !(0, combinator_1.isBlank)(i.s
|
|
|
7556
7583
|
Object.defineProperty(exports, "__esModule", ({
|
|
7557
7584
|
value: true
|
|
7558
7585
|
}));
|
|
7559
|
-
exports.
|
|
7586
|
+
exports.str = void 0;
|
|
7560
7587
|
const combinator_1 = __webpack_require__(2087);
|
|
7561
7588
|
function str(pattern, not) {
|
|
7562
7589
|
return typeof pattern === 'string' ? (0, combinator_1.creation)(1, false, ({
|
|
@@ -7575,21 +7602,6 @@ function str(pattern, not) {
|
|
|
7575
7602
|
});
|
|
7576
7603
|
}
|
|
7577
7604
|
exports.str = str;
|
|
7578
|
-
function stropt(pattern) {
|
|
7579
|
-
return typeof pattern === 'string' ? (0, combinator_1.creation)(1, false, ({
|
|
7580
|
-
source
|
|
7581
|
-
}) => {
|
|
7582
|
-
if (source === '') return;
|
|
7583
|
-
return source.slice(0, pattern.length) === pattern ? [[pattern], source.slice(pattern.length)] : [[''], source];
|
|
7584
|
-
}) : (0, combinator_1.creation)(1, false, ({
|
|
7585
|
-
source
|
|
7586
|
-
}) => {
|
|
7587
|
-
if (source === '') return;
|
|
7588
|
-
const m = source.match(pattern);
|
|
7589
|
-
return m ? [[m[0]], source.slice(m[0].length)] : undefined;
|
|
7590
|
-
});
|
|
7591
|
-
}
|
|
7592
|
-
exports.stropt = stropt;
|
|
7593
7605
|
|
|
7594
7606
|
/***/ }),
|
|
7595
7607
|
|
|
@@ -7606,9 +7618,9 @@ exports.isAlphanumeric = exports.linebreak = exports.txt = exports.text = export
|
|
|
7606
7618
|
const combinator_1 = __webpack_require__(2087);
|
|
7607
7619
|
const str_1 = __webpack_require__(2790);
|
|
7608
7620
|
const dom_1 = __webpack_require__(3252);
|
|
7609
|
-
exports.delimiter = /[\s\x00-\x7F]|\S[#>]/u;
|
|
7610
|
-
exports.nonWhitespace = /[\S\n]
|
|
7611
|
-
exports.nonAlphanumeric = /[^0-9A-Za-z]|\S[#>]
|
|
7621
|
+
exports.delimiter = /[\s\x00-\x7F()]|\S[#>]/u;
|
|
7622
|
+
exports.nonWhitespace = /[\S\n]|$/u;
|
|
7623
|
+
exports.nonAlphanumeric = /[^0-9A-Za-z]|\S[#>]|$/u;
|
|
7612
7624
|
const repeat = (0, str_1.str)(/^(.)\1*/);
|
|
7613
7625
|
exports.text = (0, combinator_1.creation)(1, false, ({
|
|
7614
7626
|
source,
|
|
@@ -7890,7 +7902,6 @@ function trimBlankEnd(parser) {
|
|
|
7890
7902
|
//}
|
|
7891
7903
|
//function trimNodeStart<T extends HTMLElement | string>(nodes: T[]): T[] {
|
|
7892
7904
|
// for (let node = nodes[0]; nodes.length > 0 && !isVisible(node = nodes[0], 0);) {
|
|
7893
|
-
// if (nodes.length === 1 && typeof node === 'object' && node.className === 'indexer') break;
|
|
7894
7905
|
// if (typeof node === 'string') {
|
|
7895
7906
|
// const pos = node.trimStart().length;
|
|
7896
7907
|
// if (pos > 0) {
|
|
@@ -7898,6 +7909,9 @@ function trimBlankEnd(parser) {
|
|
|
7898
7909
|
// break;
|
|
7899
7910
|
// }
|
|
7900
7911
|
// }
|
|
7912
|
+
// else if (nodes.length === 1 && node.className === 'indexer') {
|
|
7913
|
+
// break;
|
|
7914
|
+
// }
|
|
7901
7915
|
// nodes.shift();
|
|
7902
7916
|
// }
|
|
7903
7917
|
// return nodes;
|