Skip to content

Commit 78f1db5

Browse files
committed
out_format() could be empty, too (when running outside knit())
1 parent 05f2195 commit 78f1db5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

R/utils.R

+2-1
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,8 @@ is_latex_output = function() {
383383
#' @rdname output_type
384384
#' @export
385385
is_html_output = function(fmt = pandoc_to(), excludes = NULL) {
386-
if (length(fmt) == 0) fmt = out_format()
386+
fmt = fmt %n% out_format()
387+
if (length(fmt) == 0) return(FALSE)
387388
if (grepl('^markdown', fmt)) fmt = 'markdown'
388389
if (fmt == 'epub3') fmt = 'epub'
389390
fmts = c('markdown', 'epub', 'epub2', 'html', 'html4', 'html5', 'revealjs', 's5', 'slideous', 'slidy', 'gfm')

0 commit comments

Comments
 (0)