blob: a32952de680370fe0e76287755922e935b85d31b (
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
|
Pandoc (with slightly changed indents):
.
Term 1
: Definition 1
Term 2 with *inline markup*
: Definition 2
{ some code, part of Definition 2 }
Third paragraph of definition 2.
.
<dl>
<dt>Term 1</dt>
<dd>
<p>Definition 1</p>
</dd>
<dt>Term 2 with <em>inline markup</em></dt>
<dd>
<p>Definition 2</p>
<pre><code>{ some code, part of Definition 2 }
</code></pre>
<p>Third paragraph of definition 2.</p>
</dd>
</dl>
.
Pandoc again:
.
Term 1
: Definition
with lazy continuation.
Second paragraph of the definition.
.
<dl>
<dt>Term 1</dt>
<dd>
<p>Definition
with lazy continuation.</p>
<p>Second paragraph of the definition.</p>
</dd>
</dl>
.
Well, I might just copy-paste the third one while I'm at it:
.
Term 1
~ Definition 1
Term 2
~ Definition 2a
~ Definition 2b
.
<dl>
<dt>Term 1</dt>
<dd>Definition 1</dd>
<dt>Term 2</dt>
<dd>Definition 2a</dd>
<dd>Definition 2b</dd>
</dl>
.
Now, with our custom ones. Spaces after a colon:
.
Term 1
: paragraph
Term 2
: code block
.
<dl>
<dt>Term 1</dt>
<dd>paragraph</dd>
<dt>Term 2</dt>
<dd>
<pre><code>code block
</code></pre>
</dd>
</dl>
.
There should be something after a colon by the way:
.
Non-term 1
:
Non-term 2
:
.
<p>Non-term 1
:</p>
<p>Non-term 2
:</p>
.
List is tight iff all dts are tight:
.
Term 1
: foo
: bar
Term 2
: foo
: bar
.
<dl>
<dt>Term 1</dt>
<dd>
<p>foo</p>
</dd>
<dd>
<p>bar</p>
</dd>
<dt>Term 2</dt>
<dd>
<p>foo</p>
</dd>
<dd>
<p>bar</p>
</dd>
</dl>
.
Regression test (first paragraphs shouldn't be tight):
.
Term 1
: foo
bar
Term 2
: foo
.
<dl>
<dt>Term 1</dt>
<dd>
<p>foo</p>
<p>bar
Term 2</p>
</dd>
<dd>
<p>foo</p>
</dd>
</dl>
.
Definition lists should be second last in the queue. Exemplī grātiā, this isn't a valid one:
.
# test
: just a paragraph with a colon
.
<h1>test</h1>
<p>: just a paragraph with a colon</p>
.
Nested definition lists:
.
test
: foo
: bar
: baz
: bar
: foo
.
<dl>
<dt>test</dt>
<dd>
<dl>
<dt>foo</dt>
<dd>
<dl>
<dt>bar</dt>
<dd>baz</dd>
</dl>
</dd>
<dd>bar</dd>
</dl>
</dd>
<dd>foo</dd>
</dl>
.
Regression test, tabs
.
Term 1
: code block
.
<dl>
<dt>Term 1</dt>
<dd>
<pre><code>code block
</code></pre>
</dd>
</dl>
.
Regression test (blockquote inside deflist)
.
foo
: > bar
: baz
.
<dl>
<dt>foo</dt>
<dd>
<blockquote>
<p>bar</p>
</blockquote>
</dd>
<dd>baz</dd>
</dl>
.
Coverage, 1 blank line
.
test
.
<p>test</p>
.
Coverage, 2 blank lines
.
test
.
<p>test</p>
.
|