diff --git a/scripts/render_html_list.R b/scripts/render_html_list.R
index 4aec2483..6a5de18a 100644
--- a/scripts/render_html_list.R
+++ b/scripts/render_html_list.R
@@ -7,11 +7,11 @@
files <- readr::read_csv("lecture_files.csv", show_col_types = FALSE)
if(nrow(files) > 0) {
- files$files <- sapply(files$files, gsub, pattern = ".Rmd", replacement = "")
- files$files <- sapply(files$files, gsub, pattern = "modules/.*/", replacement = "")
+ files$files <- stringr::str_replace_all(files$files, pattern = ".Rmd", replacement = "")
+ files$files <- stringr::str_replace_all(files$files, pattern = "modules/.*/", replacement = "")
# Don't need to render HWs
- files <- files[!grepl("homework", files)]
+ files <- files[!grepl("homework", files$files),]
} else {
# Just render the Intro files if no others to render.
files <- data.frame(