Skip to content

Commit

Permalink
when there is only one field in config, should drop(cfg) to make it a…
Browse files Browse the repository at this point in the history
… vector
  • Loading branch information
yihui committed Apr 8, 2013
1 parent 104dc4e commit 8431e7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/pandoc.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pandoc = function(input, format = 'html', config = getOption('config.pandoc')) {
cfg = read.dcf(con)
if (nrow(cfg) == 0L) cfg = character(0) else if (nrow(cfg) == 1L) {
if ('format' %in% colnames(cfg)) {
if (cfg[1L, 'format'] != format) cfg = NA
cfg = if (cfg[1L, 'format'] == format) drop(cfg) else NA
} else {cmn = drop(cfg); cfg = NA}
} else {
if (!('format' %in% colnames(cfg)))
Expand Down

0 comments on commit 8431e7d

Please sign in to comment.