Skip to content

Commit

Permalink
Get rid of stringr dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
cansavvy committed Aug 26, 2021
1 parent 74412a6 commit 94579ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ Imports:
curl,
rprojroot,
magrittr,
yaml,
stringr
yaml
Suggests:
didactr,
knitr,
Expand Down
5 changes: 2 additions & 3 deletions R/replace_html.R
Original file line number Diff line number Diff line change
Expand Up @@ -323,9 +323,8 @@ replace_image_data <- function(x, element = c("img", "iframe"), fullbleed = FALS
# If it has a youtube embed link, switch to the watch format link
if (grepl("https://www.youtube.com/embed", out$src)) {
out$src <- paste0("https://www.youtube.com/watch?v=",
stringr::word(out$src,
sep = "https://www.youtube.com/embed/",
start = 2)
strsplit(out$src,
split = "https://www.youtube.com/embed/")[[1]][2]
)
# If it's youtube put this image in the tag
out$type <- "video"
Expand Down

0 comments on commit 94579ac

Please sign in to comment.