Skip to content

Trailing newlines ignored #491

@davidchall

Description

@davidchall

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)

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