How to nest fenced code chunks?

I often need to store Rmarkdown code chunks in Logseq. These are fenced using the same ``` chunk delimiters as Logseq. My desired outcome is for the Rmarkdown chunk rendered by Logseq to display backticks, so as to enable direct copying to other apps (Rstudio).

Nesting delimiters seems like a logical way forward but Logseq (and forums!) will garble nested backticks:

Screenshot_2022-10-13_15-00-02

Renders as…

```{r chunk-name option="value"} # Innermost delimiter for Rmarkdown code chunk
code
1 Like