Closed Sherry520 closed 1 year ago
No this is an issue with RStudio IDE directly like described in https://github.com/rstudio/rstudio/issues/10800
comment the line out with the CTRL+SHIFT+C shortcut
This feature is implemented by the IDE. I'll close this and you should follow there.
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.
The question is issued in Rstudio, but it may be the problem of rmarkdown.
https://github.com/rstudio/rstudio/issues/10800
Hi there,
I noticed that bash comments are not handled correctly in code chunks. I'm not sure which project is responsible for the situation (rmarkdown, rstudio, something else?). I submit it here since comments are well handled in .sh files in rstudio.
Reproducible example
Create an Rmd file (I used github_template but any output will do)
Insert the following code chunk:
comment the line out with the CTRL+SHIFT+C shortcut
Actual result
R version 4.1.3 (2022-03-10) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Debian GNU/Linux 11 (bullseye), RStudio 2022.2.0.443
Locale: LC_CTYPE=fr_FR.UTF-8 LC_NUMERIC=C LC_TIME=fr_FR.UTF-8 LC_COLLATE=fr_FR.UTF-8 LC_MONETARY=fr_FR.UTF-8 LC_MESSAGES=fr_FR.UTF-8
LC_PAPER=fr_FR.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=fr_FR.UTF-8 LC_IDENTIFICATION=C
Package version: base64enc_0.1.3 bslib_0.3.1 digest_0.6.29 evaluate_0.15 fastmap_1.1.0 fs_1.5.2 glue_1.6.2 graphics_4.1.3 grDevices_4.1.3 highr_0.9
htmltools_0.5.2 jquerylib_0.1.4 jsonlite_1.8.0 knitr_1.37 magrittr_2.0.2 markdown_1.1 methods_4.1.3 mime_0.12 R6_2.5.1 rappdirs_0.3.3 rlang_1.0.2 rmarkdown_2.13 sass_0.4.0 stats_4.1.3 stringi_1.7.6 stringr_1.4.0 tinytex_0.37 tools_4.1.3 utils_4.1.3 xfun_0.30
yaml_2.3.5
Pandoc version: 2.17.1.1