cli icon indicating copy to clipboard operation
cli copied to clipboard

`cli::cli()` fails when explicitly closing a container

Open davidchall opened this issue 2 years ago • 0 comments

When closing a container by explicitly passing the container ID, this raises an error when performed within a cli::cli() call.

cli::cli({
  cli::cli_ul("a bullet")
})
#> • a bullet

cli::cli({
  cli::cli_ul()
  cli::cli_li("a bullet")
  cli::cli_end()
})
#> • a bullet

cli::cli({
  lid <- cli::cli_ul()
  cli::cli_li("a bullet")
  cli::cli_end(lid)
})
#> Warning in is.null(id) || is.na(id): 'length(x) = 4 > 1' in coercion to
#> 'logical(1)'
#> Error in if (id == "body") {: the condition has length > 1

Created on 2022-07-14 by the reprex package (v2.0.1)

davidchall avatar Jul 14 '22 15:07 davidchall