cli icon indicating copy to clipboard operation
cli copied to clipboard

Trailing newlines ignored

Open davidchall opened this issue 2 years ago • 0 comments

In functions with wrapping, we use the form feed character "\f" to force a newline. I've found that this is handled inconsistently though. If the form feed is at the end of the string, then it is ignored.

# middle: works
cli::cli_text("a\fb")
#> a
#> b

# start: works
cli::cli_text("\fb")
#> 
#> b

# end: fails
cli::cli_text("a\f")
#> a

Created on 2022-06-30 by the reprex package (v2.0.1)

davidchall avatar Jun 30 '22 15:06 davidchall