Skip to content

Commit

Permalink
Add extra space
Browse files Browse the repository at this point in the history
  • Loading branch information
richfitz committed Jan 2, 2024
1 parent 1cad9fc commit fbe527e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions R/util.R
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,13 @@ format_bytes <- function(x) {
eval_with_hr <- function(expr, title, verbose) {
if (verbose) {
cli::cli_rule(right = "{title} {cli::symbol$arrow_down}")
on.exit(cli::cli_rule(right = "{title} {cli::symbol$arrow_up}"),
add = TRUE, after = FALSE)
## Best to leave a blank line at the end, otherwise the final line
## might not be terminated, then the horizontal rule looks very
## silly.
on.exit({
cli::cli_text()
cli::cli_rule(right = "{title} {cli::symbol$arrow_up}")
}, add = TRUE, after = FALSE)
}
force(expr)
}
Expand Down

0 comments on commit fbe527e

Please sign in to comment.