source of pkg_file() function within rmarkdown?

Hi all,

Can anyone point me to the source for the pkg_file() function used in rmarkdown? See e.g. the source code for pandoc_lua_filters() in pandoc.R within the rmarkdown repo.

pandoc_lua_filters <- function(...) {
  args <- c()
  # lua filters was introduced in pandoc 2.0
  if (pandoc2.0()) {
    args <- c(
      rbind(
        "--lua-filter",
        pkg_file("rmd", "lua", ...)
      )
    )
  }
  args
}

It doesn't show up when I search the repo, and I haven't been able to locate it in the dependencies. Any help is greatly appreciated!

You can find it in the util.R file.

2 Likes

Thanks! Apparently I'm bad at using Github's search.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.