-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bad formatting when passing bare lubdridate dates #665
Comments
Maybe we could fix this, but in general you should always pass string literals to cli functions. |
Then, maybe a simple |
I don't mean a character object, I mean a literal. I.e. not x <- "foobar"
cli_text(x) but cli_text("foobar") Btw.
|
Oh yes, of course it is not a date anymore, how could I miss that! OK, I get it, this makes perfect sense. Parsing BTW, I am surprised that all objects are allowed and printed bare: x = lm(1~1)
cli::cli_warn(x) #cli_text wraps it
#> Warning: 1
#> 0
#> 1
#> 1
#> 1
#> 0
#> 1111e-071
#> 0
#> lm(formula = 1 ~ 1)
#> 1 ~ 1
#> 1 Created on 2024-01-17 with reprex v2.0.2 Mostly, |
Hi,
Here is a very minor bug that happens when passing bare dates to cli.
An easy workaround is wrapping the value in curly braces.
Here is a reprex with
cli_warn()
:Created on 2024-01-17 with reprex v2.0.2
The text was updated successfully, but these errors were encountered: