securemark 0.232.2 → 0.233.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.233.2
4
+
5
+ - Refactoring.
6
+
7
+ ## 0.233.1
8
+
9
+ - Refactoring.
10
+
11
+ ## 0.233.0
12
+
13
+ - Refine comment parser.
14
+
3
15
  ## 0.232.2
4
16
 
5
17
  - Refactoring.
@@ -1,4 +1,4 @@
1
- /*! securemark v0.232.2 https://github.com/falsandtru/securemark | (c) 2017, falsandtru | UNLICENSED */
1
+ /*! securemark v0.233.2 https://github.com/falsandtru/securemark | (c) 2017, falsandtru | UNLICENSED */
2
2
  require = function () {
3
3
  function r(e, n, t) {
4
4
  function o(i, f) {
@@ -4467,22 +4467,19 @@ require = function () {
4467
4467
  const typed_dom_1 = _dereq_('typed-dom');
4468
4468
  const url_1 = _dereq_('spica/url');
4469
4469
  function parse(source, opts = {}, context) {
4470
- var _a, _b, _c, _d, _e, _f, _g, _h;
4470
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
4471
4471
  if (!(0, segment_1.validate)(source, segment_1.MAX_SEGMENT_SIZE))
4472
4472
  throw new Error(`Too large input over ${ segment_1.MAX_SEGMENT_SIZE.toLocaleString('en') } bytes.`);
4473
4473
  const url = (_b = (_a = (0, header_2.headers)(source).find(field => field.toLowerCase().startsWith('url:'))) === null || _a === void 0 ? void 0 : _a.slice(4).trim()) !== null && _b !== void 0 ? _b : '';
4474
4474
  source = !context ? (0, normalize_1.normalize)(source) : source;
4475
- context = context && url === '' && context.id === opts.id ? context : (0, alias_1.ObjectAssign)({
4476
- ...context,
4477
- ...opts
4478
- }, {
4475
+ context = context && url === '' && context.id === opts.id ? context : (0, alias_1.ObjectAssign)((0, alias_1.ObjectCreate)(context !== null && context !== void 0 ? context : {}), opts, {
4479
4476
  host: (_d = (_c = opts.host) !== null && _c !== void 0 ? _c : context === null || context === void 0 ? void 0 : context.host) !== null && _d !== void 0 ? _d : new url_1.ReadonlyURL(global_1.location.pathname, global_1.location.origin),
4480
4477
  url: url ? new url_1.ReadonlyURL(url) : context === null || context === void 0 ? void 0 : context.url,
4481
4478
  id: (_e = opts.id) !== null && _e !== void 0 ? _e : context === null || context === void 0 ? void 0 : context.id,
4482
4479
  footnotes: global_1.undefined,
4483
4480
  test: global_1.undefined
4484
4481
  });
4485
- if (((_f = context.host) === null || _f === void 0 ? void 0 : _f.origin) === 'null')
4482
+ if (((_g = context.host) === null || _g === void 0 ? void 0 : _g.origin) === 'null')
4486
4483
  throw new Error(`Invalid host: ${ context.host.href }`);
4487
4484
  const node = (0, typed_dom_1.frag)();
4488
4485
  let index = 0;
@@ -4861,7 +4858,7 @@ require = function () {
4861
4858
  'data-invalid-description': 'Missing the title at the first line.'
4862
4859
  }, `${ opener }${ body }${ closer }`)];
4863
4860
  return [(0, typed_dom_1.html)('aside', {
4864
- id: (0, indexee_1.identity)(heading),
4861
+ id: (0, indexee_1.identity)((0, indexee_1.text)(heading)),
4865
4862
  class: 'aside'
4866
4863
  }, [
4867
4864
  document,
@@ -5307,9 +5304,9 @@ require = function () {
5307
5304
  let [, rowspan = global_1.undefined, colspan = global_1.undefined, highlight = global_1.undefined] = (_a = source.match(/^.(?:(\d+)?:(\d+)?)?(!+)?$/)) !== null && _a !== void 0 ? _a : [];
5308
5305
  rowspan === '1' ? rowspan = global_1.undefined : global_1.undefined;
5309
5306
  colspan === '1' ? colspan = global_1.undefined : global_1.undefined;
5310
- rowspan && (rowspan = (0, alias_1.max)(0, (0, alias_1.min)(+rowspan, 65534)) + '');
5311
- colspan && (colspan = (0, alias_1.max)(0, (0, alias_1.min)(+colspan, 1000)) + '');
5312
- highlight && (highlight = highlight.length > 0 ? highlight.length + '' : global_1.undefined);
5307
+ rowspan && (rowspan = `${ (0, alias_1.max)(0, (0, alias_1.min)(+rowspan, 65534)) }`);
5308
+ colspan && (colspan = `${ (0, alias_1.max)(0, (0, alias_1.min)(+colspan, 1000)) }`);
5309
+ highlight && (highlight = highlight.length > 0 ? `${ highlight.length }` : global_1.undefined);
5313
5310
  const valid = !highlight || source[0] === '#' && +highlight <= 1 || source[0] === ':' && +highlight <= 6;
5314
5311
  return {
5315
5312
  class: valid ? highlight && 'highlight' : 'invalid',
@@ -5625,7 +5622,7 @@ require = function () {
5625
5622
  } = {}
5626
5623
  }) => {
5627
5624
  var _a;
5628
- return [delim.length === 2 && closer && param.trimStart() === '' ? ((_a = cache === null || cache === void 0 ? void 0 : cache.get(`\n${ body }`)) === null || _a === void 0 ? void 0 : _a.cloneNode(true)) || (0, typed_dom_1.html)('div', {
5625
+ return [delim.length === 2 && closer && param.trimStart() === '' ? ((_a = cache === null || cache === void 0 ? void 0 : cache.get(`${ delim }\n${ body }${ delim }`)) === null || _a === void 0 ? void 0 : _a.cloneNode(true)) || (0, typed_dom_1.html)('div', {
5629
5626
  class: 'math',
5630
5627
  translate: 'no'
5631
5628
  }, `${ delim }\n${ body }${ delim }`) : (0, typed_dom_1.html)('pre', {
@@ -5851,7 +5848,7 @@ require = function () {
5851
5848
  (0, combinator_1.validate)(new RegExp(`${ anchor_1.syntax.source }[^\S\n]*(?:$|\n)`), anchor_1.anchor)
5852
5849
  ]))), ([el, quotes = '']) => [
5853
5850
  (0, typed_dom_1.html)('span', { class: 'cite' }, (0, typed_dom_1.defrag)([
5854
- quotes + '>',
5851
+ `${ quotes }>`,
5855
5852
  (0, typed_dom_1.define)(el, { 'data-depth': `${ quotes.length + 1 }` }, el.innerText.slice(1))
5856
5853
  ])),
5857
5854
  (0, typed_dom_1.html)('br')
@@ -6146,11 +6143,11 @@ require = function () {
6146
6143
  const annotation_1 = _dereq_('./inline/annotation');
6147
6144
  const reference_1 = _dereq_('./inline/reference');
6148
6145
  const template_1 = _dereq_('./inline/template');
6146
+ const comment_1 = _dereq_('./inline/comment');
6149
6147
  const extension_1 = _dereq_('./inline/extension');
6150
6148
  const ruby_1 = _dereq_('./inline/ruby');
6151
6149
  const link_1 = _dereq_('./inline/link');
6152
6150
  const html_1 = _dereq_('./inline/html');
6153
- const comment_1 = _dereq_('./inline/comment');
6154
6151
  const insertion_1 = _dereq_('./inline/insertion');
6155
6152
  const deletion_1 = _dereq_('./inline/deletion');
6156
6153
  const mark_1 = _dereq_('./inline/mark');
@@ -6170,12 +6167,12 @@ require = function () {
6170
6167
  annotation_1.annotation,
6171
6168
  reference_1.reference,
6172
6169
  template_1.template,
6170
+ comment_1.comment,
6173
6171
  extension_1.extension,
6174
6172
  ruby_1.ruby,
6175
6173
  link_1.link,
6176
6174
  media_1.media,
6177
6175
  html_1.html,
6178
- comment_1.comment,
6179
6176
  insertion_1.insertion,
6180
6177
  deletion_1.deletion,
6181
6178
  mark_1.mark,
@@ -6606,52 +6603,28 @@ require = function () {
6606
6603
  'use strict';
6607
6604
  Object.defineProperty(exports, '__esModule', { value: true });
6608
6605
  exports.comment = void 0;
6609
- const combinator_1 = _dereq_('../../combinator');
6610
6606
  const parser_1 = _dereq_('../../combinator/data/parser');
6611
- const htmlentity_1 = _dereq_('./htmlentity');
6607
+ const combinator_1 = _dereq_('../../combinator');
6608
+ const inline_1 = _dereq_('../inline');
6612
6609
  const source_1 = _dereq_('../source');
6613
6610
  const typed_dom_1 = _dereq_('typed-dom');
6614
- exports.comment = (0, combinator_1.creator)((0, combinator_1.validate)('[#', (0, combinator_1.match)(/^\[(#+)(?!\S|\s+\1\]|\s*\[\1(?:$|\s))((?:\s+\S+)+?)(?:\s+(\1\])|\s*(?=\[\1(?:$|\s)))/, ([whole, , body, closer]) => (rest, context) => {
6615
- [whole, body] = `${ whole }\0${ body.trimStart() }`.replace(/\x1B/g, '').split('\0', 2);
6616
- if (!closer)
6617
- return [
6618
- [(0, typed_dom_1.html)('sup', {
6619
- class: 'comment invalid',
6620
- 'data-invalid-syntax': 'comment',
6621
- 'data-invalid-type': 'content',
6622
- 'data-invalid-description': 'Comment syntax using the same level cannot start in another comment syntax.'
6623
- }, whole)],
6624
- rest
6625
- ];
6626
- const title = (0, parser_1.eval)((0, combinator_1.some)(text)(body, context), []).join('').trim();
6627
- if (title.includes('\0'))
6628
- return [
6629
- [(0, typed_dom_1.html)('sup', {
6630
- class: 'comment invalid',
6631
- 'data-invalid-syntax': 'comment',
6632
- 'data-invalid-type': 'content',
6633
- 'data-invalid-description': `Invalid HTML entitiy "${ title.match(/\0&[0-9A-Za-z]+;/)[0].slice(1) }".`
6634
- }, whole)],
6635
- rest
6636
- ];
6637
- return [
6638
- [(0, typed_dom_1.html)('sup', {
6639
- class: 'comment',
6640
- title
6641
- })],
6642
- rest
6643
- ];
6644
- })));
6645
- const text = (0, combinator_1.union)([
6646
- htmlentity_1.unsafehtmlentity,
6647
- source_1.unescsource
6648
- ]);
6611
+ const memoize_1 = _dereq_('spica/memoize');
6612
+ const array_1 = _dereq_('spica/array');
6613
+ exports.comment = (0, combinator_1.lazy)(() => (0, combinator_1.creator)((0, combinator_1.validate)('[#', (0, combinator_1.match)(/^(?=\[(#+)\s)/, (0, memoize_1.memoize)(([, fence], closer = new RegExp(String.raw`^\s+${ fence }\]`)) => (0, combinator_1.surround)((0, source_1.str)(/^\[(\S+)\s+(?!\1\])/), (0, combinator_1.union)([(0, combinator_1.some)(inline_1.inline, closer)]), (0, source_1.str)(closer), true, ([, bs = []], rest) => [
6614
+ [(0, typed_dom_1.html)('span', { class: 'comment' }, (0, typed_dom_1.defrag)((0, array_1.push)((0, array_1.unshift)([`[${ fence } `], bs), [` ${ fence }]`])))],
6615
+ rest
6616
+ ], ([as, bs = []], rest, context) => [
6617
+ (0, array_1.unshift)((0, array_1.pop)((0, parser_1.eval)((0, combinator_1.some)(source_1.text)(`${ as[0] }!`, context)))[0], bs),
6618
+ rest
6619
+ ]), ([, fence]) => fence)))));
6649
6620
  },
6650
6621
  {
6651
6622
  '../../combinator': 27,
6652
6623
  '../../combinator/data/parser': 47,
6624
+ '../inline': 88,
6653
6625
  '../source': 128,
6654
- './htmlentity': 112,
6626
+ 'spica/array': 6,
6627
+ 'spica/memoize': 18,
6655
6628
  'typed-dom': 26
6656
6629
  }
6657
6630
  ],
@@ -6890,7 +6863,7 @@ require = function () {
6890
6863
  source_1.txt
6891
6864
  ]), ']', /^\\?\n/))), ns => [(0, typed_dom_1.html)('span', {
6892
6865
  class: 'indexer',
6893
- 'data-index': (0, indexee_1.identify)((0, array_1.join)(ns).trim()).slice(6)
6866
+ 'data-index': (0, indexee_1.identity)((0, array_1.join)(ns)).slice(6)
6894
6867
  })])));
6895
6868
  const bracket = (0, combinator_1.lazy)(() => (0, combinator_1.creator)((0, combinator_1.union)([
6896
6869
  (0, combinator_1.surround)((0, source_1.str)('('), (0, combinator_1.some)((0, combinator_1.union)([
@@ -6923,45 +6896,51 @@ require = function () {
6923
6896
  function (_dereq_, module, exports) {
6924
6897
  'use strict';
6925
6898
  Object.defineProperty(exports, '__esModule', { value: true });
6926
- exports.identify = exports.text = exports.identity = exports.indexee = void 0;
6899
+ exports.text = exports.identity = exports.indexee = void 0;
6927
6900
  const global_1 = _dereq_('spica/global');
6928
6901
  const combinator_1 = _dereq_('../../../combinator');
6929
6902
  const typed_dom_1 = _dereq_('typed-dom');
6930
6903
  function indexee(parser) {
6931
- return (0, combinator_1.fmap)(parser, ([el], _, {id}) => [(0, typed_dom_1.define)(el, { id: id !== '' && identity(el) || global_1.undefined })]);
6904
+ return (0, combinator_1.fmap)(parser, ([el], _, {id}) => [(0, typed_dom_1.define)(el, { id: id !== '' && identity(text(el)) || global_1.undefined })]);
6932
6905
  }
6933
6906
  exports.indexee = indexee;
6934
- function identity(source) {
6935
- return identify(text(source).trim());
6907
+ function identity(text) {
6908
+ text && (text = text.trim());
6909
+ return text && `index:${ text.replace(/\s+/g, '_').slice(0, 101).replace(/^(.{97}).{4}$/, '$1...') }`;
6936
6910
  }
6937
6911
  exports.identity = identity;
6938
6912
  function text(source) {
6913
+ var _a;
6939
6914
  const indexer = source.querySelector('.indexer');
6940
6915
  if (indexer)
6941
6916
  return indexer.getAttribute('data-index');
6942
6917
  const target = source.cloneNode(true);
6943
- for (let es = target.querySelectorAll('code[data-src], .math[data-src], rt, rp, .reference'), i = 0, len = es.length; i < len; ++i) {
6918
+ for (let es = target.querySelectorAll('code[data-src], .math[data-src], .comment, rt, rp, .reference'), i = 0, len = es.length; i < len; ++i) {
6944
6919
  const el = es[i];
6945
6920
  switch (el.tagName) {
6921
+ case 'CODE':
6922
+ (0, typed_dom_1.define)(el, el.getAttribute('data-src'));
6923
+ continue;
6946
6924
  case 'RT':
6947
6925
  case 'RP':
6948
6926
  el.remove();
6949
6927
  continue;
6950
- case 'SUP':
6951
- el.firstChild.remove();
6952
- continue;
6953
- default:
6928
+ }
6929
+ switch (el.className) {
6930
+ case 'math':
6954
6931
  (0, typed_dom_1.define)(el, el.getAttribute('data-src'));
6955
6932
  continue;
6933
+ case 'comment':
6934
+ el.remove();
6935
+ continue;
6936
+ case 'reference':
6937
+ el.firstChild.remove();
6938
+ continue;
6956
6939
  }
6957
6940
  }
6958
6941
  return target.textContent;
6959
6942
  }
6960
6943
  exports.text = text;
6961
- function identify(index) {
6962
- return index ? `index:${ index.replace(/\s+/g, '_').slice(0, 101).replace(/^(.{97}).{4}$/, '$1...') }` : '';
6963
- }
6964
- exports.identify = identify;
6965
6944
  },
6966
6945
  {
6967
6946
  '../../../combinator': 27,
@@ -7699,7 +7678,7 @@ require = function () {
7699
7678
  class: 'reference',
7700
7679
  'data-abbr': (0, util_1.stringify)([ns.shift()]).trimEnd()
7701
7680
  } : ns[0] === '' ? {
7702
- class: 'reference invalid',
7681
+ class: 'invalid',
7703
7682
  'data-invalid-syntax': 'reference',
7704
7683
  'data-invalid-type': 'syntax',
7705
7684
  'data-invalid-description': 'Invalid abbr.'
@@ -8178,7 +8157,7 @@ require = function () {
8178
8157
  } else {
8179
8158
  (_b = ref.lastChild) === null || _b === void 0 ? void 0 : _b.remove();
8180
8159
  }
8181
- const title = global_1.undefined || titles.get(identifier) || +identifier[0] && ref.title || (0, indexee_1.text)(content).trim() || global_1.undefined;
8160
+ const title = global_1.undefined || titles.get(identifier) || +identifier[0] && ref.title || (0, indexee_1.text)(content).trim() || content.textContent.trim() || global_1.undefined;
8182
8161
  title ? !titles.has(identifier) && titles.set(identifier, title) : buffer.set(identifier, ref);
8183
8162
  const blank = !!abbr && !content.firstChild;
8184
8163
  const refIndex = i + 1;
@@ -8658,7 +8637,6 @@ require = function () {
8658
8637
  const global_1 = _dereq_('spica/global');
8659
8638
  const parser_1 = _dereq_('../combinator/data/parser');
8660
8639
  const combinator_1 = _dereq_('../combinator');
8661
- const comment_1 = _dereq_('./inline/comment');
8662
8640
  const htmlentity_1 = _dereq_('./inline/htmlentity');
8663
8641
  const source_1 = _dereq_('./source');
8664
8642
  const array_1 = _dereq_('spica/array');
@@ -8696,10 +8674,10 @@ require = function () {
8696
8674
  'InvisibleComma',
8697
8675
  'ic'
8698
8676
  ];
8699
- const blankline = new RegExp(String.raw`^(?!$)(?:\\$|\\?[^\S\n]|&(?:${ invisibleHTMLEntityNames.join('|') });|<wbr>|\[(#+)(?!\S|\s+\1\]|\s*\[\1(?:$|\s))((?:\s+\S+)+?)(?:\s+(\1\])|\s*(?=\[\1(?:$|\s))))+(?=$|(\S))`, 'gm');
8677
+ const blankline = new RegExp(String.raw`^(?!$)(?:\\$|\\?[^\S\n]|&(?:${ invisibleHTMLEntityNames.join('|') });|<wbr>)+$`, 'gm');
8700
8678
  function visualize(parser) {
8701
8679
  return (0, combinator_1.union)([
8702
- (0, combinator_1.convert)(source => source.replace(blankline, (line, ...$) => !$[3] ? line.replace(/[\\&<\[]/g, '\x1B$&') : line), (0, combinator_1.verify)(parser, (ns, rest, context) => !rest && hasVisible(ns, context))),
8680
+ (0, combinator_1.convert)(source => source.replace(blankline, line => line.replace(/[\\&<]/g, '\x1B$&')), (0, combinator_1.verify)(parser, (ns, rest, context) => !rest && hasVisible(ns, context))),
8703
8681
  (0, combinator_1.some)((0, combinator_1.union)([
8704
8682
  source_1.linebreak,
8705
8683
  source_1.unescsource
@@ -8745,7 +8723,7 @@ require = function () {
8745
8723
  }
8746
8724
  exports.startTight = startTight;
8747
8725
  function isStartTight(source, context) {
8748
- var _a, _b, _c, _d, _e;
8726
+ var _a, _b, _c;
8749
8727
  if (source === '')
8750
8728
  return true;
8751
8729
  switch (source[0]) {
@@ -8769,12 +8747,6 @@ require = function () {
8769
8747
  return false;
8770
8748
  }
8771
8749
  return true;
8772
- case '[':
8773
- switch (true) {
8774
- case source.length >= 7 && source[1] === '#' && ((_d = (0, parser_1.eval)((0, comment_1.comment)(source, context))) === null || _d === void 0 ? void 0 : _d[0].className) === 'comment':
8775
- return false;
8776
- }
8777
- return true;
8778
8750
  default:
8779
8751
  return source[0].trimStart() !== '';
8780
8752
  }
@@ -8790,8 +8762,6 @@ require = function () {
8790
8762
  return true;
8791
8763
  for (let i = nodes.length; i--;) {
8792
8764
  const node = nodes[i];
8793
- if (typeof node === 'object' && node.className === 'comment')
8794
- continue;
8795
8765
  return isVisible(node, -1);
8796
8766
  }
8797
8767
  return false;
@@ -8817,8 +8787,6 @@ require = function () {
8817
8787
  return false;
8818
8788
  case 'SPAN':
8819
8789
  return node.className !== 'linebreak';
8820
- case 'SUP':
8821
- return node.className !== 'comment';
8822
8790
  default:
8823
8791
  return true;
8824
8792
  }
@@ -8832,8 +8800,6 @@ require = function () {
8832
8800
  for (let node = nodes[0]; nodes.length > 0 && !isVisible(node = nodes[0], 0);) {
8833
8801
  if (nodes.length === 1 && typeof node === 'object' && node.className === 'indexer')
8834
8802
  break;
8835
- if (typeof node === 'object' && node.className === 'comment')
8836
- break;
8837
8803
  if (typeof node === 'string') {
8838
8804
  const pos = node.length - node.trimStart().length;
8839
8805
  if (pos > 0) {
@@ -8848,8 +8814,6 @@ require = function () {
8848
8814
  function trimNodeEnd(nodes) {
8849
8815
  const skip = nodes.length > 0 && typeof nodes[nodes.length - 1] === 'object' && nodes[nodes.length - 1]['className'] === 'indexer' ? [nodes.pop()] : [];
8850
8816
  for (let node = nodes[0]; nodes.length > 0 && !isVisible(node = nodes[nodes.length - 1], -1);) {
8851
- if (typeof node === 'object' && node.className === 'comment')
8852
- break;
8853
8817
  if (typeof node === 'string') {
8854
8818
  const pos = node.trimEnd().length;
8855
8819
  if (pos > 0) {
@@ -8886,7 +8850,6 @@ require = function () {
8886
8850
  {
8887
8851
  '../combinator': 27,
8888
8852
  '../combinator/data/parser': 47,
8889
- './inline/comment': 100,
8890
8853
  './inline/htmlentity': 112,
8891
8854
  './source': 128,
8892
8855
  'spica/array': 6,
package/markdown.d.ts CHANGED
@@ -557,11 +557,11 @@ export namespace MarkdownParser {
557
557
  // abc
558
558
  Block<'reply'>,
559
559
  Parser<HTMLParagraphElement, Context, [
560
- Parser<string | HTMLElement, Context, [
560
+ Parser<HTMLElement, Context, [
561
561
  ReplyParser.CiteParser,
562
562
  ReplyParser.QuoteParser,
563
563
  ]>,
564
- Parser<string | HTMLElement, Context, [
564
+ Parser<HTMLElement | string, Context, [
565
565
  ReplyParser.QuoteParser,
566
566
  InlineParser,
567
567
  ]>,
@@ -619,12 +619,12 @@ export namespace MarkdownParser {
619
619
  InlineParser.AnnotationParser,
620
620
  InlineParser.ReferenceParser,
621
621
  InlineParser.TemplateParser,
622
+ InlineParser.CommentParser,
622
623
  InlineParser.ExtensionParser,
623
624
  InlineParser.RubyParser,
624
625
  InlineParser.LinkParser,
625
626
  InlineParser.MediaParser,
626
627
  InlineParser.HTMLParser,
627
- InlineParser.CommentParser,
628
628
  InlineParser.InsertionParser,
629
629
  InlineParser.DeletionParser,
630
630
  InlineParser.MarkParser,
@@ -709,6 +709,13 @@ export namespace MarkdownParser {
709
709
  ]> {
710
710
  }
711
711
  }
712
+ export interface CommentParser extends
713
+ // [# comment #]
714
+ Inline<'comment'>,
715
+ Parser<HTMLElement | string, Context, [
716
+ InlineParser,
717
+ ]> {
718
+ }
712
719
  export interface ExtensionParser extends
713
720
  // [#abc]
714
721
  Inline<'extension'>,
@@ -941,22 +948,6 @@ export namespace MarkdownParser {
941
948
  }
942
949
  }
943
950
  }
944
- export interface CommentParser extends
945
- // [# comment #]
946
- Inline<'comment'>,
947
- Parser<HTMLElement, Context, [
948
- CommentParser.TextParser,
949
- ]> {
950
- }
951
- export namespace CommentParser {
952
- export interface TextParser extends
953
- Inline<'comment/text'>,
954
- Parser<string, Context, [
955
- UnsafeHTMLEntityParser,
956
- SourceParser.UnescapableSourceParser,
957
- ]> {
958
- }
959
- }
960
951
  export interface InsertionParser extends
961
952
  // ++abc++
962
953
  Inline<'insertion'>,
@@ -1030,7 +1021,7 @@ export namespace MarkdownParser {
1030
1021
  export interface HTMLEntityParser extends
1031
1022
  // &copy;
1032
1023
  Inline<'htmlentity'>,
1033
- Parser<HTMLSpanElement | string, Context, [
1024
+ Parser<string | HTMLSpanElement, Context, [
1034
1025
  UnsafeHTMLEntityParser,
1035
1026
  ]> {
1036
1027
  }
@@ -1153,7 +1144,7 @@ export namespace MarkdownParser {
1153
1144
  }
1154
1145
  export interface AutolinkParser extends
1155
1146
  Markdown<'autolink'>,
1156
- Parser<HTMLElement | string, Context, [
1147
+ Parser<string | HTMLElement, Context, [
1157
1148
  InlineParser.AutolinkParser,
1158
1149
  SourceParser.LinebreakParser,
1159
1150
  SourceParser.UnescapableSourceParser,
@@ -1164,7 +1155,7 @@ export namespace MarkdownParser {
1164
1155
  export interface TextParser extends
1165
1156
  // abc
1166
1157
  Source<'text'>,
1167
- Parser<HTMLBRElement | HTMLSpanElement | string, Context, []> {
1158
+ Parser<string | HTMLBRElement | HTMLSpanElement, Context, []> {
1168
1159
  }
1169
1160
  export interface TxtParser extends
1170
1161
  // abc
package/package-lock.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "securemark",
3
- "version": "0.232.2",
3
+ "version": "0.233.2",
4
4
  "lockfileVersion": 1,
5
5
  "requires": true,
6
6
  "dependencies": {
@@ -422,12 +422,12 @@
422
422
  }
423
423
  },
424
424
  "@npmcli/fs": {
425
- "version": "1.1.1",
426
- "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-1.1.1.tgz",
427
- "integrity": "sha512-8KG5RD0GVP4ydEzRn/I4BNDuxDtqVbOdm8675T49OIG/NGhaK0pjPX7ZcDlvKYbA+ulvVK3ztfcF4uBdOxuJbQ==",
425
+ "version": "2.1.0",
426
+ "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.0.tgz",
427
+ "integrity": "sha512-DmfBvNXGaetMxj9LTp8NAN9vEidXURrf5ZTslQzEAi/6GbW+4yjaLFQc6Tue5cpZ9Frlk4OBo/Snf1Bh/S7qTQ==",
428
428
  "dev": true,
429
429
  "requires": {
430
- "@gar/promisify": "^1.0.1",
430
+ "@gar/promisify": "^1.1.3",
431
431
  "semver": "^7.3.5"
432
432
  }
433
433
  },
@@ -618,9 +618,9 @@
618
618
  "dev": true
619
619
  },
620
620
  "@types/node": {
621
- "version": "17.0.22",
622
- "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.22.tgz",
623
- "integrity": "sha512-8FwbVoG4fy+ykY86XCAclKZDORttqE5/s7dyWZKLXTdv3vRy5HozBEinG5IqhvPXXzIZEcTVbuHlQEI6iuwcmw==",
621
+ "version": "17.0.23",
622
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.23.tgz",
623
+ "integrity": "sha512-UxDxWn7dl97rKVeVS61vErvw086aCYhDLyvRQZ5Rk65rZKepaFdm53GeqXaKBuOhED4e9uWq34IC3TdSdJJ2Gw==",
624
624
  "dev": true
625
625
  },
626
626
  "@types/power-assert": {
@@ -1772,18 +1772,18 @@
1772
1772
  "dev": true
1773
1773
  },
1774
1774
  "cacache": {
1775
- "version": "16.0.2",
1776
- "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.0.2.tgz",
1777
- "integrity": "sha512-Q17j7s8X81i/QYVrKVQ/qwWGT+pYLfpTcZ+X+p/Qw9FULy9JEfb2FECYTTt6mPV6A/vk92nRZ80ncpKxiGTrIA==",
1775
+ "version": "16.0.3",
1776
+ "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.0.3.tgz",
1777
+ "integrity": "sha512-eC7wYodNCVb97kuHGk5P+xZsvUJHkhSEOyNwkenqQPAsOtrTjvWOE5vSPNBpz9d8X3acIf6w2Ub5s4rvOCTs4g==",
1778
1778
  "dev": true,
1779
1779
  "requires": {
1780
- "@npmcli/fs": "^1.0.0",
1780
+ "@npmcli/fs": "^2.1.0",
1781
1781
  "@npmcli/move-file": "^1.1.2",
1782
1782
  "chownr": "^2.0.0",
1783
1783
  "fs-minipass": "^2.1.0",
1784
1784
  "glob": "^7.2.0",
1785
1785
  "infer-owner": "^1.0.4",
1786
- "lru-cache": "^7.5.1",
1786
+ "lru-cache": "^7.7.1",
1787
1787
  "minipass": "^3.1.6",
1788
1788
  "minipass-collect": "^1.0.2",
1789
1789
  "minipass-flush": "^1.0.5",
@@ -1924,9 +1924,9 @@
1924
1924
  "dev": true
1925
1925
  },
1926
1926
  "caniuse-lite": {
1927
- "version": "1.0.30001319",
1928
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001319.tgz",
1929
- "integrity": "sha512-xjlIAFHucBRSMUo1kb5D4LYgcN1M45qdKP++lhqowDpwJwGkpIRTt5qQqnhxjj1vHcI7nrJxWhCC1ATrCEBTcw==",
1927
+ "version": "1.0.30001320",
1928
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001320.tgz",
1929
+ "integrity": "sha512-MWPzG54AGdo3nWx7zHZTefseM5Y1ccM7hlQKHRqJkPozUaw3hNbBTMmLn16GG2FUzjR13Cr3NPfhIieX5PzXDA==",
1930
1930
  "dev": true
1931
1931
  },
1932
1932
  "chalk": {
@@ -3030,9 +3030,9 @@
3030
3030
  "dev": true
3031
3031
  },
3032
3032
  "electron-to-chromium": {
3033
- "version": "1.4.89",
3034
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.89.tgz",
3035
- "integrity": "sha512-z1Axg0Fu54fse8wN4fd+GAINdU5mJmLtcl6bqIcYyzNVGONcfHAeeJi88KYMQVKalhXlYuVPzKkFIU5VD0raUw==",
3033
+ "version": "1.4.94",
3034
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.94.tgz",
3035
+ "integrity": "sha512-CoOKsuACoa0PAG3hQXxbh/XDiFcjGuSyGKUi09cjMHOt6RCi7/EXgXhaFF3I+aC89Omudqmkzd0YOQKxwtf/Bg==",
3036
3036
  "dev": true
3037
3037
  },
3038
3038
  "elliptic": {
@@ -6359,9 +6359,9 @@
6359
6359
  "dev": true
6360
6360
  },
6361
6361
  "isbinaryfile": {
6362
- "version": "4.0.8",
6363
- "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-4.0.8.tgz",
6364
- "integrity": "sha512-53h6XFniq77YdW+spoRrebh0mnmTxRPTlcuIArO57lmMdq4uBKFKaeTjnb92oYWrSn/LVL+LT+Hap2tFQj8V+w==",
6362
+ "version": "4.0.10",
6363
+ "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-4.0.10.tgz",
6364
+ "integrity": "sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw==",
6365
6365
  "dev": true
6366
6366
  },
6367
6367
  "isexe": {
@@ -7092,18 +7092,18 @@
7092
7092
  }
7093
7093
  },
7094
7094
  "make-fetch-happen": {
7095
- "version": "10.0.6",
7096
- "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.0.6.tgz",
7097
- "integrity": "sha512-4Gfh6lV3TLXmj7qz79hBFuvVqjYSMW6v2+sxtdX4LFQU0rK3V/txRjE0DoZb7X0IF3t9f8NO3CxPSWlvdckhVA==",
7095
+ "version": "10.1.0",
7096
+ "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.1.0.tgz",
7097
+ "integrity": "sha512-HeP4QlkadP/Op+hE+Une1070kcyN85FshQObku3/rmzRh4zDcKXA19d2L3AQR6UoaX3uZmhSOpTLH15b1vOFvQ==",
7098
7098
  "dev": true,
7099
7099
  "requires": {
7100
7100
  "agentkeepalive": "^4.2.1",
7101
- "cacache": "^16.0.0",
7101
+ "cacache": "^16.0.2",
7102
7102
  "http-cache-semantics": "^4.1.0",
7103
7103
  "http-proxy-agent": "^5.0.0",
7104
7104
  "https-proxy-agent": "^5.0.0",
7105
7105
  "is-lambda": "^1.0.1",
7106
- "lru-cache": "^7.5.1",
7106
+ "lru-cache": "^7.7.1",
7107
7107
  "minipass": "^3.1.6",
7108
7108
  "minipass-collect": "^1.0.2",
7109
7109
  "minipass-fetch": "^2.0.3",
@@ -7344,13 +7344,13 @@
7344
7344
  "dev": true
7345
7345
  },
7346
7346
  "micromatch": {
7347
- "version": "4.0.4",
7348
- "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz",
7349
- "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==",
7347
+ "version": "4.0.5",
7348
+ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
7349
+ "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
7350
7350
  "dev": true,
7351
7351
  "requires": {
7352
- "braces": "^3.0.1",
7353
- "picomatch": "^2.2.3"
7352
+ "braces": "^3.0.2",
7353
+ "picomatch": "^2.3.1"
7354
7354
  }
7355
7355
  },
7356
7356
  "miller-rabin": {
@@ -7450,9 +7450,9 @@
7450
7450
  }
7451
7451
  },
7452
7452
  "minipass-fetch": {
7453
- "version": "2.0.3",
7454
- "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.0.3.tgz",
7455
- "integrity": "sha512-VA+eiiUtaIvpQJXISwE3OiMvQwAWrgKb97F0aXlCS1Ahikr8fEQq8m3Hf7Kv9KT3nokuHigJKsDMB6atU04olQ==",
7453
+ "version": "2.1.0",
7454
+ "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.0.tgz",
7455
+ "integrity": "sha512-H9U4UVBGXEyyWJnqYDCLp1PwD8XIkJ4akNHp1aGVI+2Ym7wQMlxDKi4IB4JbmyU+pl9pEs/cVrK6cOuvmbK4Sg==",
7456
7456
  "dev": true,
7457
7457
  "requires": {
7458
7458
  "encoding": "^0.1.13",
@@ -7530,12 +7530,12 @@
7530
7530
  }
7531
7531
  },
7532
7532
  "mkdirp": {
7533
- "version": "0.5.5",
7534
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
7535
- "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
7533
+ "version": "0.5.6",
7534
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz",
7535
+ "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==",
7536
7536
  "dev": true,
7537
7537
  "requires": {
7538
- "minimist": "^1.2.5"
7538
+ "minimist": "^1.2.6"
7539
7539
  }
7540
7540
  },
7541
7541
  "mkdirp-classic": {
@@ -8180,17 +8180,17 @@
8180
8180
  }
8181
8181
  },
8182
8182
  "npm-registry-fetch": {
8183
- "version": "13.0.1",
8184
- "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-13.0.1.tgz",
8185
- "integrity": "sha512-Ak+LXVtSrCLOdscFW/apUw67OPNph8waHsPKM9UOJosL7i59EF5XoSWQMEsXEOeifM9Bb4/2+WrQC4t/pd8DGg==",
8183
+ "version": "13.1.0",
8184
+ "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-13.1.0.tgz",
8185
+ "integrity": "sha512-TIYL5X8CcwDhbFMXFDShNcpG6OMCYK6VzvSr6MUWP20tCU2DJ4ao2qQg3DT+3Pet8mO6/cgbZpon4LMh3duYLg==",
8186
8186
  "dev": true,
8187
8187
  "requires": {
8188
- "make-fetch-happen": "^10.0.3",
8188
+ "make-fetch-happen": "^10.0.6",
8189
8189
  "minipass": "^3.1.6",
8190
- "minipass-fetch": "^2.0.1",
8190
+ "minipass-fetch": "^2.0.3",
8191
8191
  "minipass-json-stream": "^1.0.1",
8192
8192
  "minizlib": "^2.1.2",
8193
- "npm-package-arg": "^9.0.0",
8193
+ "npm-package-arg": "^9.0.1",
8194
8194
  "proc-log": "^2.0.0"
8195
8195
  }
8196
8196
  },