-
Notifications
You must be signed in to change notification settings - Fork 84
Open
Description
The function that is supposed to simplify the image strings expects strings of the form .
Lines 335 to 339 in 07cd5d7
| # input:  | |
| # output: https://i.imgur.com/woc4vHs.png | |
| simplify_image_links <- function(x) { | |
| sub("(^!\\[\\]\\()(.+)(\\)$)", "\\2", x, perl = TRUE) | |
| } |
If this was the input, the code would work fine
x <- ""
sub("(^!\\[\\]\\()(.+)(\\)$)", "\\2", x, perl = TRUE)
#> [1] "https://i.imgur.com/woc4vHs.png"However, the actual input includes empty html strings and has the form <!-- -->
In this case, the function fails to simplify the link
x <- "<!-- -->"
sub("(^!\\[\\]\\()(.+)(\\)$)", "\\2", x, perl = TRUE)
#> [1] "<!-- -->"The result is that links aren't simplified when doing reprex(venue = "slack") as the below example shows (I put the image link in backticks)
library(ggplot2)
ggplot(mtcars, aes(disp, qsec)) +
geom_point()
<!-- -->
Metadata
Metadata
Assignees
Labels
No labels