Skip to content

Markdown Syntax: Task Lists

Martin Mitáš edited this page Feb 11, 2019 · 1 revision

(Requires flag MD_FLAG_TASKLISTS.)

Task lists are lists which have checkboxes which can be enabled or disabled.

Their syntax is the same as that for an ordinary Markdown lists, but with [ ], [x] or [X] appended after the list item mark. The first case is for unchecked state, the other two correspond to checked state.

So, basic task list looks like this:

 * [x] Foo
 * [x] Bar
 * [ ] Baz

Lists are allowed to mix ordinary and task list items:

 - [x] Marked item
 - [ ] Unmarked item
 - Ordinary (non-task) item

Ordered lists may contain task list items too:

 1. [x] Foo
 2. [x] Bar
 3. [ ] Baz