Skip to content

Commit 192f1ef

Browse files
committed
mdman: Add a test for an option with paragraphs
This test illustrates that the HTML is generated incorrectly with a `</p>` tag.
1 parent 284eefc commit 192f1ef

File tree

4 files changed

+50
-0
lines changed

4 files changed

+50
-0
lines changed

crates/mdman/tests/compare/expected/options.1

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,25 @@ This has multiple flags.
5353
.RS 4
5454
A named argument.
5555
.RE
56+
.sp
57+
\fB\-\-complex\fR
58+
.RS 4
59+
This option has a list.
60+
.sp
61+
.RS 4
62+
\h'-04'\(bu\h'+03'alpha
63+
.RE
64+
.sp
65+
.RS 4
66+
\h'-04'\(bu\h'+03'beta
67+
.RE
68+
.sp
69+
.RS 4
70+
\h'-04'\(bu\h'+03'gamma
71+
.RE
72+
.sp
73+
Then text continues here.
74+
.RE
5675
.SS "Common Options"
5776
.sp
5877
\fB@\fR\fIfilename\fR

crates/mdman/tests/compare/expected/options.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,16 @@ A description of the command.
4141
<dd class="option-desc">A named argument.</dd>
4242

4343

44+
<dt class="option-term" id="option-options---complex"><a class="option-anchor" href="#option-options---complex"></a><code>--complex</code></dt>
45+
<dd class="option-desc">This option has a list.</p>
46+
<ul>
47+
<li>alpha</li>
48+
<li>beta</li>
49+
<li>gamma</li>
50+
</ul>
51+
<p>Then text continues here.</dd>
52+
53+
4454
</dl>
4555

4656
### Common Options

crates/mdman/tests/compare/expected/options.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,17 @@ OPTIONS
3232
named-arg…
3333
A named argument.
3434

35+
--complex
36+
This option has a list.
37+
38+
o alpha
39+
40+
o beta
41+
42+
o gamma
43+
44+
Then text continues here.
45+
3546
Common Options
3647
@filename
3748
Load from filename.

crates/mdman/tests/compare/options.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,16 @@ This has multiple flags.
4040
A named argument.
4141
{{/option}}
4242

43+
{{#option "`--complex`"}}
44+
This option has a list.
45+
46+
- alpha
47+
- beta
48+
- gamma
49+
50+
Then text continues here.
51+
{{/option}}
52+
4353
{{/options}}
4454

4555
### Common Options

0 commit comments

Comments
 (0)