securemark 0.283.6 → 0.283.7
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 +144 -119
- package/markdown.d.ts +35 -30
- package/package.json +1 -1
- package/src/combinator/control/constraint/block.ts +3 -2
- package/src/combinator/control/constraint/contract.ts +6 -4
- package/src/combinator/control/manipulation/lazy.ts +3 -1
- package/src/combinator/control/manipulation/match.ts +3 -2
- package/src/combinator/control/manipulation/scope.ts +3 -2
- package/src/combinator/control/monad/bind.ts +3 -2
- package/src/combinator/data/parser/context.ts +12 -8
- package/src/parser/inline/autolink/account.ts +5 -4
- package/src/parser/inline/autolink/anchor.ts +5 -4
- package/src/parser/inline/autolink/channel.ts +3 -2
- package/src/parser/inline/autolink/email.ts +7 -4
- package/src/parser/inline/autolink/hashnum.ts +5 -4
- package/src/parser/inline/autolink/hashtag.ts +5 -4
- package/src/parser/inline/code.ts +3 -3
- package/src/parser/inline/extension/index.ts +2 -2
- package/src/parser/inline/extension/label.ts +5 -5
- package/src/parser/inline/extension/placeholder.ts +3 -3
- package/src/parser/inline/extension.ts +3 -3
- package/src/parser/inline/html.ts +2 -2
- package/src/parser/inline/link.ts +2 -2
- package/src/parser/inline/remark.ts +3 -3
- package/src/parser/inline/ruby.ts +3 -3
- package/src/parser/inline.test.ts +2 -1
- package/src/parser/inline.ts +55 -21
- package/src/parser/visibility.ts +3 -2
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! securemark v0.283.
|
|
1
|
+
/*! securemark v0.283.7 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"));
|
|
@@ -1090,15 +1090,13 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
1090
1090
|
exports.bind = void 0;
|
|
1091
1091
|
const parser_1 = __webpack_require__(605);
|
|
1092
1092
|
function bind(parser, f) {
|
|
1093
|
-
return
|
|
1094
|
-
|
|
1095
|
-
context
|
|
1096
|
-
}) => {
|
|
1097
|
-
if (source === '') return;
|
|
1098
|
-
const res1 = parser({
|
|
1093
|
+
return input => {
|
|
1094
|
+
const {
|
|
1099
1095
|
source,
|
|
1100
1096
|
context
|
|
1101
|
-
}
|
|
1097
|
+
} = input;
|
|
1098
|
+
if (source === '') return;
|
|
1099
|
+
const res1 = parser(input);
|
|
1102
1100
|
if (res1 === undefined) return;
|
|
1103
1101
|
const res2 = f((0, parser_1.eval)(res1), (0, parser_1.exec)(res1), context);
|
|
1104
1102
|
if (res2 === undefined) return;
|
|
@@ -1526,17 +1524,14 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
1526
1524
|
exports.match = void 0;
|
|
1527
1525
|
const parser_1 = __webpack_require__(605);
|
|
1528
1526
|
function match(pattern, f) {
|
|
1529
|
-
return
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1527
|
+
return input => {
|
|
1528
|
+
const {
|
|
1529
|
+
source
|
|
1530
|
+
} = input;
|
|
1533
1531
|
if (source === '') return;
|
|
1534
1532
|
const param = source.match(pattern);
|
|
1535
1533
|
if (!param) return;
|
|
1536
|
-
const result = f(param)(
|
|
1537
|
-
source,
|
|
1538
|
-
context
|
|
1539
|
-
});
|
|
1534
|
+
const result = f(param)(input);
|
|
1540
1535
|
if (result === undefined) return;
|
|
1541
1536
|
return (0, parser_1.exec)(result).length < source.length && (0, parser_1.exec)(result).length <= source.length ? result : undefined;
|
|
1542
1537
|
};
|
|
@@ -2044,11 +2039,11 @@ const combinator_1 = __webpack_require__(3484);
|
|
|
2044
2039
|
const source_1 = __webpack_require__(8745);
|
|
2045
2040
|
const dom_1 = __webpack_require__(394);
|
|
2046
2041
|
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]))/);
|
|
2047
|
-
exports.segment = (0, combinator_1.clear)((0, combinator_1.
|
|
2048
|
-
exports.label = (0, combinator_1.constraint)(16 /* State.label */, false, (0, combinator_1.
|
|
2042
|
+
exports.segment = (0, combinator_1.clear)((0, combinator_1.union)([(0, combinator_1.surround)('[', body, ']'), body]));
|
|
2043
|
+
exports.label = (0, combinator_1.constraint)(16 /* State.label */, false, (0, combinator_1.creation)(1, 0 /* Recursion.ignore */, (0, combinator_1.fmap)((0, combinator_1.union)([(0, combinator_1.surround)('[', body, ']'), body]), ([text]) => [(0, dom_1.html)('a', {
|
|
2049
2044
|
class: 'label',
|
|
2050
2045
|
'data-label': text.slice(text[1] === '-' ? 0 : 1).toLowerCase()
|
|
2051
|
-
}, text)])))
|
|
2046
|
+
}, text)])));
|
|
2052
2047
|
function number(label, base) {
|
|
2053
2048
|
return isFixed(label) ? label.slice(label.lastIndexOf('-') + 1) : increment(base, base.split('.').length);
|
|
2054
2049
|
}
|
|
@@ -2263,7 +2258,7 @@ const combinator_1 = __webpack_require__(3484);
|
|
|
2263
2258
|
const index_1 = __webpack_require__(4688);
|
|
2264
2259
|
const label_1 = __webpack_require__(2178);
|
|
2265
2260
|
const placeholder_1 = __webpack_require__(6033);
|
|
2266
|
-
exports.extension = (0, combinator_1.
|
|
2261
|
+
exports.extension = (0, combinator_1.union)([index_1.index, label_1.label, placeholder_1.placeholder]);
|
|
2267
2262
|
|
|
2268
2263
|
/***/ },
|
|
2269
2264
|
|
|
@@ -3083,11 +3078,11 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
3083
3078
|
exports.code = void 0;
|
|
3084
3079
|
const combinator_1 = __webpack_require__(3484);
|
|
3085
3080
|
const dom_1 = __webpack_require__(394);
|
|
3086
|
-
exports.code = (0, combinator_1.creation)(1, 0 /* Recursion.ignore */, (0, combinator_1.
|
|
3081
|
+
exports.code = (0, combinator_1.creation)(1, 0 /* Recursion.ignore */, (0, combinator_1.match)(/^(`+)(?!`)([^\n]*?[^`\n])\1(?!`)/, ([whole,, body]) => ({
|
|
3087
3082
|
source
|
|
3088
3083
|
}) => [[(0, dom_1.html)('code', {
|
|
3089
3084
|
'data-src': whole
|
|
3090
|
-
}, format(body))], source.slice(whole.length)]))
|
|
3085
|
+
}, format(body))], source.slice(whole.length)]));
|
|
3091
3086
|
function format(text) {
|
|
3092
3087
|
return `${text[0]}${text.at(-1)}` === ' ' && text.trimStart() ? text.slice(1, -1) : text;
|
|
3093
3088
|
}
|
|
@@ -3239,10 +3234,10 @@ const optspec = {
|
|
|
3239
3234
|
rel: ['nofollow']
|
|
3240
3235
|
};
|
|
3241
3236
|
Object.setPrototypeOf(optspec, null);
|
|
3242
|
-
exports.textlink = (0, combinator_1.lazy)(() => (0, combinator_1.constraint)(8 /* State.link */, false, (0, combinator_1.
|
|
3237
|
+
exports.textlink = (0, combinator_1.lazy)(() => (0, combinator_1.constraint)(8 /* State.link */, false, (0, combinator_1.creation)(1, 0 /* Recursion.ignore */, (0, combinator_1.precedence)(1, (0, combinator_1.state)(251 /* State.linkers */ | 4 /* 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], [']', 1]])), ']', true, undefined, undefined, 1 | 4 /* Backtrack.bracket */)), (0, combinator_1.dup)((0, combinator_1.surround)(/^{(?![{}])/, (0, combinator_1.inits)([exports.uri, (0, combinator_1.some)(exports.option)]), /^[^\S\n]*}/, false, undefined, undefined, 3 | 16 /* Backtrack.link */))])), ([params, content = []], rest, context) => {
|
|
3243
3238
|
if (content.length !== 0 && (0, visibility_1.trimBlankNodeEnd)(content).length === 0) return;
|
|
3244
3239
|
return [[parse((0, dom_1.defrag)(content), params, context)], rest];
|
|
3245
|
-
}))))))
|
|
3240
|
+
}))))));
|
|
3246
3241
|
exports.medialink = (0, combinator_1.lazy)(() => (0, combinator_1.constraint)(8 /* State.link */ | 4 /* State.media */, false, (0, combinator_1.validate)(['[', '{'], (0, combinator_1.creation)(1, 0 /* Recursion.ignore */, (0, combinator_1.state)(251 /* 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]))))));
|
|
3247
3242
|
exports.linemedialink = (0, combinator_1.surround)(source_1.linebreak, (0, combinator_1.union)([exports.medialink]), /^(?=[^\S\n]*(?:$|\n))/);
|
|
3248
3243
|
exports.unsafelink = (0, combinator_1.lazy)(() => (0, combinator_1.creation)(1, 0 /* Recursion.ignore */, (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])));
|
|
@@ -4335,9 +4330,11 @@ const link_1 = __webpack_require__(3628);
|
|
|
4335
4330
|
const source_1 = __webpack_require__(8745);
|
|
4336
4331
|
const dom_1 = __webpack_require__(394);
|
|
4337
4332
|
// https://example/@user must be a user page or a redirect page going there.
|
|
4338
|
-
exports.account = (0, combinator_1.lazy)(() => (0, combinator_1.
|
|
4333
|
+
exports.account = (0, combinator_1.lazy)(() => (0, combinator_1.rewrite)((0, combinator_1.open)('@', (0, combinator_1.tails)([(0, source_1.str)(/^[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])?)*\//i), (0, source_1.str)(/^[a-z][0-9a-z]*(?:[-.][0-9a-z]+)*/i)])), (0, combinator_1.union)([(0, combinator_1.constraint)(1 /* State.autolink */, false, (0, combinator_1.state)(1 /* State.autolink */, (0, combinator_1.fmap)((0, combinator_1.convert)(source => `[${source}]{ ${source.includes('/') ? `https://${source.slice(1).replace('/', '/@')}` : `/${source}`} }`, link_1.unsafelink), ([el]) => [(0, dom_1.define)(el, {
|
|
4339
4334
|
class: 'account'
|
|
4340
|
-
})]))
|
|
4335
|
+
})]))), ({
|
|
4336
|
+
source
|
|
4337
|
+
}) => [[source], '']])));
|
|
4341
4338
|
|
|
4342
4339
|
/***/ },
|
|
4343
4340
|
|
|
@@ -4755,16 +4752,13 @@ function validate(patterns, has, parser) {
|
|
|
4755
4752
|
if (typeof has === 'function') return validate(patterns, '', has);
|
|
4756
4753
|
if (!(0, alias_1.isArray)(patterns)) return validate([patterns], has, parser);
|
|
4757
4754
|
const match = __webpack_require__.g.eval(['source =>', patterns.map(pattern => typeof pattern === 'string' ? `|| source.slice(0, ${pattern.length}) === '${pattern}'` : `|| /${pattern.source}/${pattern.flags}.test(source)`).join('').slice(2)].join(''));
|
|
4758
|
-
return
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
|
|
4755
|
+
return input => {
|
|
4756
|
+
const {
|
|
4757
|
+
source
|
|
4758
|
+
} = input;
|
|
4762
4759
|
if (source === '') return;
|
|
4763
4760
|
if (!match(source)) return;
|
|
4764
|
-
const result = parser(
|
|
4765
|
-
source,
|
|
4766
|
-
context
|
|
4767
|
-
});
|
|
4761
|
+
const result = parser(input);
|
|
4768
4762
|
if (result === undefined) return;
|
|
4769
4763
|
return (0, parser_1.exec)(result).length < source.length ? result : undefined;
|
|
4770
4764
|
};
|
|
@@ -4774,15 +4768,13 @@ function guard(f, parser) {
|
|
|
4774
4768
|
return input => f(input) ? parser(input) : undefined;
|
|
4775
4769
|
}
|
|
4776
4770
|
function verify(parser, cond) {
|
|
4777
|
-
return
|
|
4778
|
-
|
|
4779
|
-
context
|
|
4780
|
-
}) => {
|
|
4781
|
-
if (source === '') return;
|
|
4782
|
-
const result = parser({
|
|
4771
|
+
return input => {
|
|
4772
|
+
const {
|
|
4783
4773
|
source,
|
|
4784
4774
|
context
|
|
4785
|
-
}
|
|
4775
|
+
} = input;
|
|
4776
|
+
if (source === '') return;
|
|
4777
|
+
const result = parser(input);
|
|
4786
4778
|
if (result === undefined) return;
|
|
4787
4779
|
if (!cond((0, parser_1.eval)(result), (0, parser_1.exec)(result), context)) return;
|
|
4788
4780
|
return (0, parser_1.exec)(result).length < source.length ? result : undefined;
|
|
@@ -5066,7 +5058,7 @@ const hashtag_1 = __webpack_require__(5764);
|
|
|
5066
5058
|
const util_1 = __webpack_require__(4992);
|
|
5067
5059
|
const dom_1 = __webpack_require__(394);
|
|
5068
5060
|
// https://example/@user?ch=a+b must be a user channel page or a redirect page going there.
|
|
5069
|
-
exports.channel = (0, combinator_1.constraint)(1 /* State.autolink */, false, (0, combinator_1.
|
|
5061
|
+
exports.channel = (0, combinator_1.validate)('@', (0, combinator_1.constraint)(1 /* State.autolink */, false, (0, combinator_1.bind)((0, combinator_1.sequence)([account_1.account, (0, combinator_1.some)(hashtag_1.hashtag)]), (es, rest) => {
|
|
5070
5062
|
const source = (0, util_1.stringify)(es);
|
|
5071
5063
|
const el = es[0];
|
|
5072
5064
|
const url = `${el.getAttribute('href')}?ch=${source.slice(source.indexOf('#') + 1).replace(/#/g, '+')}`;
|
|
@@ -5094,13 +5086,13 @@ const indexee_1 = __webpack_require__(7610);
|
|
|
5094
5086
|
const source_1 = __webpack_require__(8745);
|
|
5095
5087
|
const visibility_1 = __webpack_require__(6364);
|
|
5096
5088
|
const dom_1 = __webpack_require__(394);
|
|
5097
|
-
exports.index = (0, combinator_1.lazy)(() => (0, combinator_1.
|
|
5089
|
+
exports.index = (0, combinator_1.lazy)(() => (0, combinator_1.constraint)(32 /* State.index */, false, (0, combinator_1.creation)(1, 0 /* Recursion.ignore */, (0, combinator_1.fmap)((0, indexee_1.indexee)((0, combinator_1.surround)('[#', (0, combinator_1.precedence)(1, (0, combinator_1.state)(251 /* State.linkers */ | 4 /* State.media */, (0, visibility_1.startTight)((0, combinator_1.some)((0, combinator_1.inits)([inline_1.inline, exports.signature]), ']', [['\n', 9], [']', 1]])))), ']', false, ([, ns], rest) => (0, visibility_1.trimBlankNodeEnd)(ns).length > 0 ? [[(0, dom_1.html)('a', {
|
|
5098
5090
|
'data-index': dataindex(ns)
|
|
5099
5091
|
}, (0, dom_1.defrag)(ns))], rest] : undefined, undefined, 1 | 4 /* Backtrack.bracket */)), ([el]) => [(0, dom_1.define)(el, {
|
|
5100
5092
|
id: el.id ? null : undefined,
|
|
5101
5093
|
class: 'index',
|
|
5102
5094
|
href: el.id ? `#${el.id}` : undefined
|
|
5103
|
-
})]))))
|
|
5095
|
+
})]))));
|
|
5104
5096
|
exports.signature = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('|', (0, combinator_1.creation)(1, 0 /* Recursion.ignore */, (0, combinator_1.fmap)((0, combinator_1.open)(/^\|(?!\\?\s)/, (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.txt]), ']')), ns => [(0, dom_1.html)('span', {
|
|
5105
5097
|
class: 'indexer',
|
|
5106
5098
|
'data-index': (0, indexee_1.identity)('index', undefined, ns.join('')).slice(7)
|
|
@@ -5279,9 +5271,9 @@ const attrspecs = {
|
|
|
5279
5271
|
};
|
|
5280
5272
|
Object.setPrototypeOf(attrspecs, null);
|
|
5281
5273
|
Object.values(attrspecs).forEach(o => Object.setPrototypeOf(o, null));
|
|
5282
|
-
exports.html = (0, combinator_1.lazy)(() => (0, combinator_1.validate)(
|
|
5274
|
+
exports.html = (0, combinator_1.lazy)(() => (0, combinator_1.validate)(/^<[a-z]+(?=[^\S\n]|>)/i, (0, combinator_1.creation)(1, 4 /* Recursion.inline */, (0, combinator_1.union)([(0, combinator_1.focus)(/^<wbr[^\S\n]*>/i, () => [[(0, dom_1.html)('wbr')], '']), (0, combinator_1.surround)(
|
|
5283
5275
|
// https://html.spec.whatwg.org/multipage/syntax.html#void-elements
|
|
5284
|
-
(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.precedence)(3, (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}>`), 3]]), true))])), (0, source_1.str)(`</${tag}>`), true, ([as, bs = [], cs], rest) => [[elem(tag, as, bs, cs)], rest], ([as, bs = []], rest) => [[elem(tag, as, bs, [])], rest]), ([, tag]) => tag, new Map())), (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.precedence)(3, (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}>`, 3]])])), (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)))]))))
|
|
5276
|
+
(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.precedence)(3, (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}>`), 3]]), true))])), (0, source_1.str)(`</${tag}>`), true, ([as, bs = [], cs], rest) => [[elem(tag, as, bs, cs)], rest], ([as, bs = []], rest) => [[elem(tag, as, bs, [])], rest]), ([, tag]) => tag, new Map())), (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.precedence)(3, (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}>`, 3]])])), (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)))]))));
|
|
5285
5277
|
exports.attribute = (0, combinator_1.union)([(0, source_1.str)(/^[^\S\n]+[a-z]+(?:-[a-z]+)*(?:="[^"\n]*")?(?=[^\S\n]|>)/i)]);
|
|
5286
5278
|
// https://developer.mozilla.org/en-US/docs/Web/HTML/Element
|
|
5287
5279
|
// [...document.querySelectorAll('tbody > tr > td:first-child')].map(el => el.textContent.slice(1, -1))
|
|
@@ -5669,10 +5661,10 @@ function apply(parser, source, context, changes, values, reset = false) {
|
|
|
5669
5661
|
return result;
|
|
5670
5662
|
}
|
|
5671
5663
|
function creation(cost, recursion, parser) {
|
|
5672
|
-
return
|
|
5673
|
-
|
|
5674
|
-
|
|
5675
|
-
|
|
5664
|
+
return input => {
|
|
5665
|
+
const {
|
|
5666
|
+
context
|
|
5667
|
+
} = input;
|
|
5676
5668
|
const resources = context.resources ?? {
|
|
5677
5669
|
clock: cost || 1,
|
|
5678
5670
|
recursions: [1]
|
|
@@ -5683,10 +5675,7 @@ function creation(cost, recursion, parser) {
|
|
|
5683
5675
|
const rec = (0, alias_1.min)(recursion, recursions.length);
|
|
5684
5676
|
if (rec > 0 && recursions[rec - 1] < 1) throw new Error('Too much recursion');
|
|
5685
5677
|
rec > 0 && --recursions[rec - 1];
|
|
5686
|
-
const result = parser(
|
|
5687
|
-
source,
|
|
5688
|
-
context
|
|
5689
|
-
});
|
|
5678
|
+
const result = parser(input);
|
|
5690
5679
|
rec > 0 && ++recursions[rec - 1];
|
|
5691
5680
|
if (result === undefined) return;
|
|
5692
5681
|
if (resources.clock < cost) throw new Error('Too many creations');
|
|
@@ -5696,10 +5685,10 @@ function creation(cost, recursion, parser) {
|
|
|
5696
5685
|
}
|
|
5697
5686
|
exports.creation = creation;
|
|
5698
5687
|
function precedence(precedence, parser) {
|
|
5699
|
-
return
|
|
5700
|
-
|
|
5701
|
-
|
|
5702
|
-
|
|
5688
|
+
return input => {
|
|
5689
|
+
const {
|
|
5690
|
+
context
|
|
5691
|
+
} = input;
|
|
5703
5692
|
const {
|
|
5704
5693
|
delimiters,
|
|
5705
5694
|
precedence: p = 0
|
|
@@ -5708,10 +5697,7 @@ function precedence(precedence, parser) {
|
|
|
5708
5697
|
context.precedence = precedence;
|
|
5709
5698
|
// デリミタはシフト後に設定しなければならない
|
|
5710
5699
|
shift && delimiters.shift(precedence);
|
|
5711
|
-
const result = parser(
|
|
5712
|
-
source,
|
|
5713
|
-
context
|
|
5714
|
-
});
|
|
5700
|
+
const result = parser(input);
|
|
5715
5701
|
shift && delimiters.unshift();
|
|
5716
5702
|
context.precedence = p;
|
|
5717
5703
|
return result;
|
|
@@ -5723,16 +5709,13 @@ function state(state, positive, parser) {
|
|
|
5723
5709
|
parser = positive;
|
|
5724
5710
|
positive = true;
|
|
5725
5711
|
}
|
|
5726
|
-
return
|
|
5727
|
-
|
|
5728
|
-
|
|
5729
|
-
|
|
5712
|
+
return input => {
|
|
5713
|
+
const {
|
|
5714
|
+
context
|
|
5715
|
+
} = input;
|
|
5730
5716
|
const s = context.state ?? 0;
|
|
5731
5717
|
context.state = positive ? s | state : s & ~state;
|
|
5732
|
-
const result = parser(
|
|
5733
|
-
source,
|
|
5734
|
-
context
|
|
5735
|
-
});
|
|
5718
|
+
const result = parser(input);
|
|
5736
5719
|
context.state = s;
|
|
5737
5720
|
return result;
|
|
5738
5721
|
};
|
|
@@ -5743,15 +5726,12 @@ function constraint(state, positive, parser) {
|
|
|
5743
5726
|
parser = positive;
|
|
5744
5727
|
positive = true;
|
|
5745
5728
|
}
|
|
5746
|
-
return
|
|
5747
|
-
|
|
5748
|
-
context
|
|
5749
|
-
}) => {
|
|
5750
|
-
const s = positive ? state & context.state : state & ~context.state;
|
|
5751
|
-
return s === state ? parser({
|
|
5752
|
-
source,
|
|
5729
|
+
return input => {
|
|
5730
|
+
const {
|
|
5753
5731
|
context
|
|
5754
|
-
}
|
|
5732
|
+
} = input;
|
|
5733
|
+
const s = positive ? state & context.state : state & ~context.state;
|
|
5734
|
+
return s === state ? parser(input) : undefined;
|
|
5755
5735
|
};
|
|
5756
5736
|
}
|
|
5757
5737
|
exports.constraint = constraint;
|
|
@@ -5775,9 +5755,11 @@ const dom_1 = __webpack_require__(394);
|
|
|
5775
5755
|
// https://example/hashtags/a must be a hashtag page or a redirect page going there.
|
|
5776
5756
|
// https://github.com/tc39/proposal-regexp-unicode-property-escapes#matching-emoji
|
|
5777
5757
|
exports.emoji = String.raw`\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F`;
|
|
5778
|
-
exports.hashtag = (0, combinator_1.lazy)(() => (0, combinator_1.
|
|
5758
|
+
exports.hashtag = (0, combinator_1.lazy)(() => (0, combinator_1.rewrite)((0, combinator_1.open)('#', (0, source_1.str)(new RegExp([/^(?!['_])(?=(?:[0-9]{1,9})?(?:[^\d\p{C}\p{S}\p{P}\s]|emoji|'|_(?=[^\p{C}\p{S}\p{P}\s]|emoji|')))/u.source, /(?:[^\p{C}\p{S}\p{P}\s]|emoji|'|_(?=[^\p{C}\p{S}\p{P}\s]|emoji|'))+/u.source].join('').replace(/emoji/g, exports.emoji), 'u'))), (0, combinator_1.union)([(0, combinator_1.constraint)(1 /* State.autolink */, false, (0, combinator_1.state)(1 /* State.autolink */, (0, combinator_1.fmap)((0, combinator_1.convert)(source => `[${source}]{ ${`/hashtags/${source.slice(1)}`} }`, link_1.unsafelink), ([el]) => [(0, dom_1.define)(el, {
|
|
5779
5759
|
class: 'hashtag'
|
|
5780
|
-
})]))
|
|
5760
|
+
})]))), ({
|
|
5761
|
+
source
|
|
5762
|
+
}) => [[source], '']])));
|
|
5781
5763
|
|
|
5782
5764
|
/***/ },
|
|
5783
5765
|
|
|
@@ -5899,12 +5881,14 @@ const combinator_1 = __webpack_require__(3484);
|
|
|
5899
5881
|
const source_1 = __webpack_require__(8745);
|
|
5900
5882
|
const dom_1 = __webpack_require__(394);
|
|
5901
5883
|
// https://html.spec.whatwg.org/multipage/input.html
|
|
5902
|
-
exports.email = (0, combinator_1.
|
|
5884
|
+
exports.email = (0, combinator_1.creation)(1, 0 /* Recursion.ignore */, (0, combinator_1.rewrite)((0, combinator_1.verify)((0, source_1.str)(/^[0-9a-z](?:[_.+-](?=[0-9a-z])|[0-9a-z]){0,255}@[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])?)*(?![0-9a-z])/i), ([source]) => source.length <= 255), (0, combinator_1.union)([(0, combinator_1.constraint)(1 /* State.autolink */, false, (0, combinator_1.state)(1 /* State.autolink */, ({
|
|
5903
5885
|
source
|
|
5904
5886
|
}) => [[(0, dom_1.html)('a', {
|
|
5905
5887
|
class: 'email',
|
|
5906
5888
|
href: `mailto:${source}`
|
|
5907
|
-
}, source)], '']))
|
|
5889
|
+
}, source)], ''])), ({
|
|
5890
|
+
source
|
|
5891
|
+
}) => [[source], '']])));
|
|
5908
5892
|
|
|
5909
5893
|
/***/ },
|
|
5910
5894
|
|
|
@@ -6045,12 +6029,12 @@ const array_1 = __webpack_require__(6876);
|
|
|
6045
6029
|
const dom_1 = __webpack_require__(394);
|
|
6046
6030
|
// Don't use the symbols already used: !#$%@&*+~=|
|
|
6047
6031
|
// All syntax surrounded by square brackets shouldn't contain line breaks.
|
|
6048
|
-
exports.placeholder = (0, combinator_1.lazy)(() => (0, combinator_1.
|
|
6032
|
+
exports.placeholder = (0, combinator_1.lazy)(() => (0, combinator_1.creation)(1, 4 /* Recursion.inline */, (0, combinator_1.surround)((0, source_1.str)(/^\[[:^|]/), (0, combinator_1.precedence)(1, (0, visibility_1.startTight)((0, combinator_1.some)((0, combinator_1.union)([inline_1.inline]), ']', [[']', 1]]))), (0, source_1.str)(']'), false, ([, bs], rest) => [[(0, dom_1.html)('span', {
|
|
6049
6033
|
class: 'invalid',
|
|
6050
6034
|
'data-invalid-syntax': 'extension',
|
|
6051
6035
|
'data-invalid-type': 'syntax',
|
|
6052
6036
|
'data-invalid-message': `Invalid start symbol or linebreak`
|
|
6053
|
-
}, (0, dom_1.defrag)(bs))], rest], ([as, bs], rest) => [(0, array_1.unshift)(as, bs), rest], 3 | 4 /* Backtrack.bracket */)))
|
|
6037
|
+
}, (0, dom_1.defrag)(bs))], rest], ([as, bs], rest) => [(0, array_1.unshift)(as, bs), rest], 3 | 4 /* Backtrack.bracket */)));
|
|
6054
6038
|
|
|
6055
6039
|
/***/ },
|
|
6056
6040
|
|
|
@@ -6207,10 +6191,10 @@ function startTight(parser, except) {
|
|
|
6207
6191
|
return input => isStartTight(input, except) ? parser(input) : undefined;
|
|
6208
6192
|
}
|
|
6209
6193
|
exports.startTight = startTight;
|
|
6210
|
-
const isStartTight = (0, memoize_1.reduce)(({
|
|
6211
|
-
|
|
6212
|
-
|
|
6213
|
-
}
|
|
6194
|
+
const isStartTight = (0, memoize_1.reduce)((input, except) => {
|
|
6195
|
+
const {
|
|
6196
|
+
source
|
|
6197
|
+
} = input;
|
|
6214
6198
|
if (source === '') return true;
|
|
6215
6199
|
if (except && source.slice(0, except.length) === except) return false;
|
|
6216
6200
|
switch (source[0]) {
|
|
@@ -6223,10 +6207,7 @@ const isStartTight = (0, memoize_1.reduce)(({
|
|
|
6223
6207
|
return source[1]?.trimStart() !== '';
|
|
6224
6208
|
case '&':
|
|
6225
6209
|
switch (true) {
|
|
6226
|
-
case source.length > 2 && source[1] !== ' ' && (0, parser_1.eval)((0, htmlentity_1.unsafehtmlentity)(
|
|
6227
|
-
source,
|
|
6228
|
-
context
|
|
6229
|
-
}))?.[0]?.trimStart() === '':
|
|
6210
|
+
case source.length > 2 && source[1] !== ' ' && (0, parser_1.eval)((0, htmlentity_1.unsafehtmlentity)(input))?.[0]?.trimStart() === '':
|
|
6230
6211
|
return false;
|
|
6231
6212
|
}
|
|
6232
6213
|
return true;
|
|
@@ -6745,7 +6726,7 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
6745
6726
|
exports.lazy = void 0;
|
|
6746
6727
|
function lazy(builder) {
|
|
6747
6728
|
let parser;
|
|
6748
|
-
return input => (parser
|
|
6729
|
+
return input => parser !== undefined ? parser(input) : (parser = builder())(input);
|
|
6749
6730
|
}
|
|
6750
6731
|
exports.lazy = lazy;
|
|
6751
6732
|
|
|
@@ -6988,7 +6969,7 @@ const source_1 = __webpack_require__(8745);
|
|
|
6988
6969
|
const visibility_1 = __webpack_require__(6364);
|
|
6989
6970
|
const array_1 = __webpack_require__(6876);
|
|
6990
6971
|
const dom_1 = __webpack_require__(394);
|
|
6991
|
-
exports.ruby = (0, combinator_1.lazy)(() => (0, combinator_1.
|
|
6972
|
+
exports.ruby = (0, combinator_1.lazy)(() => (0, combinator_1.creation)(1, 0 /* Recursion.ignore */, (0, combinator_1.fmap)((0, combinator_1.sequence)([(0, combinator_1.bind)((0, combinator_1.surround)('[', (0, source_1.str)(/^(?:\\[^\n]|[^\\[\](){}"\n])+/), ']', false, undefined, undefined, 3 | 20 /* Backtrack.ruby */), ([source], rest, context) => {
|
|
6992
6973
|
const ns = (0, parser_1.eval)(text({
|
|
6993
6974
|
source,
|
|
6994
6975
|
context
|
|
@@ -7010,7 +6991,7 @@ exports.ruby = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('[', (0,
|
|
|
7010
6991
|
default:
|
|
7011
6992
|
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', ')')])))];
|
|
7012
6993
|
}
|
|
7013
|
-
})))
|
|
6994
|
+
})));
|
|
7014
6995
|
const text = (0, combinator_1.creation)(1, 0 /* Recursion.ignore */, ({
|
|
7015
6996
|
source,
|
|
7016
6997
|
context
|
|
@@ -7635,10 +7616,11 @@ function focus(scope, parser) {
|
|
|
7635
7616
|
}
|
|
7636
7617
|
exports.focus = focus;
|
|
7637
7618
|
function rewrite(scope, parser) {
|
|
7638
|
-
return
|
|
7639
|
-
|
|
7640
|
-
|
|
7641
|
-
|
|
7619
|
+
return input => {
|
|
7620
|
+
const {
|
|
7621
|
+
source,
|
|
7622
|
+
context
|
|
7623
|
+
} = input;
|
|
7642
7624
|
if (source === '') return;
|
|
7643
7625
|
const {
|
|
7644
7626
|
logger
|
|
@@ -7646,10 +7628,7 @@ function rewrite(scope, parser) {
|
|
|
7646
7628
|
context.logger = {};
|
|
7647
7629
|
//const { resources = { clock: 0 } } = context;
|
|
7648
7630
|
//const clock = resources.clock;
|
|
7649
|
-
const res1 = scope(
|
|
7650
|
-
source,
|
|
7651
|
-
context
|
|
7652
|
-
});
|
|
7631
|
+
const res1 = scope(input);
|
|
7653
7632
|
//resources.clock = clock;
|
|
7654
7633
|
context.logger = logger;
|
|
7655
7634
|
if (res1 === undefined || (0, parser_1.exec)(res1).length >= source.length) return;
|
|
@@ -7698,10 +7677,55 @@ const emphasis_1 = __webpack_require__(1354);
|
|
|
7698
7677
|
const math_1 = __webpack_require__(2962);
|
|
7699
7678
|
const code_1 = __webpack_require__(3481);
|
|
7700
7679
|
const htmlentity_1 = __webpack_require__(470);
|
|
7701
|
-
const autolink_1 = __webpack_require__(8072);
|
|
7702
7680
|
const bracket_1 = __webpack_require__(4526);
|
|
7681
|
+
const autolink_1 = __webpack_require__(8072);
|
|
7703
7682
|
const source_1 = __webpack_require__(8745);
|
|
7704
|
-
exports.inline = (0, combinator_1.lazy)(() => (0, combinator_1.union)([
|
|
7683
|
+
exports.inline = (0, combinator_1.lazy)(() => (0, combinator_1.union)([input => {
|
|
7684
|
+
const {
|
|
7685
|
+
source
|
|
7686
|
+
} = input;
|
|
7687
|
+
if (source === '') return;
|
|
7688
|
+
switch (source.slice(0, 2)) {
|
|
7689
|
+
case '((':
|
|
7690
|
+
return (0, annotation_1.annotation)(input);
|
|
7691
|
+
case '[[':
|
|
7692
|
+
return (0, reference_1.reference)(input) || (0, link_1.textlink)(input);
|
|
7693
|
+
case '{{':
|
|
7694
|
+
return (0, template_1.template)(input);
|
|
7695
|
+
case '[%':
|
|
7696
|
+
return (0, remark_1.remark)(input) || (0, link_1.textlink)(input);
|
|
7697
|
+
case '[#':
|
|
7698
|
+
case '[$':
|
|
7699
|
+
case '[:':
|
|
7700
|
+
case '[^':
|
|
7701
|
+
case '[|':
|
|
7702
|
+
return (0, extension_1.extension)(input) || (0, link_1.textlink)(input);
|
|
7703
|
+
case '${':
|
|
7704
|
+
return (0, math_1.math)(input);
|
|
7705
|
+
case '++':
|
|
7706
|
+
return (0, insertion_1.insertion)(input);
|
|
7707
|
+
case '~~':
|
|
7708
|
+
return (0, deletion_1.deletion)(input);
|
|
7709
|
+
case '==':
|
|
7710
|
+
return (0, mark_1.mark)(input);
|
|
7711
|
+
}
|
|
7712
|
+
switch (source[0]) {
|
|
7713
|
+
case '[':
|
|
7714
|
+
return (0, ruby_1.ruby)(input) || (0, link_1.textlink)(input);
|
|
7715
|
+
case '{':
|
|
7716
|
+
return (0, link_1.textlink)(input);
|
|
7717
|
+
case '<':
|
|
7718
|
+
return (0, html_1.html)(input);
|
|
7719
|
+
case '$':
|
|
7720
|
+
return (0, extension_1.extension)(input) || (0, math_1.math)(input);
|
|
7721
|
+
case '`':
|
|
7722
|
+
return (0, code_1.code)(input);
|
|
7723
|
+
case '*':
|
|
7724
|
+
return (0, emstrong_1.emstrong)(input) || (0, strong_1.strong)(input) || (0, emphasis_1.emphasis)(input);
|
|
7725
|
+
case '&':
|
|
7726
|
+
return (0, htmlentity_1.htmlentity)(input);
|
|
7727
|
+
}
|
|
7728
|
+
}, bracket_1.bracket, autolink_1.autolink, source_1.text]));
|
|
7705
7729
|
var indexee_1 = __webpack_require__(7610);
|
|
7706
7730
|
Object.defineProperty(exports, "indexee", ({
|
|
7707
7731
|
enumerable: true,
|
|
@@ -7974,15 +7998,12 @@ exports.block = void 0;
|
|
|
7974
7998
|
const parser_1 = __webpack_require__(605);
|
|
7975
7999
|
const line_1 = __webpack_require__(8287);
|
|
7976
8000
|
function block(parser, separation = true) {
|
|
7977
|
-
return
|
|
7978
|
-
|
|
7979
|
-
|
|
7980
|
-
|
|
8001
|
+
return input => {
|
|
8002
|
+
const {
|
|
8003
|
+
source
|
|
8004
|
+
} = input;
|
|
7981
8005
|
if (source === '') return;
|
|
7982
|
-
const result = parser(
|
|
7983
|
-
source,
|
|
7984
|
-
context
|
|
7985
|
-
});
|
|
8006
|
+
const result = parser(input);
|
|
7986
8007
|
if (result === undefined) return;
|
|
7987
8008
|
const rest = (0, parser_1.exec)(result);
|
|
7988
8009
|
if (separation && !(0, line_1.isBlank)((0, line_1.firstline)(rest))) return;
|
|
@@ -8163,9 +8184,11 @@ const dom_1 = __webpack_require__(394);
|
|
|
8163
8184
|
// cid: YYYY-MMDD-HHMM-SSmmm
|
|
8164
8185
|
// 内部表現はUnixTimeに統一する(時系列順)
|
|
8165
8186
|
// 外部表現は投稿ごとに投稿者の投稿時のタイムゾーンに統一する(非時系列順)
|
|
8166
|
-
exports.anchor = (0, combinator_1.lazy)(() => (0, combinator_1.
|
|
8187
|
+
exports.anchor = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('>>', (0, combinator_1.focus)(/^>>(?:[a-z][0-9a-z]*(?:-[0-9a-z]+)*\/)?[0-9a-z]+(?:-[0-9a-z]+)*(?![0-9a-z@#:])/i, (0, combinator_1.union)([(0, combinator_1.constraint)(1 /* State.autolink */, false, (0, combinator_1.state)(1 /* State.autolink */, (0, combinator_1.fmap)((0, combinator_1.convert)(source => `[${source}]{ ${source.includes('/') ? `/@${source.slice(2).replace('/', '/timeline?at=')}` : `?at=${source.slice(2)}`} }`, link_1.unsafelink), ([el]) => [(0, dom_1.define)(el, {
|
|
8167
8188
|
class: 'anchor'
|
|
8168
|
-
})]))
|
|
8189
|
+
})]))), ({
|
|
8190
|
+
source
|
|
8191
|
+
}) => [[source], '']]))));
|
|
8169
8192
|
|
|
8170
8193
|
/***/ },
|
|
8171
8194
|
|
|
@@ -8469,10 +8492,12 @@ const link_1 = __webpack_require__(3628);
|
|
|
8469
8492
|
const hashtag_1 = __webpack_require__(5764);
|
|
8470
8493
|
const source_1 = __webpack_require__(8745);
|
|
8471
8494
|
const dom_1 = __webpack_require__(394);
|
|
8472
|
-
exports.hashnum = (0, combinator_1.lazy)(() => (0, combinator_1.
|
|
8495
|
+
exports.hashnum = (0, combinator_1.lazy)(() => (0, combinator_1.rewrite)((0, combinator_1.open)('#', (0, source_1.str)(new RegExp(/^[0-9]{1,9}(?![^\p{C}\p{S}\p{P}\s]|emoji|['_])/u.source.replace(/emoji/, hashtag_1.emoji), 'u'))), (0, combinator_1.union)([(0, combinator_1.constraint)(1 /* State.autolink */, false, (0, combinator_1.state)(1 /* State.autolink */, (0, combinator_1.fmap)((0, combinator_1.convert)(source => `[${source}]{ ${source.slice(1)} }`, link_1.unsafelink), ([el]) => [(0, dom_1.define)(el, {
|
|
8473
8496
|
class: 'hashnum',
|
|
8474
8497
|
href: null
|
|
8475
|
-
})]))
|
|
8498
|
+
})]))), ({
|
|
8499
|
+
source
|
|
8500
|
+
}) => [[source], '']])));
|
|
8476
8501
|
|
|
8477
8502
|
/***/ },
|
|
8478
8503
|
|
|
@@ -8668,11 +8693,11 @@ const source_1 = __webpack_require__(8745);
|
|
|
8668
8693
|
const memoize_1 = __webpack_require__(6925);
|
|
8669
8694
|
const array_1 = __webpack_require__(6876);
|
|
8670
8695
|
const dom_1 = __webpack_require__(394);
|
|
8671
|
-
exports.remark = (0, combinator_1.lazy)(() => (0, combinator_1.
|
|
8696
|
+
exports.remark = (0, combinator_1.lazy)(() => (0, combinator_1.creation)(1, 4 /* Recursion.inline */, (0, combinator_1.match)(/^\[(%+)\s/, (0, memoize_1.memoize)(([, fence]) => (0, combinator_1.surround)((0, source_1.str)(`[${fence}`), (0, combinator_1.precedence)(4, (0, combinator_1.some)((0, combinator_1.union)([inline_1.inline]), new RegExp(String.raw`^\s+${fence}\]`), [[new RegExp(String.raw`^\s+${fence}\]`), 4]])), (0, combinator_1.close)((0, combinator_1.some)(source_1.text, '%'), (0, source_1.str)(`${fence}]`)), true, ([as, bs = [], cs], rest) => [[(0, dom_1.html)('span', {
|
|
8672
8697
|
class: 'remark'
|
|
8673
8698
|
}, [(0, dom_1.html)('input', {
|
|
8674
8699
|
type: 'checkbox'
|
|
8675
|
-
}), (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, {}))))
|
|
8700
|
+
}), (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, {}))));
|
|
8676
8701
|
|
|
8677
8702
|
/***/ },
|
|
8678
8703
|
|