File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -900,15 +900,12 @@ render <- function(input,
900900 # render to temporary file (preserve extension)
901901 # this also ensures we don't pass a file path with invalid
902902 # characters to our pandoc invocation
903- file_ext <- xfun :: file_ext(output )
904- ext <- if (nzchar(file_ext ))
905- paste(" ." , file_ext , sep = " " )
906- else
907- " "
903+ ext <- xfun :: file_ext(output )
904+ if (ext != ' ' ) ext <- paste0(' .' , ext )
908905
909906 # render to a path in the current working directory
910907 # (avoid passing invalid characters to shell)
911- pandoc_output_tmp <- basename(tempfile(" pandoc" , tmpdir = getwd(), fileext = ext ))
908+ pandoc_output_tmp <- basename(tempfile(" pandoc" , getwd(), ext ))
912909
913910 # clean up temporary file on exit
914911 on.exit(unlink(pandoc_output_tmp ), add = TRUE )
You can’t perform that action at this time.
0 commit comments