Loading bin/generate_md_episodes.R +10 −8 Original line number Diff line number Diff line Loading @@ -34,8 +34,8 @@ generate_md_episodes <- function() { }, src_rmd, dest_md) # Read the generated md files and add comments advising not to edit them sapply(dest_md, function(y) { con = file(y) vapply(dest_md, function(y) { con <- file(y) mdfile <- readLines(con) if (mdfile[1] != "---") stop("Input file does not have a valid header") Loading @@ -43,8 +43,10 @@ generate_md_episodes <- function() { mdfile <- append(mdfile, paste("# Instead, please edit", basename(y), "in _episodes_rmd/"), after = 2) writeLines(mdfile, con) }) close(con) return(paste("Warning added to YAML header of", y)) }, character(1)) } generate_md_episodes() Loading
bin/generate_md_episodes.R +10 −8 Original line number Diff line number Diff line Loading @@ -34,8 +34,8 @@ generate_md_episodes <- function() { }, src_rmd, dest_md) # Read the generated md files and add comments advising not to edit them sapply(dest_md, function(y) { con = file(y) vapply(dest_md, function(y) { con <- file(y) mdfile <- readLines(con) if (mdfile[1] != "---") stop("Input file does not have a valid header") Loading @@ -43,8 +43,10 @@ generate_md_episodes <- function() { mdfile <- append(mdfile, paste("# Instead, please edit", basename(y), "in _episodes_rmd/"), after = 2) writeLines(mdfile, con) }) close(con) return(paste("Warning added to YAML header of", y)) }, character(1)) } generate_md_episodes()