diff --git a/R/shiny2screenshot.R b/R/shiny2screenshot.R index 806aff6..d801053 100644 --- a/R/shiny2screenshot.R +++ b/R/shiny2screenshot.R @@ -310,19 +310,9 @@ snaps2rd <- function(test_file = character(), variant = variant, fps = fps ) - glue::glue_collapse( - c( - glue::glue("{{name: \\code{{{name}}}, variant: \\code{{{variant}}}"), - paste0( - "\\figure{", - path, - "}{options: width='100\\%' alt=", - snap_alt_text(), - "}}", - collapse = "" - ) - ), - sep = " " + glue_latex( + "name: \\code{[name]}, variant: \\code{[variant]} + \\figure{[path]}{options: width='100\\%' alt=[snap_alt_text()]}" ) } diff --git a/tests/testthat/_snaps/shiny2screenshot.md b/tests/testthat/_snaps/shiny2screenshot.md index ac5cdff..9086c48 100644 --- a/tests/testthat/_snaps/shiny2screenshot.md +++ b/tests/testthat/_snaps/shiny2screenshot.md @@ -65,7 +65,8 @@ Output \section{Screenshots from Tests}{ \if{html}{ - {name: \code{bins}, variant: \code{linux} \figure{crow_screenshots/helpers/bins.gif}{options: width='100\%' alt=Screenshot from App}} + name: \code{bins}, variant: \code{linux} + \figure{crow_screenshots/helpers/bins.gif}{options: width='100\%' alt=Screenshot from App} } \if{latex}{ Screenshots cannot be shown in this output format. @@ -79,8 +80,10 @@ Output \section{Screenshots from Tests}{ \if{html}{ - {name: \code{bins}, variant: \code{linux} \figure{crow_screenshots/helpers/bins.gif}{options: width='100\%' alt=Screenshot from App}} - {name: \code{bins}, variant: \code{mac} \figure{crow_screenshots/helpers/bins.gif}{options: width='100\%' alt=Screenshot from App}} + name: \code{bins}, variant: \code{linux} + \figure{crow_screenshots/helpers/bins.gif}{options: width='100\%' alt=Screenshot from App} + name: \code{bins}, variant: \code{mac} + \figure{crow_screenshots/helpers/bins.gif}{options: width='100\%' alt=Screenshot from App} } \if{latex}{ Screenshots cannot be shown in this output format.