-
-
Notifications
You must be signed in to change notification settings - Fork 981
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Folding occurs on result code blocks that have specific language classes #1603
Comments
This has been now generalized by the PR #1835 but it did not fix this specific issue. folding is still apply also on the output code chunk if it has the language class (or The related issue in yihui/knitr#1730 could help solve it to target source or output only. For now nothing differentiate source code block from output code block |
So, it possible to fold an arbitrary piece of code block which is not assigned any language?
Another option would be to assign any language to it, so that it folds, but skip syntax coloring.
|
If you want to fold languages not on the list, add
This is done by #1835 |
BTW, I recommend open a new issue when the topic does not match exactly. By doing so, you will also see an issue guide that suggests you ask questions on RStudio Community or Stack Overflow. |
Thanks @atusy ! Class is Documentation is here: https://bookdown.org/yihui/rmarkdown-cookbook/fold-show.html |
Oops, my typo. Thanks @cderv |
Currently, application of code folding depends on whether code blocks have specific language classes (
r
,python
,bash
,sql
,cpp
,stan
,julia
)rmarkdown/inst/rmd/h/navigation-1.1/codefolding.js
Line 20 in d4b7bf1
Thus, code folding is applied for result code blocks if they have the above classes.
This can be an unexpected behavior for users.
xfun::session_info('rmarkdown')
By filing an issue to this repo, I promise that
xfun::session_info('rmarkdown')
. 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('rstudio/rmarkdown')
.I understand that my issue may be closed if I don't fulfill my promises.
The text was updated successfully, but these errors were encountered: