- fix swcarpentry/r-novice-inflammation#436
# are properly formatted when the site is built.
hook_in <- function(x, options) {
# are properly formatted when the site is built.
hook_in <- function(x, options) {
+ lg <- tolower(options$engine)
+ style <- paste0(".language-", lg)
+
stringr::str_c("\n\n~~~\n",
stringr::str_c("\n\n~~~\n",
- paste0(x, collapse="\n"),
- "\n~~~\n{: .language-r}\n\n")
+ paste0(x, collapse="\n"),
+ "\n~~~\n{: ", style, "}\n\n")
}
hook_out <- function(x, options) {
}
hook_out <- function(x, options) {