diff --git a/R/fortify.r b/R/fortify.r index 426aaa5254..1cfd32f4c2 100644 --- a/R/fortify.r +++ b/R/fortify.r @@ -35,7 +35,7 @@ fortify.grouped_df <- function(model, data, ...) { } #' @export fortify.default <- function(model, data, ...) { - msg <- "{.arg data} must be a {.cls data.frame}, or an object coercible by `fortify()`, not {obj_desc(model)}." + msg <- glue("{{.arg data}} must be a {{.cls data.frame}}, or an object coercible by `fortify()`, not {obj_desc(model)}.") if (inherits(model, "uneval")) { msg <- c( msg, diff --git a/tests/testthat/_snaps/fortify.md b/tests/testthat/_snaps/fortify.md index 5396eb5e10..24ad19b285 100644 --- a/tests/testthat/_snaps/fortify.md +++ b/tests/testthat/_snaps/fortify.md @@ -1,5 +1,5 @@ # fortify.default proves a helpful error with class uneval - `data` must be a , or an object coercible by `fortify()`, not an S3 object with class {.cls uneval}. + `data` must be a , or an object coercible by `fortify()`, not an S3 object with class . i Did you accidentally pass `aes()` to the `data` argument?