You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using .val I get some strange printing, which doesn't happen if I use another inline markup like .key.
Here's a reprex:
library(cli)
n_dist<-4dim<- c(5,1)
weights_dim<- c(2,5,1)
msg<-cli::format_error(
c(
"the dimension of weights must be either:",
"{.val {n_dist}x1} or \\ {.val {n_dist}x{paste(dim, collapse = 'x')}}",
" but was {.val {paste(weights_dim, collapse = 'x')}}"
)
)
stop(msg, call.=FALSE)
#> Error: the dimension of weights must be either:#> "4x1" or "4x\"5x1\""#> but was "2x5x1"
library(cli)
msg<-cli::format_error(
c(
"the dimension of weights must be either:",
"{.key {n_dist}x1} or \\ {.key {n_dist}x{paste(dim, collapse = 'x')}}",
" but was {.key {paste(weights_dim, collapse = 'x')}}"
)
)
stop(msg, call.=FALSE)
#> Error: the dimension of weights must be either:#> [4x1] or [4x5x1]#> but was [2x5x1]
When using
.val
I get some strange printing, which doesn't happen if I use another inline markup like.key
.Here's a reprex:
Created on 2022-06-01 by the reprex package (v2.0.1)
Session info
Also worth noting when I do this in Rstudio, I get:
The text was updated successfully, but these errors were encountered: