Skip to content

Commit

Permalink
fix: looking for pdf files too
Browse files Browse the repository at this point in the history
  • Loading branch information
daroczig committed Jan 14, 2013
1 parent cf08071 commit e594567
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
38 changes: 19 additions & 19 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -3,47 +3,47 @@ export(add.significance.stars)
export(cache.off)
export(cache.on)
export(eval.msgs)
export(evals)
export(evals.option)
export(evals)
export(evalsOptions)
export(openFileInOS)
export(p)
export(pander)
export(pander.option)
export(panderOptions)
export(pander.return)
export(pandoc)
export(Pandoc)
export(pander)
export(panderOptions)
export(Pandoc.brew)
export(Pandoc.convert)
export(pandoc.emphasis)
export(pandoc.emphasis.return)
export(pandoc.footnote)
export(pandoc.emphasis)
export(pandoc.footnote.return)
export(pandoc.header)
export(pandoc.footnote)
export(pandoc.header.return)
export(pandoc.horizontal.rule)
export(pandoc.header)
export(pandoc.horizontal.rule.return)
export(pandoc.image)
export(pandoc.horizontal.rule)
export(pandoc.image.return)
export(pandoc.image)
export(pandoc.indent)
export(pandoc.link)
export(pandoc.link.return)
export(pandoc.list)
export(pandoc.link)
export(pandoc.list.return)
export(pandoc.p)
export(pandoc.list)
export(pandoc.p.return)
export(pandoc.p)
export(pandoc.return)
export(pandoc.strikeout)
export(pandoc.strikeout.return)
export(pandoc.strong)
export(pandoc.strikeout)
export(pandoc.strong.return)
export(pandoc.table)
export(pandoc.strong)
export(pandoc.table.return)
export(pandoc.title)
export(pandoc.table)
export(pandoc.title.return)
export(pandoc.verbatim)
export(pandoc.title)
export(pandoc.verbatim.return)
export(pandoc.verbatim)
export(pandoc)
export(Pandoc)
export(redraw.recordedplot)
export(remove.extra.newlines)
export(repChar)
Expand All @@ -53,6 +53,7 @@ export(trim.spaces)
export(wrap)
importFrom(digest,digest)
importFrom(utils,as.roman)
S3method(pander,"NULL")
S3method(pander,anova)
S3method(pander,aov)
S3method(pander,cast_df)
Expand All @@ -69,7 +70,6 @@ S3method(pander,list)
S3method(pander,lm)
S3method(pander,logical)
S3method(pander,matrix)
S3method(pander,"NULL")
S3method(pander,numeric)
S3method(pander,POSIXct)
S3method(pander,POSIXt)
Expand Down
4 changes: 2 additions & 2 deletions R/evals.R
Original file line number Diff line number Diff line change
Expand Up @@ -708,9 +708,9 @@ evals <- function(txt, parse = TRUE, cache = TRUE, cache.mode = c('environment',
if (grepl('%n', file.name)) {
if (length(strsplit(sprintf('placeholder%splaceholder', file.name), '%n')[[1]]) > 2)
stop('File name contains more then 1 "%n"!')
similar.files <- list.files(graph.dir, pattern = sprintf('^%s\\.(jpeg|tiff|png|svg|bmp)$', gsub('%t', '[a-z0-9]*', gsub('%d|%n|%i', '[[:digit:]]*', basename(file.name)))))
similar.files <- list.files(graph.dir, pattern = sprintf('^%s\\.(jpeg|tiff|png|svg|bmp|pdf)$', gsub('%t', '[a-z0-9]*', gsub('%d|%n|%i', '[[:digit:]]*', basename(file.name)))))
if (length(similar.files) > 0) {
similar.files <- sub('\\.(jpeg|tiff|png|svg|bmp)$', '', similar.files)
similar.files <- sub('\\.(jpeg|tiff|png|svg|bmp|pdf)$', '', similar.files)
rep <- gsub('%t', '[a-z0-9]*', gsub('%d|%i', '[[:digit:]]*', strsplit(basename(file.name), '%n')[[1]]))
`%n` <- max(as.numeric(gsub(paste(rep, collapse = '|'), '', similar.files))) + 1
} else
Expand Down

0 comments on commit e594567

Please sign in to comment.