summaryrefslogtreecommitdiffstats
path: root/tests/test_port/fixtures/strikethrough.md
blob: ca15b6ff00c687f7a794898d0052c0ba3653ee7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
.
~~Strikeout~~
.
<p><s>Strikeout</s></p>
.

.
x ~~~~foo~~ bar~~
.
<p>x <s><s>foo</s> bar</s></p>
.

.
x ~~foo ~~bar~~~~
.
<p>x <s>foo <s>bar</s></s></p>
.

.
x ~~~~foo~~~~
.
<p>x <s><s>foo</s></s></p>
.

.
x ~~a ~~foo~~~~~~~~~~~bar~~ b~~

x ~~a ~~foo~~~~~~~~~~~~bar~~ b~~
.
<p>x <s>a <s>foo</s></s>~~~<s><s>bar</s> b</s></p>
<p>x <s>a <s>foo</s></s>~~~~<s><s>bar</s> b</s></p>
.


Strikeouts have the same priority as emphases:
.
**~~test**~~

~~**test~~**
.
<p><strong>~~test</strong>~~</p>
<p><s>**test</s>**</p>
.


Strikeouts have the same priority as emphases with respect to links:
.
[~~link]()~~

~~[link~~]()
.
<p><a href="">~~link</a>~~</p>
<p>~~<a href="">link~~</a></p>
.


Strikeouts have the same priority as emphases with respect to backticks:
.
~~`code~~`

`~~code`~~
.
<p>~~<code>code~~</code></p>
<p><code>~~code</code>~~</p>
.


Nested strikeouts:
.
~~foo ~~bar~~ baz~~

~~f **o ~~o b~~ a** r~~
.
<p><s>foo <s>bar</s> baz</s></p>
<p><s>f <strong>o <s>o b</s> a</strong> r</s></p>
.


Should not have a whitespace between text and "~~":
.
foo ~~ bar ~~ baz
.
<p>foo ~~ bar ~~ baz</p>
.


Should parse strikethrough within link tags:
.
[~~foo~~]()
.
<p><a href=""><s>foo</s></a></p>
.


Newline should be considered a whitespace:
.
~~test
~~

~~
test~~

~~
test
~~
.
<p>~~test
~~</p>
<p>~~
test~~</p>
<p>~~
test
~~</p>
.

From CommonMark test suite, replacing `**` with our marker:

.
a~~"foo"~~
.
<p>a~~&quot;foo&quot;~~</p>
.

Coverage: single tilde
.
~a~
.
<p>~a~</p>
.

Regression test for #742:
.
-~~~~;~~~~~~
.
<p>-<s><s>;</s></s>~~</p>
.