-
Notifications
You must be signed in to change notification settings - Fork 83
Closed
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior
Milestone
Description
Currently it appears that both of these list interfaces only support at most two levels of nesting. See the examples below for either ul, ol, or mixed cases:
test_ul = function(n = 2) {
for(i in seq_len(n)) {
cli::cli_ul()
cli::cli_li(paste0("Level ",i))
}
}
test_ul(2)
#> ● Level 1
#> ◯ Level 2
test_ul(3)
#> ● Level 1
#> ◯ Level 2
#> ─ Level 3
test_ul(4)
#> ● Level 1
#> ◯ Level 2
#> ─ Level 3
#> ─ Level 4test_ol = function(n = 2) {
for(i in seq_len(n)) {
cli::cli_ol()
cli::cli_li(paste0("Level ",i))
}
}
test_ol(2)
#> 1. Level 1
#> 1. Level 2
test_ol(3)
#> 1. Level 1
#> 1. Level 2
#> 1. Level 3
test_ol(4)
#> 1. Level 1
#> 1. Level 2
#> 1. Level 3
#> 1. Level 4test_ol_ul = function(n = 2) {
for(i in seq_len(n)) {
cli::cli_ol()
cli::cli_li(paste0("Level ",2*i-1))
cli::cli_ul()
cli::cli_li(paste0("Level ",2*i))
}
}
test_ol_ul(1)
#> 1. Level 1
#> ● Level 2
test_ol_ul(2)
#> 1. Level 1
#> ● Level 2
#> 1. Level 3
#> ◯ Level 4
test_ol_ul(3)
#> 1. Level 1
#> ● Level 2
#> 1. Level 3
#> ◯ Level 4
#> 1. Level 5
#> ─ Level 6test_ul_ol = function(n = 2) {
for(i in seq_len(n)) {
cli::cli_ul()
cli::cli_li(paste0("Level ",2*i-1))
cli::cli_ol()
cli::cli_li(paste0("Level ",2*i))
}
}
test_ul_ol(1)
#> ● Level 1
#> 1. Level 2
test_ul_ol(2)
#> ● Level 1
#> 1. Level 2
#> ◯ Level 3
#> 1. Level 4
test_ul_ol(3)
#> ● Level 1
#> 1. Level 2
#> ◯ Level 3
#> 1. Level 4
#> ─ Level 5
#> 1. Level 6Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior