File: tasklist.md

package info (click to toggle)
haskell-pandoc 3.1.11.1-3
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 23,052 kB
  • sloc: haskell: 81,285; xml: 3,855; makefile: 13
file content (105 lines) | stat: -rw-r--r-- 1,721 bytes parent folder | download
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
tests adapted from <https://github.github.com/gfm/#task-list-items-extension->

```
% pandoc
- [ ] foo
- [x] bar
^D
<ul class="task-list">
<li><label><input type="checkbox" />foo</label></li>
<li><label><input type="checkbox" checked="" />bar</label></li>
</ul>
```


```
% pandoc
- [x] foo
  - [ ] bar
  - [x] baz
- [ ] bim
^D
<ul class="task-list">
<li><label><input type="checkbox" checked="" />foo</label>
<ul class="task-list">
<li><label><input type="checkbox" />bar</label></li>
<li><label><input type="checkbox" checked="" />baz</label></li>
</ul></li>
<li><label><input type="checkbox" />bim</label></li>
</ul>
```


custom html task list test:

```
% pandoc
- [ ]  unchecked
- plain item
-  [x] checked

paragraph

1. [ ] ordered unchecked
2. [] plain item
3. [x] ordered checked

paragraph

- [ ] list item with a

    second paragraph

- [x] checked
^D
<ul>
<li><label><input type="checkbox" />unchecked</label></li>
<li>plain item</li>
<li><label><input type="checkbox" checked="" />checked</label></li>
</ul>
<p>paragraph</p>
<ol type="1">
<li><label><input type="checkbox" />ordered unchecked</label></li>
<li>[] plain item</li>
<li><label><input type="checkbox" checked="" />ordered
checked</label></li>
</ol>
<p>paragraph</p>
<ul class="task-list">
<li><p><label><input type="checkbox" />list item with a</label></p>
<p>second paragraph</p></li>
<li><p><label><input type="checkbox"
checked="" />checked</label></p></li>
</ul>
```

latex task list test:

```
% pandoc -t latex
- [ ] foo bar

  baz

- [x] ok
^D
\begin{itemize}
\item[$\square$]
  foo bar

  baz
\item[$\boxtimes$]
  ok
\end{itemize}
```

round trip:

```
% pandoc -f markdown -t markdown
- [ ] foo
- [x] bar
^D
-   [ ] foo
-   [x] bar
```