Hash :
8e01a769
Author :
Date :
2019-02-10T22:58:42
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
# Tasklists
With the flag `MD_FLAG_TASKLISTS`, MD4C enables extension for recognition of
task lists.
Basic task list may look as follows:
```````````````````````````````` example
* [x] foo
* [X] bar
* [ ] baz
.
<ul>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled checked>foo</li>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled checked>bar</li>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled>baz</li>
</ul>
````````````````````````````````
Task lists can also be in ordered lists:
```````````````````````````````` example
1. [x] foo
2. [X] bar
3. [ ] baz
.
<ol>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled checked>foo</li>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled checked>bar</li>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled>baz</li>
</ol>
````````````````````````````````
Task lists can also be nested in ordinary lists:
```````````````````````````````` example
* xxx:
* [x] foo
* [x] bar
* [ ] baz
* yyy:
* [ ] qux
* [x] quux
* [ ] quuz
.
<ul>
<li>xxx:
<ul>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled checked>foo</li>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled checked>bar</li>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled>baz</li>
</ul></li>
<li>yyy:
<ul>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled>qux</li>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled checked>quux</li>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled>quuz</li>
</ul></li>
</ul>
````````````````````````````````
Or in a parent task list:
```````````````````````````````` example
1. [x] xxx:
* [x] foo
* [x] bar
* [ ] baz
2. [ ] yyy:
* [ ] qux
* [x] quux
* [ ] quuz
.
<ol>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled checked>xxx:
<ul>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled checked>foo</li>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled checked>bar</li>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled>baz</li>
</ul></li>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled>yyy:
<ul>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled>qux</li>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled checked>quux</li>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled>quuz</li>
</ul></li>
</ol>
````````````````````````````````
Also, ordinary lists can be nested in the task lists.
```````````````````````````````` example
* [x] xxx:
* foo
* bar
* baz
* [ ] yyy:
* qux
* quux
* quuz
.
<ul>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled checked>xxx:
<ul>
<li>foo</li>
<li>bar</li>
<li>baz</li>
</ul></li>
<li class="task-list-item"><input type="checkbox" class="task-list-item-checkbox" disabled>yyy:
<ul>
<li>qux</li>
<li>quux</li>
<li>quuz</li>
</ul></li>
</ul>
````````````````````````````````