---
source: basalt/src/note_editor/parser.rs
expression: "format!(\"{}\\n ---\\n\\n{}\", text, ast::nodes_to_sexp(&from_str(text), 0))"
---
## Task lists
To create a task list, start each list item with a hyphen and space followed by `[ ]`.

- [x] This is a completed task.
- [ ] This is an incomplete task.

You can toggle a task in Reading view by selecting the checkbox.

> [!tip]
> You can use any character inside the brackets to mark it as complete.
>
> - [x] Milk
> - [?] Eggs
> - [-] Eggs

 ---

(heading H2 @0..14
  "Task lists")
(paragraph @14..101
  "To create a task list, start each list item with a hyphen and space followed by "
  (Code "[ ]")
  ".")
(list @102..169
  (task Checked @102..134
    (paragraph @102..134
      "This is a completed task."))
  (task Unchecked @134..169
    (paragraph @134..169
      "This is an incomplete task.")))
(paragraph @169..234
  "You can toggle a task in Reading view by selecting the checkbox.")
(blockquote Some(Tip) @235..357
  (paragraph @246..316
    "You can use any character inside the brackets to mark it as complete.")
  (list @320..357
    (task Checked @320..331
      (paragraph @320..331
        "Milk"))
    (item Unordered @333..344
      (paragraph @333..344
        "[?] Eggs"))
    (item Unordered @346..357
      (paragraph @346..357
        "[-] Eggs"))))
