diff --git a/DESCRIPTION b/DESCRIPTION index ac33568f9c..28279feb02 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: knitr Type: Package Title: A General-Purpose Package for Dynamic Report Generation in R -Version: 1.47.2 +Version: 1.47.3 Authors@R: c( person("Yihui", "Xie", role = c("aut", "cre"), email = "xie@yihui.name", comment = c(ORCID = "0000-0003-0645-5666")), person("Abhraneel", "Sarma", role = "ctb"), diff --git a/NEWS.md b/NEWS.md index b9916a8c10..e2b0e63bcc 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,6 +4,8 @@ - Fix regression from 1.46 with `collapse = TRUE` option not correctly collapsing source code and output into one when code chunk returns multiple outputs (thanks, @jennybc, @florisvdh, tidyverse/reprex#463). +- `hook_purl()` should not write the path of the R script to the output document (thanks, @fenguoerbian, #2348). + # CHANGES IN knitr VERSION 1.47 ## NEW FEATURES diff --git a/R/hooks-extra.R b/R/hooks-extra.R index fe39e81abd..0b88ca8871 100644 --- a/R/hooks-extra.R +++ b/R/hooks-extra.R @@ -155,4 +155,5 @@ hook_purl = function(before, options, ...) { ) write_utf8(code, output) } + invisible() }