Skip to content

Instantly share code, notes, and snippets.

@privefl
Created October 4, 2018 16:27
Show Gist options
  • Save privefl/03ce727bbb96687e01f724246c16b051 to your computer and use it in GitHub Desktop.
Save privefl/03ce727bbb96687e01f724246c16b051 to your computer and use it in GitHub Desktop.
sapply(list.files(pattern = "\\.html$"), function(file) {
html <- readLines(file)
new_html <- gsub(
"https:.*?MathJax\\.js\\?",
"https://mathjax.rstudio.com/latest/MathJax.js?",
html
)
writeLines(new_html, file)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment