Skip to content

Commit

Permalink
absolute paths
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentarelbundock committed Jan 23, 2024
1 parent d0a2d1f commit dad5e43
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/plot_tt.R
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,13 @@ plot_tt_lazy <- function(x,
cell <- sprintf(cell, height, images)

} else if (meta(x)$output == "html") {
images <- paste0("./", images)
images <- sapply(images, path.expand)
cell <- ifelse(
grepl("^http", trimws(images)),
'<img src="%s" style="height: %sem;">',
'<img src="./%s" style="height: %sem;">')
# '<img src="./%s" style="height: %sem;">')
'<img src="%s" style="height: %sem;">')
cell <- sprintf(cell, images, height)

} else if (meta(x)$output == "markdown") {
Expand Down

0 comments on commit dad5e43

Please sign in to comment.