R/check_manuscript_backticks.R

Defines functions check_manuscript_backticks

Documented in check_manuscript_backticks

#' @rdname translate_manuscript
#' @export
check_manuscript_backticks = function(file) {
  file = readLines(file)
  bad = grepl("\\s+```", file)
  if (any(bad)) {
    stop(paste0("Bad backticks on lines",
                paste(which(bad), collapse = ","))
    )
  }
}
muschellij2/didactr documentation built on March 25, 2020, 5:35 p.m.