From eae4afa90ff4a5a965758d4e7c137fe4e1c98b47 Mon Sep 17 00:00:00 2001 From: JJ Allaire Date: Wed, 7 Oct 2020 12:33:04 -0400 Subject: [PATCH] provide files_dir attribute --- NEWS.md | 2 ++ R/render.R | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 501df398a2..3892d02f16 100644 --- a/NEWS.md +++ b/NEWS.md @@ -5,6 +5,8 @@ rmarkdown 2.5 - `html_document` gains the `anchor_sections` argument, which is `TRUE` by default, so that readers can get links to section headers easily---when you mouse over a section hader, you will see a hash symbol `#` at the end of the header, which contains the anchor link to this header. You can click on this link and get the URL in the addres bar of your web browser, or right-click on it and copy the URL from the context menu. The hash symbol is defined by the CSS rule `a.anchor-section::before {content: '#';}`. You can customize it by overriding this rule (e.g., via the `css` argument of `html_document`) and use any other symbols or icons, e.g., `content: "\02AD8;"` (thanks, @atusy, #1884). +- Provide `files_dir` as attribute on return from `render()` when `run_pandoc = FALSE`. + rmarkdown 2.4 ================================================================================ diff --git a/R/render.R b/R/render.R index e6be4cb94c..c00dcd1495 100644 --- a/R/render.R +++ b/R/render.R @@ -1011,7 +1011,10 @@ render <- function(input, intermediates <- setdiff(intermediates, c(input, intermediates_fig)) # did not run pandoc; returns the markdown output with attributes of the # knitr meta data and intermediate files - structure(input, knit_meta = knit_meta, intermediates = intermediates) + structure(input, + knit_meta = knit_meta, + files_dir = files_dir, + intermediates = intermediates) } }