Repository navigation
Add lua-based codefolding feature and apply it to html_vignette - #2340
Conversation
|
The error from the latest GHA comes from Pandoc devel, which is not related to this PR. |
|
I tweaked lua and css so that code folding may work without css. I also realized that we need to check |
|
ok, implemented |
There was a problem hiding this comment.
Thanks a lot for this. This was again something that needed to be done to have a Lua filter for this feature.
This is a first implementation that stick to the current JS one but it gets me new ideas (like customization of the the <summary> text instead of default, adding the language of code source in the summary text too, ...
Anyway, let's keep it simple. You'll find some comments for discussion below, some are suggested changes, other are ideas I want to run by you.
Also, best would be to have some tests for this, but I can do it later. Do you already have a Rmd that you are using for testing ?
If so that, can you share it ? Otherwise, I'll do one myself.
Again thanks a lot for all your help on this. This is truly very appreciated !
The error from the latest GHA comes from Pandoc devel, which is not related to this PR.
yes it is known (#2306) , but I am waiting for next Pandoc release.
|
@cderv Thank you for your neat review! I just responsed to the two important comments because their conclusions may affect action to other comments. |
|
Thanks @atusy I answered them. |
Co-authored-by: Christophe Dervieux <[email protected]>
Co-authored-by: Christophe Dervieux <[email protected]>
cderv
left a comment
There was a problem hiding this comment.
Thanks for taking into account the feedback.
I'll merge this now.
|
Thanks @atusy ! I reverted one of your change as it was not correct afterall (#2340 (comment)) |
|
Thanks a lot for the neat review and final checks!! |
* jg-devel: use tufte::tufte_handout in test, and remove tufte_handout in doc mark tufte_handout() as defunct CRAN release v2.14 typo in NEWS Update arrow.theme regarding accessibility Adapt test snapshots to last pandoc devel 2.18+ (rstudio#2349) Revert "remove from NEWS as pandoc devel reverted the change" remove from NEWS as pandoc devel reverted the change Support for `fold-none` class in `html_document()` (rstudio#2348) Support new scheme for Pandoc nightly build Add lua-based codefolding feature and apply it to html_vignette (rstudio#2340) `site_generator()` stops search at RStudio project root (rstudio#2345) Update CONTRIBUTING.md Update tests following Pandoc change in 2.18 (rstudio#2334) dirname('.') returns '.', which will cause infinite recursion, so normalize the relative path to absolute before the next recursion (fix rstudio#2339) Fix parsing by pandoc of last paragraph in shinyrmd doc (rstudio#2337)
This is a step to solve rstudio/bookdown#764
For the toggle switch, I applied minimal styling.
Let me know if we should mimic
html_document.Also, current implementation does not include show/hide all button.
It can be a future work.