-
-
Notifications
You must be signed in to change notification settings - Fork 970
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
generalize code_folding of html_document #1835
Conversation
This reverts commit 650d9f8.
Note that this will also fix #1603 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Smart idea!
I'm not concerned about the cache issue. My main concern is the intermediate Markdown output. This will change the previous
```r
to
```{.r .foldable}
I'm not sure if people would like this change.
That said, I'm totally happy if we add pre.foldable
to the existing list (instead of replacing it) in codefolding.js
. Then you can turn on the foldable
class (via the option hook) by yourself if you are okay with the above change I mentioned.
Thank you!
Your suggestion sounds reasonable, and is reflected. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect. Thanks!
* rstudio/master: (61 commits) make metadata available before running pre_knit (rstudio#1855) fix rstudio#1815: apply the lua filters pagebreak.lua and latex-div.lua to beamer_presentation require the data-latex attribute on fenced Div's again: rstudio#1779 (comment) start the next version CRAN release v2.3 fold any code blocks with the class `foldable` for html_document output (rstudio#1835) fix rstudio#1828: add aria-hidden = "true" to empty <a> tags in highlighted code blocks generated by Pandoc to improve screen reader accessibility (rstudio#1833) add a news item for rstudio#1832 roxygenize no need to turn on --file-scope or actually write the split content into files if the split content is of length < 2 eliminate renumber_footnotes option only test two pandoc versions (devel and RStudio version) and upgrade default to 2.7.3 (rstudio#1846) close rstudio#1838: test more R versions on Travis (rstudio#1845) renumber_footnotes output format option add the <div class="kable-table"> only when the output format is HTML, otherwise the div will be converted to a LaTeX environment, leading to the bug https://stackoverflow.com/q/62340425/559676 change name of file_scope argument to references_scope re-roxygenize Add `publish_site()` function for "one-button" publishing of R Markdown websites. Enable use of pandoc --file-scope for input files originating from multiple Rmds (rstudio#1837) Added missing lang attribute to ioslides_presentation template (rstudio#1841) ...
This PR generalize
code_folding
by allowing any engines.A downside is that turning on and off the
code_folding
invalidates chunk cache.However, I think it is affordable because users do not change this option frequently.