Skip to content
Snippets Groups Projects
Commit af8c7b54 authored by Greg Wilson's avatar Greg Wilson
Browse files

Merge branch '2016-06' of github.com:swcarpentry/styles into 2016-06

parents 79d6ec73 10443956
Branches
Tags
No related merge requests found
......@@ -21,18 +21,20 @@ opts_chunk$set(tidy = FALSE, results = "markup", comment = NA,
# The hooks below add html tags to the code chunks and their output so that they
# are properly formatted when the site is built.
hook_in <- function(x, options) {
stringr::str_c("\n\n~~~{.r}\n",
stringr::str_c("\n\n~~~\n",
paste0(x, collapse="\n"),
"\n~~~\n{: .source}\n\n")
"\n~~~\n{: .r}\n\n")
}
hook_out <- function(x, options) {
x <- gsub("\n$", "", x)
stringr::str_c("\n\n~~~\n",
paste0(x, collapse="\n"),
"\n~~~\n{: .output}\n\n")
}
hook_error <- function(x, options) {
x <- gsub("\n$", "", x)
stringr::str_c("\n\n~~~\n",
paste0(x, collapse="\n"),
"\n~~~\n{: .error}\n\n")
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment