Skip to content

cli::cli() fails when explicitly closing a container #496

Closed
@davidchall

Description

@davidchall

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions