We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 23f5cf6 commit 3f7e2c1Copy full SHA for 3f7e2c1
R/hooks-extra.R
@@ -82,15 +82,14 @@ hook_png = function(
82
if (is.null(opts) || isTRUE(opts)) opts = switch(
83
cmd, pngquant = '--skip-if-larger', mogrify = '-trim'
84
)
85
- if (cmd == 'pngquant') opts = paste(opts, '--ext -fs8.png')
+ if (cmd == 'pngquant') opts = c(opts, '--ext', '-fs8.png')
86
87
paths = get_plot_files()
88
paths = grep('[.]png$', paths, ignore.case = TRUE, value = TRUE)
89
90
in_base_dir(
91
lapply(paths, function(x) {
92
- cmd = paste(cmd, if (is.character(options[[cmd]])) options[[cmd]], shQuote(x))
93
- (if (is_windows()) shell else system)(cmd)
+ system2(cmd, c(opts, shQuote(x)))
94
post_process(x)
95
})
96
0 commit comments