list / li

block

A list holds li items; bullet by default, set style = :numbered for ordered. Nest li's for hierarchical sublists.

A list holds li items. It's a bullet list by default; set style = :numbered for a numbered one. Each li's text runs through the inline-pattern engine, so bold, code, links, and icons all work inside items. See formatting.

list {
  li "Plain item"
  li "With **bold** and a [link](wdoc_overview)"
}

list { style = :numbered
  li "First step"
  li "Second step"
}

Nesting

Nest an li inside an li for a sublist — it inherits the parent list's style, so a numbered list numbers sublists hierarchically (2.1, 2.2). For a sublist with a different style, drop a whole list block inside the li instead.

list { style = :numbered
  li "Setup"
  li "Build" {
    li "Compile"          // renders 2.1
    li "Link"             // renders 2.2
  }
  li "Run" {
    list {                // a bulleted sublist inside a numbered list
      li "Foreground"
      li "Background"
    }
  }
}

Related

- table

- callout