use .r instead of .source for code chunks
authorFrancois Michonneau <francois.michonneau@gmail.com>
Wed, 22 Jun 2016 14:48:05 +0000 (10:48 -0400)
committerFrancois Michonneau <francois.michonneau@gmail.com>
Wed, 22 Jun 2016 14:48:05 +0000 (10:48 -0400)
bin/chunk-options.R

index df526113266e2519762b84bc283f3a48069f8b7e..9765b7f009681568d57f630ea705242020a6fd9a 100644 (file)
@@ -21,9 +21,9 @@ 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) {