Skip to content

Commit ab8a4df

Browse files
committed
Add a test for definition lists with manual HTML tags
1 parent e2c954f commit ab8a4df

File tree

5 files changed

+47
-0
lines changed

5 files changed

+47
-0
lines changed

tests/testsuite/markdown.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,10 @@ fn definition_lists() {
157157
.check_main_file(
158158
"book/definition_lists.html",
159159
file!["markdown/definition_lists/expected_disabled/definition_lists.html"],
160+
)
161+
.check_main_file(
162+
"book/html_definition_lists.html",
163+
file!["markdown/definition_lists/expected_disabled/html_definition_lists.html"],
160164
);
161165
}
162166

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<h1 id="html-definition-lists"><a class="header" href="#html-definition-lists">HTML definition lists</a></h1>
2+
<p>Test for definition lists manually written in HTML.</p>
3+
<dl>
4+
5+
<dt id="some-tag"><a class="header" href="#some-tag">Some tag</a></dt>
6+
7+
8+
<dd>Some defintion</dd>
9+
10+
11+
<dt class="myclass" id="myid"><a class="header" href="#myid"><a class="option-anchor" href="#foo">Another definition</a></a></dt>
12+
13+
14+
<dd class="def-class">A definition.</dd>
15+
16+
</dl>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<h1 id="html-definition-lists"><a class="header" href="#html-definition-lists">HTML definition lists</a></h1>
2+
<p>Test for definition lists manually written in HTML.</p>
3+
<dl>
4+
5+
<dt id="some-tag"><a class="header" href="#some-tag">Some tag</a></dt>
6+
7+
8+
<dd>Some defintion</dd>
9+
10+
11+
<dt class="myclass" id="myid"><a class="header" href="#myid"><a class="option-anchor" href="#foo">Another definition</a></a></dt>
12+
13+
14+
<dd class="def-class">A definition.</dd>
15+
16+
</dl>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# Summary
22

33
- [Definition lists](./definition_lists.md)
4+
- [HTML definition lists](./html_definition_lists.md)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# HTML definition lists
2+
3+
Test for definition lists manually written in HTML.
4+
5+
<dl>
6+
<dt>Some tag</dt>
7+
<dd>Some defintion</dd>
8+
<dt class="myclass" id="myid"><a class="option-anchor" href="#foo">Another definition</a></dt>
9+
<dd class="def-class">A definition.</dd>
10+
</dl>

0 commit comments

Comments
 (0)