current_input() gives unexpected extension for quarto documents
Author
Hi.
Please consider:
```{r} knitr::current_input() ```
If I save this as doc1.rmd
and render it, the result is
## [1] "doc1.rmd"
If I save this as doc2.qmd
and render it, the result is
[1] "doc2.rmarkdown"
My expectation for the quarto file is
[1] "doc2.qmd"
I hope you agree.
> xfun::session_info('knitr') R version 4.4.2 (2024-10-31) Platform: x86_64-pc-linux-gnu Running under: Ubuntu 24.04.1 LTS, RStudio 2024.9.1.394 Locale: LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C Package version: evaluate_1.0.1 graphics_4.4.2 grDevices_4.4.2 highr_0.11 knitr_1.49 methods_4.4.2 stats_4.4.2 tools_4.4.2 utils_4.4.2 xfun_0.49 yaml_2.3.10
By filing an issue to this repo, I promise that
- I have fully read the issue guide at https://yihui.org/issue/.
- 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.
- 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.
current_input() gives unexpected extension for quarto documents
Author
Hi.
Please consider:
```{r} knitr::current_input() ```
If I save this as doc1.rmd
and render it, the result is
## [1] "doc1.rmd"
If I save this as doc2.qmd
and render it, the result is
[1] "doc2.rmarkdown"
My expectation for the quarto file is
[1] "doc2.qmd"
I hope you agree.
> xfun::session_info('knitr') R version 4.4.2 (2024-10-31) Platform: x86_64-pc-linux-gnu Running under: Ubuntu 24.04.1 LTS, RStudio 2024.9.1.394 Locale: LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C Package version: evaluate_1.0.1 graphics_4.4.2 grDevices_4.4.2 highr_0.11 knitr_1.49 methods_4.4.2 stats_4.4.2 tools_4.4.2 utils_4.4.2 xfun_0.49 yaml_2.3.10
By filing an issue to this repo, I promise that
- I have fully read the issue guide at https://yihui.org/issue/.
- 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.
- 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.