After setting knitr::knit_hooks$set(purl = knitr::hook_purl), the filename of the rscript is also included in the knitted md file. I'm not sure if this is a WIP feature or newly introduced bug or something that's setted wrong in my machine.
<!--
Please keep the below portion in your issue. Your issue will be closed if any of the boxes is not checked (i.e., replace `[ ]` by `[x]`). In certain (rare) cases, you may be exempted if you give a brief explanation (e.g., you are only making a suggestion for improvement). Thanks!
-->
---
By filing an issue to this repo, I promise that
- [x] I have fully read the issue guide at https://yihui.org/issue/.
- [x] I have provided the necessary information about my issue.
- If I'm asking a question, I have already asked it on Stack Overflow or RStudio Community, waited for at least 24 hours, and included a link to my question there.
- If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included `xfun::session_info('knitr')`. I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version: `remotes::install_github('yihui/knitr')`.
- If I have posted the same issue elsewhere, I have also mentioned it in this issue.
- [x] I have learned the Github Markdown syntax, and formatted my issue correctly.
I understand that my issue may be closed if I don't fulfill my promises.
After setting
knitr::knit_hooks$set(purl = knitr::hook_purl)
, the filename of the rscript is also included in the knitted md file. I'm not sure if this is a WIP feature or newly introduced bug or something that's setted wrong in my machine.An example of Rmd file
title: "Template Title" author: "Your Name" date: "Last compiled on 06 June, 2024" output: html_document: toc: yes toc_float: yes number_section: yes keep_md: TRUE
D:\playground\rmarkdown\knitr_purl_hook\knitr_purl_hook.R
D:\playground\rmarkdown\knitr_purl_hook\knitr_purl_hook.R
D:\playground\rmarkdown\knitr_purl_hook\knitr_purl_hook.R