Skip to content

Commit

Permalink
increase pandoc stack size to 512 and allow override via option
Browse files Browse the repository at this point in the history
  • Loading branch information
jjallaire committed Jun 29, 2015
1 parent 3029e6c commit 259bc3c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions R/pandoc.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ pandoc_self_contained_html <- function(input, output) {
output = output,
options = c(
"--self-contained",
"--template", template,
"+RTS", "-K64m", "-RTS"
"--template", template
)
)

Expand Down Expand Up @@ -79,6 +78,10 @@ pandoc_convert <- function(input,
# additional command line options
args <- c(args, options)

# set pandoc stack size
stack_size <- getOption("pandoc.stack.size", default = "512m")
args <- c(c("+RTS", paste0("-K", stack_size), "-RTS"), args)

# build the conversion command
command <- paste(quoted(pandoc()), paste(quoted(args), collapse = " "))

Expand Down

0 comments on commit 259bc3c

Please sign in to comment.