securemark 0.299.3 → 0.300.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 +8 -0
- package/design.md +0 -6
- package/dist/index.js +3479 -2750
- package/index.d.ts +2 -1
- package/index.ts +2 -2
- package/markdown.d.ts +209 -183
- package/package.json +1 -1
- package/src/{parser/api → api}/bind.test.ts +2 -24
- package/src/{parser/api → api}/bind.ts +18 -13
- package/src/{parser/api → api}/body.test.ts +1 -1
- package/src/{parser/api → api}/cache.ts +1 -1
- package/src/{parser/api → api}/header.test.ts +1 -1
- package/src/{parser/api → api}/header.ts +9 -6
- package/src/{parser/api → api}/normalize.test.ts +1 -1
- package/src/{parser/api → api}/parse.test.ts +120 -124
- package/src/api/parse.ts +30 -0
- package/src/api/run.ts +6 -0
- package/src/{parser/api.ts → api.ts} +1 -0
- package/src/combinator/control/inits.ts +26 -0
- package/src/combinator/control/sequence.test.ts +38 -0
- package/src/combinator/control/sequence.ts +17 -0
- package/src/combinator/control/some.test.ts +41 -0
- package/src/combinator/{data/parser → control}/some.ts +39 -26
- package/src/combinator/control/state.ts +42 -0
- package/src/combinator/control/subsequence.test.ts +47 -0
- package/src/combinator/control/subsequence.ts +16 -0
- package/src/combinator/control/tails.ts +8 -0
- package/src/combinator/control/union.test.ts +37 -0
- package/src/combinator/control/union.ts +18 -0
- package/src/combinator/{data/delimiter.ts → delimiter.ts} +40 -60
- package/src/combinator/effect/backtrack.ts +64 -0
- package/src/combinator/effect/clock.ts +10 -0
- package/src/combinator/effect/precedence.ts +50 -0
- package/src/combinator/effect/recursion.ts +30 -0
- package/src/combinator/effect/scope.ts +100 -0
- package/src/combinator/effect/state.ts +72 -0
- package/src/combinator/{data/node.ts → parser/list.ts} +38 -13
- package/src/combinator/parser.ts +293 -0
- package/src/combinator/process/bind.ts +34 -0
- package/src/combinator/process/block.test.ts +20 -0
- package/src/combinator/process/block.ts +33 -0
- package/src/combinator/process/clear.ts +16 -0
- package/src/combinator/process/contract.ts +35 -0
- package/src/combinator/process/duplicate.ts +7 -0
- package/src/combinator/process/error.ts +13 -0
- package/src/combinator/{control/manipulation → process}/fallback.ts +3 -3
- package/src/combinator/process/fence.ts +59 -0
- package/src/combinator/process/fmap.ts +10 -0
- package/src/combinator/process/indent.test.ts +31 -0
- package/src/combinator/process/indent.ts +51 -0
- package/src/combinator/process/lazy.ts +8 -0
- package/src/combinator/process/line.test.ts +21 -0
- package/src/combinator/process/line.ts +55 -0
- package/src/combinator/process/match.ts +37 -0
- package/src/combinator/process/reverse.ts +7 -0
- package/src/combinator/process/scope.ts +102 -0
- package/src/combinator/process/surround.ts +271 -0
- package/src/combinator.ts +28 -24
- package/src/debug.test.ts +11 -8
- package/src/parser/autolink.test.ts +17 -18
- package/src/parser/block/blockquote.test.ts +78 -79
- package/src/parser/block/blockquote.ts +32 -25
- package/src/parser/block/codeblock.test.ts +56 -57
- package/src/parser/block/codeblock.ts +44 -26
- package/src/parser/block/dlist.test.ts +56 -57
- package/src/parser/block/dlist.ts +5 -5
- package/src/parser/block/extension/aside.test.ts +8 -9
- package/src/parser/block/extension/aside.ts +76 -47
- package/src/parser/block/extension/example.test.ts +18 -19
- package/src/parser/block/extension/example.ts +88 -48
- package/src/parser/block/extension/fig.test.ts +37 -36
- package/src/parser/block/extension/fig.ts +20 -25
- package/src/parser/block/extension/figbase.test.ts +18 -19
- package/src/parser/block/extension/figbase.ts +3 -3
- package/src/parser/block/extension/figure.test.ts +62 -63
- package/src/parser/block/extension/figure.ts +23 -21
- package/src/parser/block/extension/message.test.ts +13 -14
- package/src/parser/block/extension/message.ts +52 -39
- package/src/parser/block/extension/placeholder.test.ts +13 -13
- package/src/parser/block/extension/placeholder.ts +23 -21
- package/src/parser/block/extension/table.test.ts +70 -71
- package/src/parser/block/extension/table.ts +43 -31
- package/src/parser/block/extension.test.ts +24 -24
- package/src/parser/block/extension.ts +3 -3
- package/src/parser/block/heading.test.ts +58 -59
- package/src/parser/block/heading.ts +19 -18
- package/src/parser/block/ilist.test.ts +8 -8
- package/src/parser/block/ilist.ts +9 -7
- package/src/parser/block/mathblock.test.ts +31 -32
- package/src/parser/block/mathblock.ts +24 -23
- package/src/parser/block/mediablock.ts +7 -7
- package/src/parser/block/olist.test.ts +102 -103
- package/src/parser/block/olist.ts +11 -12
- package/src/parser/block/pagebreak.test.ts +15 -16
- package/src/parser/block/pagebreak.ts +5 -5
- package/src/parser/block/paragraph.test.ts +57 -58
- package/src/parser/block/paragraph.ts +1 -1
- package/src/parser/block/reply/cite.test.ts +39 -40
- package/src/parser/block/reply/cite.ts +5 -5
- package/src/parser/block/reply/quote.test.ts +50 -51
- package/src/parser/block/reply/quote.ts +8 -7
- package/src/parser/block/reply.test.ts +19 -20
- package/src/parser/block/reply.ts +2 -2
- package/src/parser/block/sidefence.test.ts +41 -48
- package/src/parser/block/sidefence.ts +17 -11
- package/src/parser/block/table.test.ts +48 -49
- package/src/parser/block/table.ts +10 -9
- package/src/parser/block/ulist.test.ts +52 -53
- package/src/parser/block/ulist.ts +9 -8
- package/src/parser/block.ts +63 -51
- package/src/parser/context.ts +35 -32
- package/src/parser/document.ts +48 -0
- package/src/parser/header.test.ts +19 -20
- package/src/parser/header.ts +31 -25
- package/src/parser/inline/annotation.test.ts +49 -50
- package/src/parser/inline/annotation.ts +14 -16
- package/src/parser/inline/autolink/account.test.ts +32 -33
- package/src/parser/inline/autolink/account.ts +18 -19
- package/src/parser/inline/autolink/anchor.test.ts +21 -22
- package/src/parser/inline/autolink/anchor.ts +7 -8
- package/src/parser/inline/autolink/channel.test.ts +14 -15
- package/src/parser/inline/autolink/email.test.ts +36 -37
- package/src/parser/inline/autolink/email.ts +6 -6
- package/src/parser/inline/autolink/hashnum.test.ts +32 -33
- package/src/parser/inline/autolink/hashnum.ts +7 -8
- package/src/parser/inline/autolink/hashtag.test.ts +59 -60
- package/src/parser/inline/autolink/hashtag.ts +8 -9
- package/src/parser/inline/autolink/url.test.ts +75 -76
- package/src/parser/inline/autolink/url.ts +13 -14
- package/src/parser/inline/autolink.ts +24 -11
- package/src/parser/inline/bracket.test.ts +73 -74
- package/src/parser/inline/bracket.ts +88 -63
- package/src/parser/inline/code.test.ts +30 -31
- package/src/parser/inline/code.ts +6 -6
- package/src/parser/inline/deletion.test.ts +27 -28
- package/src/parser/inline/deletion.ts +5 -5
- package/src/parser/inline/emphasis.test.ts +39 -40
- package/src/parser/inline/emphasis.ts +5 -5
- package/src/parser/inline/emstrong.test.ts +101 -102
- package/src/parser/inline/emstrong.ts +103 -85
- package/src/parser/inline/extension/index.test.ts +91 -92
- package/src/parser/inline/extension/index.ts +17 -13
- package/src/parser/inline/extension/indexee.ts +4 -4
- package/src/parser/inline/extension/indexer.test.ts +23 -24
- package/src/parser/inline/extension/indexer.ts +6 -5
- package/src/parser/inline/extension/label.test.ts +32 -33
- package/src/parser/inline/extension/label.ts +14 -5
- package/src/parser/inline/extension/placeholder.test.ts +42 -43
- package/src/parser/inline/extension/placeholder.ts +8 -9
- package/src/parser/inline/html.test.ts +109 -109
- package/src/parser/inline/html.ts +27 -27
- package/src/parser/inline/htmlentity.test.ts +37 -38
- package/src/parser/inline/htmlentity.ts +6 -7
- package/src/parser/inline/insertion.test.ts +27 -28
- package/src/parser/inline/insertion.ts +5 -5
- package/src/parser/inline/italic.test.ts +55 -56
- package/src/parser/inline/italic.ts +5 -5
- package/src/parser/inline/link.test.ts +186 -187
- package/src/parser/inline/link.ts +31 -32
- package/src/parser/inline/mark.test.ts +31 -32
- package/src/parser/inline/mark.ts +6 -6
- package/src/parser/inline/math.test.ts +140 -141
- package/src/parser/inline/math.ts +6 -7
- package/src/parser/inline/media.test.ts +92 -93
- package/src/parser/inline/media.ts +32 -38
- package/src/parser/inline/reference.test.ts +111 -112
- package/src/parser/inline/reference.ts +61 -32
- package/src/parser/inline/remark.test.ts +49 -50
- package/src/parser/inline/remark.ts +13 -13
- package/src/parser/inline/ruby.test.ts +49 -50
- package/src/parser/inline/ruby.ts +60 -49
- package/src/parser/inline/shortmedia.test.ts +9 -10
- package/src/parser/inline/shortmedia.ts +11 -9
- package/src/parser/inline/strong.test.ts +36 -37
- package/src/parser/inline/strong.ts +5 -5
- package/src/parser/inline/template.test.ts +22 -23
- package/src/parser/inline/template.ts +13 -16
- package/src/parser/inline.test.ts +225 -226
- package/src/parser/inline.ts +68 -34
- package/src/parser/node.ts +1 -1
- package/src/parser/parser.ts +51 -0
- package/src/parser/repeat.ts +118 -91
- package/src/parser/segment.test.ts +0 -11
- package/src/parser/segment.ts +25 -28
- package/src/parser/source/escapable.test.ts +23 -24
- package/src/parser/source/escapable.ts +20 -20
- package/src/parser/source/line.test.ts +17 -18
- package/src/parser/source/line.ts +19 -24
- package/src/parser/source/str.ts +17 -10
- package/src/parser/source/text.test.ts +88 -89
- package/src/parser/source/text.ts +19 -20
- package/src/parser/source/unescapable.test.ts +23 -24
- package/src/parser/source/unescapable.ts +16 -16
- package/src/parser/util.ts +1 -1
- package/src/parser/visibility.ts +36 -15
- package/src/{parser/processor → processor}/figure.test.ts +23 -23
- package/src/{parser/processor → processor}/figure.ts +20 -12
- package/src/{parser/processor → processor}/note.test.ts +15 -15
- package/src/{parser/processor → processor}/note.ts +6 -4
- package/src/renderer/render/media/pdf.ts +2 -2
- package/src/renderer/render/media/twitter.ts +2 -2
- package/src/renderer/render/media.test.ts +12 -13
- package/src/renderer/render.test.ts +11 -11
- package/src/util/info.test.ts +2 -2
- package/src/util/quote.test.ts +3 -3
- package/src/util/quote.ts +6 -5
- package/src/util/toc.test.ts +12 -12
- package/src/combinator/control/constraint/block.test.ts +0 -20
- package/src/combinator/control/constraint/block.ts +0 -28
- package/src/combinator/control/constraint/contract.ts +0 -27
- package/src/combinator/control/constraint/line.test.ts +0 -21
- package/src/combinator/control/constraint/line.ts +0 -42
- package/src/combinator/control/manipulation/clear.ts +0 -5
- package/src/combinator/control/manipulation/convert.ts +0 -22
- package/src/combinator/control/manipulation/duplicate.ts +0 -7
- package/src/combinator/control/manipulation/fence.ts +0 -54
- package/src/combinator/control/manipulation/indent.test.ts +0 -31
- package/src/combinator/control/manipulation/indent.ts +0 -39
- package/src/combinator/control/manipulation/lazy.ts +0 -8
- package/src/combinator/control/manipulation/match.ts +0 -27
- package/src/combinator/control/manipulation/recovery.ts +0 -18
- package/src/combinator/control/manipulation/reverse.ts +0 -8
- package/src/combinator/control/manipulation/scope.ts +0 -61
- package/src/combinator/control/manipulation/surround.ts +0 -223
- package/src/combinator/control/monad/bind.ts +0 -26
- package/src/combinator/control/monad/fmap.ts +0 -10
- package/src/combinator/data/parser/context.ts +0 -96
- package/src/combinator/data/parser/inits.ts +0 -20
- package/src/combinator/data/parser/sequence.test.ts +0 -33
- package/src/combinator/data/parser/sequence.ts +0 -20
- package/src/combinator/data/parser/some.test.ts +0 -37
- package/src/combinator/data/parser/subsequence.test.ts +0 -41
- package/src/combinator/data/parser/subsequence.ts +0 -13
- package/src/combinator/data/parser/tails.ts +0 -8
- package/src/combinator/data/parser/union.test.ts +0 -33
- package/src/combinator/data/parser/union.ts +0 -18
- package/src/combinator/data/parser.ts +0 -144
- package/src/parser/api/parse.ts +0 -48
- package/src/parser.ts +0 -1
- /package/src/{parser/api → api}/body.ts +0 -0
- /package/src/{parser/api → api}/normalize.ts +0 -0
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { table } from './table';
|
|
2
2
|
import { some } from '../../../combinator';
|
|
3
|
-
import { input } from '
|
|
4
|
-
import { Context } from '../../context';
|
|
3
|
+
import { input } from '../../context';
|
|
5
4
|
import { inspect } from '../../../debug.test';
|
|
6
5
|
import { html } from 'typed-dom/dom';
|
|
7
6
|
|
|
@@ -10,31 +9,31 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
10
9
|
const parser = some(table);
|
|
11
10
|
|
|
12
11
|
it('invalid', () => {
|
|
13
|
-
assert.deepStrictEqual(inspect(parser, input('~~~table a\n-\n~~~'
|
|
14
|
-
assert.deepStrictEqual(inspect(parser, input(`~~~table\n0${'\n'.repeat(10001)}
|
|
12
|
+
assert.deepStrictEqual(inspect(parser, input('~~~table a\n-\n~~~')), [['<pre class="invalid" translate="no">~~~table a\n-\n~~~</pre>'], '']);
|
|
13
|
+
assert.deepStrictEqual(inspect(parser, input(`~~~table\n0${'\n'.repeat(10001)}~~~`), '>'), [['<pre class="invalid" translate="no">'], '']);
|
|
15
14
|
});
|
|
16
15
|
|
|
17
16
|
it('data', () => {
|
|
18
17
|
assert.deepStrictEqual(
|
|
19
|
-
inspect(parser, input('~~~table\n~~~'
|
|
18
|
+
inspect(parser, input('~~~table\n~~~')),
|
|
20
19
|
[[html('table').outerHTML], '']);
|
|
21
20
|
assert.deepStrictEqual(
|
|
22
|
-
inspect(parser, input('~~~table\n\n~~~\n'
|
|
21
|
+
inspect(parser, input('~~~table\n\n~~~\n')),
|
|
23
22
|
[[html('table', [html('thead', [html('tr')]), html('tbody'), html('tfoot')]).outerHTML], '']);
|
|
24
23
|
assert.deepStrictEqual(
|
|
25
|
-
inspect(parser, input('~~~table\n-\n~~~'
|
|
24
|
+
inspect(parser, input('~~~table\n-\n~~~')),
|
|
26
25
|
[[html('table', [html('thead', [html('tr')]), html('tbody'), html('tfoot')]).outerHTML], '']);
|
|
27
26
|
assert.deepStrictEqual(
|
|
28
|
-
inspect(parser, input('~~~table\n-\n\n~~~'
|
|
27
|
+
inspect(parser, input('~~~table\n-\n\n~~~')),
|
|
29
28
|
[[html('table', [html('thead', [html('tr')]), html('tbody'), html('tfoot')]).outerHTML], '']);
|
|
30
29
|
assert.deepStrictEqual(
|
|
31
|
-
inspect(parser, input('~~~table\n0\n\n~~~'
|
|
30
|
+
inspect(parser, input('~~~table\n0\n\n~~~')),
|
|
32
31
|
[[html('table', [html('thead'), html('tbody', [html('tr', [html('td', '0')])]), html('tfoot')]).outerHTML], '']);
|
|
33
32
|
assert.deepStrictEqual(
|
|
34
|
-
inspect(parser, input('~~~table\n:\n~~~'
|
|
33
|
+
inspect(parser, input('~~~table\n:\n~~~')),
|
|
35
34
|
[[html('table', [html('thead'), html('tbody', [html('tr', [html('td')])]), html('tfoot'),]).outerHTML], '']);
|
|
36
35
|
assert.deepStrictEqual(
|
|
37
|
-
inspect(parser, input('~~~table\n1.1\n~~~'
|
|
36
|
+
inspect(parser, input('~~~table\n1.1\n~~~')),
|
|
38
37
|
[[html('table', [
|
|
39
38
|
html('thead'),
|
|
40
39
|
html('tbody', [
|
|
@@ -43,7 +42,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
43
42
|
html('tfoot'),
|
|
44
43
|
]).outerHTML], '']);
|
|
45
44
|
assert.deepStrictEqual(
|
|
46
|
-
inspect(parser, input('~~~table\n1.1\n1.2\n\n1.3\n~~~'
|
|
45
|
+
inspect(parser, input('~~~table\n1.1\n1.2\n\n1.3\n~~~')),
|
|
47
46
|
[[html('table', [
|
|
48
47
|
html('thead'),
|
|
49
48
|
html('tbody', [
|
|
@@ -52,7 +51,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
52
51
|
html('tfoot'),
|
|
53
52
|
]).outerHTML], '']);
|
|
54
53
|
assert.deepStrictEqual(
|
|
55
|
-
inspect(parser, input('~~~table\n1.1\n-\n2.1\n~~~'
|
|
54
|
+
inspect(parser, input('~~~table\n1.1\n-\n2.1\n~~~')),
|
|
56
55
|
[[html('table', [
|
|
57
56
|
html('thead'),
|
|
58
57
|
html('tbody', [
|
|
@@ -62,7 +61,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
62
61
|
html('tfoot'),
|
|
63
62
|
]).outerHTML], '']);
|
|
64
63
|
assert.deepStrictEqual(
|
|
65
|
-
inspect(parser, input('~~~table\n: 1.1\n0\n~~~'
|
|
64
|
+
inspect(parser, input('~~~table\n: 1.1\n0\n~~~')),
|
|
66
65
|
[[html('table', [
|
|
67
66
|
html('thead'),
|
|
68
67
|
html('tbody', [
|
|
@@ -71,7 +70,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
71
70
|
html('tfoot'),
|
|
72
71
|
]).outerHTML], '']);
|
|
73
72
|
assert.deepStrictEqual(
|
|
74
|
-
inspect(parser, input('~~~table\n: 1.1\n: 1.2\n~~~'
|
|
73
|
+
inspect(parser, input('~~~table\n: 1.1\n: 1.2\n~~~')),
|
|
75
74
|
[[html('table', [
|
|
76
75
|
html('thead'),
|
|
77
76
|
html('tbody', [
|
|
@@ -80,7 +79,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
80
79
|
html('tfoot'),
|
|
81
80
|
]).outerHTML], '']);
|
|
82
81
|
assert.deepStrictEqual(
|
|
83
|
-
inspect(parser, input('~~~table\n: 1.1\n\n1.2\n~~~'
|
|
82
|
+
inspect(parser, input('~~~table\n: 1.1\n\n1.2\n~~~')),
|
|
84
83
|
[[html('table', [
|
|
85
84
|
html('thead'),
|
|
86
85
|
html('tbody', [
|
|
@@ -89,7 +88,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
89
88
|
html('tfoot'),
|
|
90
89
|
]).outerHTML], '']);
|
|
91
90
|
assert.deepStrictEqual(
|
|
92
|
-
inspect(parser, input('~~~table\n1.1\n: 1.2\n:1:1 1.3\n\n: 1.4\n~~~'
|
|
91
|
+
inspect(parser, input('~~~table\n1.1\n: 1.2\n:1:1 1.3\n\n: 1.4\n~~~')),
|
|
93
92
|
[[html('table', [
|
|
94
93
|
html('thead'),
|
|
95
94
|
html('tbody', [
|
|
@@ -98,7 +97,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
98
97
|
html('tfoot'),
|
|
99
98
|
]).outerHTML], '']);
|
|
100
99
|
assert.deepStrictEqual(
|
|
101
|
-
inspect(parser, input('~~~table\n:\n1\n~~~'
|
|
100
|
+
inspect(parser, input('~~~table\n:\n1\n~~~')),
|
|
102
101
|
[[html('table', [
|
|
103
102
|
html('thead'),
|
|
104
103
|
html('tbody', [
|
|
@@ -107,7 +106,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
107
106
|
html('tfoot'),
|
|
108
107
|
]).outerHTML], '']);
|
|
109
108
|
assert.deepStrictEqual(
|
|
110
|
-
inspect(parser, input('~~~table\n: \n1\n~~~'
|
|
109
|
+
inspect(parser, input('~~~table\n: \n1\n~~~')),
|
|
111
110
|
[[html('table', [
|
|
112
111
|
html('thead'),
|
|
113
112
|
html('tbody', [
|
|
@@ -116,7 +115,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
116
115
|
html('tfoot'),
|
|
117
116
|
]).outerHTML], '']);
|
|
118
117
|
assert.deepStrictEqual(
|
|
119
|
-
inspect(parser, input('~~~table\n: \n 1\n~~~'
|
|
118
|
+
inspect(parser, input('~~~table\n: \n 1\n~~~')),
|
|
120
119
|
[[html('table', [
|
|
121
120
|
html('thead'),
|
|
122
121
|
html('tbody', [
|
|
@@ -125,7 +124,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
125
124
|
html('tfoot'),
|
|
126
125
|
]).outerHTML], '']);
|
|
127
126
|
assert.deepStrictEqual(
|
|
128
|
-
inspect(parser, input('~~~table\n: \n\n1\n~~~'
|
|
127
|
+
inspect(parser, input('~~~table\n: \n\n1\n~~~')),
|
|
129
128
|
[[html('table', [
|
|
130
129
|
html('thead'),
|
|
131
130
|
html('tbody', [
|
|
@@ -134,7 +133,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
134
133
|
html('tfoot'),
|
|
135
134
|
]).outerHTML], '']);
|
|
136
135
|
assert.deepStrictEqual(
|
|
137
|
-
inspect(parser, input('~~~table\n\\ \n\\ \n~~~'
|
|
136
|
+
inspect(parser, input('~~~table\n\\ \n\\ \n~~~')),
|
|
138
137
|
[[html('table', [
|
|
139
138
|
html('thead'),
|
|
140
139
|
html('tbody', [
|
|
@@ -143,7 +142,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
143
142
|
html('tfoot'),
|
|
144
143
|
]).outerHTML], '']);
|
|
145
144
|
assert.deepStrictEqual(
|
|
146
|
-
inspect(parser, input('~~~table\n: \\ \n\\ \n0\n~~~'
|
|
145
|
+
inspect(parser, input('~~~table\n: \\ \n\\ \n0\n~~~')),
|
|
147
146
|
[[html('table', [
|
|
148
147
|
html('thead'),
|
|
149
148
|
html('tbody', [
|
|
@@ -155,16 +154,16 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
155
154
|
|
|
156
155
|
it('align', () => {
|
|
157
156
|
assert.deepStrictEqual(
|
|
158
|
-
inspect(parser, input('~~~table\n-=<>\n~~~'
|
|
157
|
+
inspect(parser, input('~~~table\n-=<>\n~~~')),
|
|
159
158
|
[[html('table', [html('thead', [html('tr')]), html('tbody'), html('tfoot')]).outerHTML], '']);
|
|
160
159
|
assert.deepStrictEqual(
|
|
161
|
-
inspect(parser, input('~~~table\n-=<>/-=^v\n~~~'
|
|
160
|
+
inspect(parser, input('~~~table\n-=<>/-=^v\n~~~')),
|
|
162
161
|
[[html('table', [html('thead', [html('tr')]), html('tbody'), html('tfoot')]).outerHTML], '']);
|
|
163
162
|
assert.deepStrictEqual(
|
|
164
|
-
inspect(parser, input('~~~table\n-/-=^v\n~~~'
|
|
163
|
+
inspect(parser, input('~~~table\n-/-=^v\n~~~')),
|
|
165
164
|
[[html('table', [html('thead', [html('tr')]), html('tbody'), html('tfoot')]).outerHTML], '']);
|
|
166
165
|
assert.deepStrictEqual(
|
|
167
|
-
inspect(parser, input('~~~table\n-=^v\n~~~'
|
|
166
|
+
inspect(parser, input('~~~table\n-=^v\n~~~')),
|
|
168
167
|
[[html('table', [
|
|
169
168
|
html('thead'),
|
|
170
169
|
html('tbody', [
|
|
@@ -172,7 +171,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
172
171
|
]),
|
|
173
172
|
html('tfoot')]).outerHTML], '']);
|
|
174
173
|
assert.deepStrictEqual(
|
|
175
|
-
inspect(parser, input('~~~table\n=-<>\n1.1\n1.2\n1.3\n1.4\n1.5\n1.6\n~~~'
|
|
174
|
+
inspect(parser, input('~~~table\n=-<>\n1.1\n1.2\n1.3\n1.4\n1.5\n1.6\n~~~')),
|
|
176
175
|
[[html('table', [
|
|
177
176
|
html('thead'),
|
|
178
177
|
html('tbody', [
|
|
@@ -188,7 +187,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
188
187
|
html('tfoot'),
|
|
189
188
|
]).outerHTML], '']);
|
|
190
189
|
assert.deepStrictEqual(
|
|
191
|
-
inspect(parser, input('~~~table\n=<\n-\n2.1\n2.2\n2.3\n~~~'
|
|
190
|
+
inspect(parser, input('~~~table\n=<\n-\n2.1\n2.2\n2.3\n~~~')),
|
|
192
191
|
[[html('table', [
|
|
193
192
|
html('thead', [html('tr')]),
|
|
194
193
|
html('tbody', [
|
|
@@ -201,7 +200,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
201
200
|
html('tfoot'),
|
|
202
201
|
]).outerHTML], '']);
|
|
203
202
|
assert.deepStrictEqual(
|
|
204
|
-
inspect(parser, input('~~~table\n=<\n=\n2.1\n2.2\n2.3\n~~~'
|
|
203
|
+
inspect(parser, input('~~~table\n=<\n=\n2.1\n2.2\n2.3\n~~~')),
|
|
205
204
|
[[html('table', [
|
|
206
205
|
html('thead', [html('tr')]),
|
|
207
206
|
html('tbody', [
|
|
@@ -214,7 +213,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
214
213
|
html('tfoot'),
|
|
215
214
|
]).outerHTML], '']);
|
|
216
215
|
assert.deepStrictEqual(
|
|
217
|
-
inspect(parser, input('~~~table\n=<\n=-\n2.1\n2.2\n2.3\n~~~'
|
|
216
|
+
inspect(parser, input('~~~table\n=<\n=-\n2.1\n2.2\n2.3\n~~~')),
|
|
218
217
|
[[html('table', [
|
|
219
218
|
html('thead', [html('tr')]),
|
|
220
219
|
html('tbody', [
|
|
@@ -227,7 +226,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
227
226
|
html('tfoot'),
|
|
228
227
|
]).outerHTML], '']);
|
|
229
228
|
assert.deepStrictEqual(
|
|
230
|
-
inspect(parser, input('~~~table\n-/=-^v\n1.1\n1.2\n1.3\n1.4\n1.5\n1.6\n~~~'
|
|
229
|
+
inspect(parser, input('~~~table\n-/=-^v\n1.1\n1.2\n1.3\n1.4\n1.5\n1.6\n~~~')),
|
|
231
230
|
[[html('table', [
|
|
232
231
|
html('thead'),
|
|
233
232
|
html('tbody', [
|
|
@@ -243,7 +242,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
243
242
|
html('tfoot'),
|
|
244
243
|
]).outerHTML], '']);
|
|
245
244
|
assert.deepStrictEqual(
|
|
246
|
-
inspect(parser, input('~~~table\n-/=^\n-/-\n2.1\n2.2\n2.3\n~~~'
|
|
245
|
+
inspect(parser, input('~~~table\n-/=^\n-/-\n2.1\n2.2\n2.3\n~~~')),
|
|
247
246
|
[[html('table', [
|
|
248
247
|
html('thead', [html('tr')]),
|
|
249
248
|
html('tbody', [
|
|
@@ -259,10 +258,10 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
259
258
|
|
|
260
259
|
it('head', () => {
|
|
261
260
|
assert.deepStrictEqual(
|
|
262
|
-
inspect(parser, input('~~~table\n#\n~~~'
|
|
261
|
+
inspect(parser, input('~~~table\n#\n~~~')),
|
|
263
262
|
[[html('table', [html('thead', [html('tr', [html('th')])]), html('tbody'), html('tfoot'),]).outerHTML], '']);
|
|
264
263
|
assert.deepStrictEqual(
|
|
265
|
-
inspect(parser, input('~~~table\n-\n# 1.1\n~~~'
|
|
264
|
+
inspect(parser, input('~~~table\n-\n# 1.1\n~~~')),
|
|
266
265
|
[[html('table', [
|
|
267
266
|
html('thead', [
|
|
268
267
|
html('tr', [html('th', '1.1')]),
|
|
@@ -270,7 +269,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
270
269
|
html('tbody'),
|
|
271
270
|
html('tfoot')]).outerHTML], '']);
|
|
272
271
|
assert.deepStrictEqual(
|
|
273
|
-
inspect(parser, input('~~~table\n-/-\n# 1.1\n~~~'
|
|
272
|
+
inspect(parser, input('~~~table\n-/-\n# 1.1\n~~~')),
|
|
274
273
|
[[html('table', [
|
|
275
274
|
html('thead', [
|
|
276
275
|
html('tr', [html('th', '1.1')]),
|
|
@@ -278,7 +277,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
278
277
|
html('tbody'),
|
|
279
278
|
html('tfoot')]).outerHTML], '']);
|
|
280
279
|
assert.deepStrictEqual(
|
|
281
|
-
inspect(parser, input('~~~table\n# 1.1\n~~~'
|
|
280
|
+
inspect(parser, input('~~~table\n# 1.1\n~~~')),
|
|
282
281
|
[[html('table', [
|
|
283
282
|
html('thead', [
|
|
284
283
|
html('tr', [html('th', '1.1')]),
|
|
@@ -286,7 +285,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
286
285
|
html('tbody'),
|
|
287
286
|
html('tfoot')]).outerHTML], '']);
|
|
288
287
|
assert.deepStrictEqual(
|
|
289
|
-
inspect(parser, input('~~~table\n# 1.1\n: 1.2\n~~~'
|
|
288
|
+
inspect(parser, input('~~~table\n# 1.1\n: 1.2\n~~~')),
|
|
290
289
|
[[html('table', [
|
|
291
290
|
html('thead'),
|
|
292
291
|
html('tbody', [
|
|
@@ -297,7 +296,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
297
296
|
|
|
298
297
|
it('foot', () => {
|
|
299
298
|
assert.deepStrictEqual(
|
|
300
|
-
inspect(parser, input('~~~table\n1.1\n-\n# 2.1\n~~~'
|
|
299
|
+
inspect(parser, input('~~~table\n1.1\n-\n# 2.1\n~~~')),
|
|
301
300
|
[[html('table', [
|
|
302
301
|
html('thead'),
|
|
303
302
|
html('tbody', [
|
|
@@ -310,7 +309,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
310
309
|
|
|
311
310
|
it('highlight', () => {
|
|
312
311
|
assert.deepStrictEqual(
|
|
313
|
-
inspect(parser, input('~~~table\n#! 1.1\n~~~'
|
|
312
|
+
inspect(parser, input('~~~table\n#! 1.1\n~~~')),
|
|
314
313
|
[[html('table', [
|
|
315
314
|
html('thead', [
|
|
316
315
|
html('tr', [html('th', { class: 'highlight' }, '1.1')]),
|
|
@@ -319,7 +318,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
319
318
|
html('tfoot'),
|
|
320
319
|
]).outerHTML], '']);
|
|
321
320
|
assert.deepStrictEqual(
|
|
322
|
-
inspect(parser, input('~~~table\n:! 1.1\n~~~'
|
|
321
|
+
inspect(parser, input('~~~table\n:! 1.1\n~~~')),
|
|
323
322
|
[[html('table', [
|
|
324
323
|
html('thead'),
|
|
325
324
|
html('tbody', [
|
|
@@ -328,7 +327,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
328
327
|
html('tfoot'),
|
|
329
328
|
]).outerHTML], '']);
|
|
330
329
|
assert.deepStrictEqual(
|
|
331
|
-
inspect(parser, input('~~~table\n#! 1.1\n: 1.2\n~~~'
|
|
330
|
+
inspect(parser, input('~~~table\n#! 1.1\n: 1.2\n~~~')),
|
|
332
331
|
[[html('table', [
|
|
333
332
|
html('thead'),
|
|
334
333
|
html('tbody', [
|
|
@@ -340,7 +339,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
340
339
|
html('tfoot'),
|
|
341
340
|
]).outerHTML], '']);
|
|
342
341
|
assert.deepStrictEqual(
|
|
343
|
-
inspect(parser, input('~~~table\n: 1.1\n#! 1.2\n~~~'
|
|
342
|
+
inspect(parser, input('~~~table\n: 1.1\n#! 1.2\n~~~')),
|
|
344
343
|
[[html('table', [
|
|
345
344
|
html('thead'),
|
|
346
345
|
html('tbody', [
|
|
@@ -352,7 +351,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
352
351
|
html('tfoot'),
|
|
353
352
|
]).outerHTML], '']);
|
|
354
353
|
assert.deepStrictEqual(
|
|
355
|
-
inspect(parser, input('~~~table\n#! 1.1\n-\n: 2.1\n~~~'
|
|
354
|
+
inspect(parser, input('~~~table\n#! 1.1\n-\n: 2.1\n~~~')),
|
|
356
355
|
[[html('table', [
|
|
357
356
|
html('thead', [
|
|
358
357
|
html('tr', [html('th', { class: 'highlight' }, '1.1')]),
|
|
@@ -363,7 +362,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
363
362
|
html('tfoot'),
|
|
364
363
|
]).outerHTML], '']);
|
|
365
364
|
assert.deepStrictEqual(
|
|
366
|
-
inspect(parser, input('~~~table\n#! 1.1\n-\n:!+ 2.1\n~~~'
|
|
365
|
+
inspect(parser, input('~~~table\n#! 1.1\n-\n:!+ 2.1\n~~~')),
|
|
367
366
|
[[html('table', [
|
|
368
367
|
html('thead', [
|
|
369
368
|
html('tr', [html('th', { class: 'highlight' }, '1.1')]),
|
|
@@ -374,7 +373,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
374
373
|
html('tfoot'),
|
|
375
374
|
]).outerHTML], '']);
|
|
376
375
|
assert.deepStrictEqual(
|
|
377
|
-
inspect(parser, input('~~~table\n#!+ 1.1\n-\n: 2.1\n~~~'
|
|
376
|
+
inspect(parser, input('~~~table\n#!+ 1.1\n-\n: 2.1\n~~~')),
|
|
378
377
|
[[html('table', [
|
|
379
378
|
html('thead', [
|
|
380
379
|
html('tr', [html('th', { class: 'highlight', 'data-highlight-extension': '+' }, '1.1')]),
|
|
@@ -385,7 +384,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
385
384
|
html('tfoot'),
|
|
386
385
|
]).outerHTML], '']);
|
|
387
386
|
assert.deepStrictEqual(
|
|
388
|
-
inspect(parser, input('~~~table\n#!+ 1.1\n# 1.2\n: 1.3\n~~~'
|
|
387
|
+
inspect(parser, input('~~~table\n#!+ 1.1\n# 1.2\n: 1.3\n~~~')),
|
|
389
388
|
[[html('table', [
|
|
390
389
|
html('thead'),
|
|
391
390
|
html('tbody', [
|
|
@@ -398,7 +397,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
398
397
|
html('tfoot'),
|
|
399
398
|
]).outerHTML], '']);
|
|
400
399
|
assert.deepStrictEqual(
|
|
401
|
-
inspect(parser, input('~~~table\n: 1.1\n# 1.2\n#!+ 1.3\n~~~'
|
|
400
|
+
inspect(parser, input('~~~table\n: 1.1\n# 1.2\n#!+ 1.3\n~~~')),
|
|
402
401
|
[[html('table', [
|
|
403
402
|
html('thead'),
|
|
404
403
|
html('tbody', [
|
|
@@ -411,7 +410,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
411
410
|
html('tfoot'),
|
|
412
411
|
]).outerHTML], '']);
|
|
413
412
|
assert.deepStrictEqual(
|
|
414
|
-
inspect(parser, input('~~~table\n#!+ 1.1\n-\n# 2.1\n-\n: 3.1\n~~~'
|
|
413
|
+
inspect(parser, input('~~~table\n#!+ 1.1\n-\n# 2.1\n-\n: 3.1\n~~~')),
|
|
415
414
|
[[html('table', [
|
|
416
415
|
html('thead', [
|
|
417
416
|
html('tr', [html('th', { class: 'highlight', 'data-highlight-extension': '+' }, '1.1')]),
|
|
@@ -423,7 +422,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
423
422
|
html('tfoot'),
|
|
424
423
|
]).outerHTML], '']);
|
|
425
424
|
assert.deepStrictEqual(
|
|
426
|
-
inspect(parser, input('~~~table\n#:2!+ 1.1\n: 1.3\n~~~'
|
|
425
|
+
inspect(parser, input('~~~table\n#:2!+ 1.1\n: 1.3\n~~~')),
|
|
427
426
|
[[html('table', [
|
|
428
427
|
html('thead'),
|
|
429
428
|
html('tbody', [
|
|
@@ -435,7 +434,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
435
434
|
html('tfoot'),
|
|
436
435
|
]).outerHTML], '']);
|
|
437
436
|
assert.deepStrictEqual(
|
|
438
|
-
inspect(parser, input('~~~table\n#2:!+ 1.1\n-\n: 3.1\n~~~'
|
|
437
|
+
inspect(parser, input('~~~table\n#2:!+ 1.1\n-\n: 3.1\n~~~')),
|
|
439
438
|
[[html('table', [
|
|
440
439
|
html('thead', [
|
|
441
440
|
html('tr', [html('th', { class: 'highlight', rowspan: '2', 'data-highlight-extension': '+' }, '1.1')]),
|
|
@@ -446,7 +445,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
446
445
|
html('tfoot'),
|
|
447
446
|
]).outerHTML], '']);
|
|
448
447
|
assert.deepStrictEqual(
|
|
449
|
-
inspect(parser, input('~~~table\n-\n# \n#!+ 1.2\n-\n#!+ 2.1\n: 2.2\n~~~'
|
|
448
|
+
inspect(parser, input('~~~table\n-\n# \n#!+ 1.2\n-\n#!+ 2.1\n: 2.2\n~~~')),
|
|
450
449
|
[[html('table', [
|
|
451
450
|
html('thead', [
|
|
452
451
|
html('tr', [
|
|
@@ -463,7 +462,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
463
462
|
html('tfoot'),
|
|
464
463
|
]).outerHTML], '']);
|
|
465
464
|
assert.deepStrictEqual(
|
|
466
|
-
inspect(parser, input('~~~table\n-\n# \n#!+ 1.2\n-\n#!+ 2.1\n:! 2.2\n~~~'
|
|
465
|
+
inspect(parser, input('~~~table\n-\n# \n#!+ 1.2\n-\n#!+ 2.1\n:! 2.2\n~~~')),
|
|
467
466
|
[[html('table', [
|
|
468
467
|
html('thead', [
|
|
469
468
|
html('tr', [
|
|
@@ -480,7 +479,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
480
479
|
html('tfoot'),
|
|
481
480
|
]).outerHTML], '']);
|
|
482
481
|
assert.deepStrictEqual(
|
|
483
|
-
inspect(parser, input('~~~table\n-\n# 1.1\n#!+ 1.2\n-\n# 2.1\n:2:2 2.2\n: 2.4\n-\n#!+ 3.1\n: 3.4\n-\n# 4.1\n: 4.2\n~~~'
|
|
482
|
+
inspect(parser, input('~~~table\n-\n# 1.1\n#!+ 1.2\n-\n# 2.1\n:2:2 2.2\n: 2.4\n-\n#!+ 3.1\n: 3.4\n-\n# 4.1\n: 4.2\n~~~')),
|
|
484
483
|
[[html('table', [
|
|
485
484
|
html('thead', [
|
|
486
485
|
html('tr', [
|
|
@@ -506,7 +505,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
506
505
|
html('tfoot'),
|
|
507
506
|
]).outerHTML], '']);
|
|
508
507
|
assert.deepStrictEqual(
|
|
509
|
-
inspect(parser, input('~~~table\n-\n# 1.1\n#:2!+ 1.2\n-\n#2:!+ 2.1\n: 2.2\n-\n3.2\n3.3\n~~~'
|
|
508
|
+
inspect(parser, input('~~~table\n-\n# 1.1\n#:2!+ 1.2\n-\n#2:!+ 2.1\n: 2.2\n-\n3.2\n3.3\n~~~')),
|
|
510
509
|
[[html('table', [
|
|
511
510
|
html('thead', [
|
|
512
511
|
html('tr', [
|
|
@@ -532,7 +531,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
532
531
|
`-\n# 1\n${[...Array(32)].map((_, i) => `: ${i + 2}`).join('\n')}`,
|
|
533
532
|
`-\n#!+ 1\n${[...Array(32)].map((_, i) => `: ${i + 2}`).join('\n')}`,
|
|
534
533
|
'~~~'
|
|
535
|
-
].join('\n')
|
|
534
|
+
].join('\n'))),
|
|
536
535
|
[[html('table', [
|
|
537
536
|
html('thead'),
|
|
538
537
|
html('tbody', [
|
|
@@ -552,7 +551,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
552
551
|
`-\n${[...Array(32)].map((_, i) => `: ${i + 1}`).join('\n')}\n# 33`,
|
|
553
552
|
`-\n${[...Array(32)].map((_, i) => `: ${i + 1}`).join('\n')}\n#!+ 33`,
|
|
554
553
|
'~~~'
|
|
555
|
-
].join('\n')
|
|
554
|
+
].join('\n'))),
|
|
556
555
|
[[html('table', [
|
|
557
556
|
html('thead'),
|
|
558
557
|
html('tbody', [
|
|
@@ -572,7 +571,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
572
571
|
`-\n${[...Array(32)].map((_, i) => `# ${i + 1}`).join('\n')}\n#!+ 33`,
|
|
573
572
|
`-\n${[...Array(33)].map((_, i) => `: ${i + 1}`).join('\n')}`,
|
|
574
573
|
'~~~'
|
|
575
|
-
].join('\n')
|
|
574
|
+
].join('\n'))),
|
|
576
575
|
[[html('table', [
|
|
577
576
|
html('thead', [
|
|
578
577
|
html('tr', [
|
|
@@ -592,7 +591,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
592
591
|
'~~~table',
|
|
593
592
|
`${[...Array(7)].map((_, i) => `#${'!'.repeat(i + 1)} ${i + 1}`).join('\n')}`,
|
|
594
593
|
'~~~'
|
|
595
|
-
].join('\n')
|
|
594
|
+
].join('\n'))),
|
|
596
595
|
[[html('table', [
|
|
597
596
|
html('thead', [
|
|
598
597
|
html('tr', [
|
|
@@ -609,7 +608,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
609
608
|
'~~~table',
|
|
610
609
|
`${[...Array(7)].map((_, i) => `:${'!'.repeat(i + 1)} ${i + 1}`).join('\n')}`,
|
|
611
610
|
'~~~'
|
|
612
|
-
].join('\n')
|
|
611
|
+
].join('\n'))),
|
|
613
612
|
[[html('table', [
|
|
614
613
|
html('thead'),
|
|
615
614
|
html('tbody', [
|
|
@@ -622,7 +621,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
622
621
|
html('tfoot'),
|
|
623
622
|
]).outerHTML], '']);
|
|
624
623
|
assert.deepStrictEqual(
|
|
625
|
-
inspect(parser, input('~~~table\n#!+ 1\n: 2\n:! 3\n~~~'
|
|
624
|
+
inspect(parser, input('~~~table\n#!+ 1\n: 2\n:! 3\n~~~')),
|
|
626
625
|
[[html('table', [
|
|
627
626
|
html('thead'),
|
|
628
627
|
html('tbody', [
|
|
@@ -635,7 +634,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
635
634
|
html('tfoot'),
|
|
636
635
|
]).outerHTML], '']);
|
|
637
636
|
assert.deepStrictEqual(
|
|
638
|
-
inspect(parser, input('~~~table\n! 1.1\n!!!!!! 1.2\n!!!!!!! 1.3\n~~~'
|
|
637
|
+
inspect(parser, input('~~~table\n! 1.1\n!!!!!! 1.2\n!!!!!!! 1.3\n~~~')),
|
|
639
638
|
[[html('table', [
|
|
640
639
|
html('thead'),
|
|
641
640
|
html('tbody', [
|
|
@@ -651,7 +650,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
651
650
|
|
|
652
651
|
it('merge', () => {
|
|
653
652
|
assert.deepStrictEqual(
|
|
654
|
-
inspect(parser, input('~~~table\n:: 1.1\n~~~'
|
|
653
|
+
inspect(parser, input('~~~table\n:: 1.1\n~~~')),
|
|
655
654
|
[[html('table', [
|
|
656
655
|
html('thead'),
|
|
657
656
|
html('tbody', [
|
|
@@ -660,7 +659,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
660
659
|
html('tfoot'),
|
|
661
660
|
]).outerHTML], '']);
|
|
662
661
|
assert.deepStrictEqual(
|
|
663
|
-
inspect(parser, input('~~~table\n:0:0 1.1\n~~~'
|
|
662
|
+
inspect(parser, input('~~~table\n:0:0 1.1\n~~~')),
|
|
664
663
|
[[html('table', [
|
|
665
664
|
html('thead'),
|
|
666
665
|
html('tbody', [
|
|
@@ -669,7 +668,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
669
668
|
html('tfoot'),
|
|
670
669
|
]).outerHTML], '']);
|
|
671
670
|
assert.deepStrictEqual(
|
|
672
|
-
inspect(parser, input('~~~table\n:01:01 1.1\n~~~'
|
|
671
|
+
inspect(parser, input('~~~table\n:01:01 1.1\n~~~')),
|
|
673
672
|
[[html('table', [
|
|
674
673
|
html('thead'),
|
|
675
674
|
html('tbody', [
|
|
@@ -678,7 +677,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
678
677
|
html('tfoot'),
|
|
679
678
|
]).outerHTML], '']);
|
|
680
679
|
assert.deepStrictEqual(
|
|
681
|
-
inspect(parser, input('~~~table\n:1:1 1.1\n~~~'
|
|
680
|
+
inspect(parser, input('~~~table\n:1:1 1.1\n~~~')),
|
|
682
681
|
[[html('table', [
|
|
683
682
|
html('thead'),
|
|
684
683
|
html('tbody', [
|
|
@@ -687,7 +686,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
687
686
|
html('tfoot'),
|
|
688
687
|
]).outerHTML], '']);
|
|
689
688
|
assert.deepStrictEqual(
|
|
690
|
-
inspect(parser, input('~~~table\n:2: 1.1\n~~~'
|
|
689
|
+
inspect(parser, input('~~~table\n:2: 1.1\n~~~')),
|
|
691
690
|
[[html('table', [
|
|
692
691
|
html('thead'),
|
|
693
692
|
html('tbody', [
|
|
@@ -696,7 +695,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
696
695
|
html('tfoot'),
|
|
697
696
|
]).outerHTML], '']);
|
|
698
697
|
assert.deepStrictEqual(
|
|
699
|
-
inspect(parser, input('~~~table\n::2 1.1\n~~~'
|
|
698
|
+
inspect(parser, input('~~~table\n::2 1.1\n~~~')),
|
|
700
699
|
[[html('table', [
|
|
701
700
|
html('thead'),
|
|
702
701
|
html('tbody', [
|
|
@@ -705,7 +704,7 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
705
704
|
html('tfoot'),
|
|
706
705
|
]).outerHTML], '']);
|
|
707
706
|
assert.deepStrictEqual(
|
|
708
|
-
inspect(parser, input('~~~table\n:2:3 1.1\n~~~'
|
|
707
|
+
inspect(parser, input('~~~table\n:2:3 1.1\n~~~')),
|
|
709
708
|
[[html('table', [
|
|
710
709
|
html('thead'),
|
|
711
710
|
html('tbody', [
|
|
@@ -717,10 +716,10 @@ describe('Unit: parser/block/extension/table', () => {
|
|
|
717
716
|
|
|
718
717
|
it('type', () => {
|
|
719
718
|
assert.deepStrictEqual(
|
|
720
|
-
inspect(parser, input('~~~table/invalid\n~~~'
|
|
719
|
+
inspect(parser, input('~~~table/invalid\n~~~')),
|
|
721
720
|
[['<pre class="invalid" translate="no">~~~table/invalid\n~~~</pre>'], '']);
|
|
722
721
|
assert.deepStrictEqual(
|
|
723
|
-
inspect(parser, input('~~~table/grid\n~~~'
|
|
722
|
+
inspect(parser, input('~~~table/grid\n~~~')),
|
|
724
723
|
[[html('table', { 'data-type': 'grid' }).outerHTML], '']);
|
|
725
724
|
});
|
|
726
725
|
|