Skip to content

Commit

Permalink
provide files_dir attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
jjallaire committed Oct 7, 2020
1 parent 348ed78 commit eae4afa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
================================================================================
Expand Down
5 changes: 4 additions & 1 deletion R/render.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down

0 comments on commit eae4afa

Please sign in to comment.