I noticed that there is a way to add tasklist in GFM, as mentioned in their blogpost here, https://github.com/blog/1375-task-lists-in-gfm-issues-pulls-comments
However it doesnt show any examples for task list for a ordered list. Is it supported? If so, can somebody share an example.
No, it's not supported. You can write an ordered list of checkboxes like this:
1. [ ] Foo
2. [ ] Bar
It renders as an ordered list in HTML (<ol>
), but their stylesheet removes the numbers.
So while you can express the list as an ordered list, you would need your own stylesheet to render it as such.
Note: since the introduction of nested task list (May 2014), numbered task list are still not supported, even though the following would still be rendered with <ol>
elements:
1. [ ] Figure out wormholes
1. [ ] Call @arfon
2. [ ] Research ([docs](http://en.wikipedia.org/wiki/Wormhole#Time_travel))
3. [ ] Build prototype #15
4. [ ] Test run #43 @world-domination/time-travel
2. [ ] ...?
3. [ ] Profit!
And that would give:
As in:
<ol class="task-list added">
<li class="task-list-item">
<input class="task-list-item-checkbox" type="checkbox" disabled=""></input>
<label></label>
Figure out wormholes
<ol class="task-list">
<li class="task-list-item"></li>
<li class="task-list-item"></li>
<li class="task-list-item"></li>
<li class="task-list-item"></li>
</ol>
</li>
<li class="task-list-item"></li>
<li class="task-list-item"></li>
</ol>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With