Turn a character vector into a valid markdown list block. This is a generic
function that calls md_bullet(), md_order(), or md_task() depending on
what string is provided in the type argument.
md_list(x, type = c("bullet", "ordered", "task"), ...)A character vector of list items.
The type of list to create; either bullet, ordered, or task.
Arguments passed to the appropriate list type function.
A glue vector with length equal to x.
md_list(state.name[1:5], type = "bullet", marker = "+")
#> + Alabama
#> + Alaska
#> + Arizona
#> + Arkansas
#> + California
md_list(state.name[6:10], type = "ordered", marker = ")")
#> 1) Colorado
#> 2) Connecticut
#> 3) Delaware
#> 4) Florida
#> 5) Georgia
md_list(state.name[11:15], type = "task", check = 3:5)
#> * [ ] Hawaii
#> * [ ] Idaho
#> * [x] Illinois
#> * [x] Indiana
#> * [x] Iowa