Open b4D8 opened 2 years ago
As this is an issue regarding keyboard shortcut in the RSTUDIO IDE, I think it should be reported there.
There is nothing we can do on rmarkdown side about that unfortunately.
@kevinushey are you able to move this issue there ?
Thanks
Reproducible in RStudio Desktop 2022.06.0+198 on MacOS 12.3.
Note: This is in source mode only, and works correctly in visual mode.
Really annoying to comment out bash code in Rmarkdown!! I post the issue long time ago and it seems not solved yet...
I change bash
tag to r
everytime I want to comment out bash code, it's silly....
I am waiting for a solution!
@Yiguan Thank you for raising this. Unfortunately, we have many issues—both enhancements and bugs—to consider, and we prioritize them based on impact. One of the ways in which we measure this is by the number of upvotes in the original post. So, a way to get this higher up in the queue would be to encourage more people who have the same or similar request to give a 👍 in the first message.
FWIW, now that R Markdown supports the 'comment' engine, an easy way to comment out any engine is to change the name to comment
.
When I pasted the code commented with <!-- , error occurred:
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
github_template
but any output will do)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