Skip to content

Commit

Permalink
remove extra line return in knitr output
Browse files Browse the repository at this point in the history
  • Loading branch information
Francois Michonneau committed Jun 22, 2016
1 parent 9bfebc4 commit ff37db0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bin/chunk-options.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@ hook_in <- function(x, options) {
}

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")
Expand Down

0 comments on commit ff37db0

Please sign in to comment.