I'd like to implement {flair} with code_folding in Rmarkdown. Perhaps I am not going about it correctly, but is there something under the hood that's preventing the two options from working together?
In this example, I set code folding in the YAML, but the produced document does not allow for the flaired chunk to collapse.
I have also tried adding this option to my first chunk, but this causes none of the code to appear. This is doubly problematic in that I would like to use an engine (SAS) that does not yet have code folding defined.
(r, python, bash, sql, cpp, stan, and julia). If this is a limitation for you, it can be extended to apply to any language code source block by adding the class foldable via the chunk option class.source, or even setting it globally so that it applies on any code chunk using knitr::opts_chunk$set(class.source = "foldable").
Interesting, I hadn't thought of this, it's a great idea. It may be difficult to implement with the way that flaired chunks get produced as "from scratch" html - but I will take a look.
I'd like to implement {flair} with code_folding in Rmarkdown. Perhaps I am not going about it correctly, but is there something under the hood that's preventing the two options from working together?
In this example, I set code folding in the YAML, but the produced document does not allow for the flaired chunk to collapse.
I have also tried adding this option to my first chunk, but this causes none of the code to appear. This is doubly problematic in that I would like to use an engine (SAS) that does not yet have code folding defined.