blob: 84c405e07ffc9837606648fdfcd9a071b8290e07 (
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
|
tests meant to test the fixes of bug [#9047](https://github.com/jgm/pandoc/issues/9047)
```
% pandoc -f html -t html
<ul class="task-list">
<li><label><input type="checkbox" />foo</label></li>
<li><label><input type="checkbox" checked="" />bar</label></li>
<li><label><input type="button" checked="" />foobar</label></li>
<li><input id="hello" type="checkbox" checked/><label for="hello">hello</label></li>
</ul>
^D
<ul>
<li><label><input type="checkbox" />foo</label></li>
<li><label><input type="checkbox" checked="" />bar</label></li>
<li>foobar</li>
<li><label><input type="checkbox" checked="" />hello</label></li>
</ul>
```
w/ rawHTML extension a checkbox by itself is kept
```
% pandoc -f html+raw_html -t html+raw_html
<input type="checkbox" checked="" />
^D
<input type="checkbox" checked>
</input>
```
w/ rawHTML extension, a checkbox in an `li` is handled properly
```
% pandoc -f html+raw_html -t html+raw_html
<ul>
<li><input type="checkbox" checked/>foo</li>
</ul>
^D
<ul class="task-list">
<li><label><input type="checkbox" checked="" />foo</label></li>
</ul>
```
w/o rawHTML extension, a checkbox outside of an `li` is properly ignored
```
% pandoc -f html -t html
<p><input type="checkbox" checked/>foo</p>
^D
foo
```
|