| 1 |
new_continuation_shaft <- function(parent) { |
| 2 |
extra_width <- get_extent(symbol$ellipsis) + 1L |
| 3 |
|
| 4 |
new_pillar_shaft( |
| 5 |
list(parent, extra_width), |
| 6 |
class = "pillar_continuation_shaft", |
| 7 |
width = get_width(parent) + extra_width, |
| 8 |
min_width = get_min_width(parent) + extra_width |
| 9 |
) |
| 10 |
} |
| 11 |
|
| 12 |
#' @export |
| 13 |
format.pillar_continuation_shaft <- function(x, width, ...) { |
| 14 |
parent <- x[[1]] |
| 15 |
extra_width <- x[[2]] |
| 16 |
|
| 17 |
parent_format <- format(parent, width = width - extra_width) |
| 18 |
|
| 19 |
new_ornament( |
| 20 |
paste0(parent_format, " ", symbol$ellipsis), |
| 21 |
width = width, |
| 22 |
align = attr(parent_format, "align", exact = TRUE) |
| 23 |
) |
| 24 |
} |