Display results of code chunk really 'asis' in distill (not within <div>)

Hi,

I'd like to insert results of code chunks in a distill_article 'asis', i.e. just the raw markdown code without any formatting or wrapping (s. Rmarkdown cookbook
). What works fine with rmarkdown::html_document I cannot achieve with distill::distill_articlewhere the results of code chunks seem to be always wrapped in <div> even using chunk option results='asis'.

I try to show this in the following reprex - I use

  • R v4.1.1
  • RStudio v1.4.1717,
  • distill v1.2
  • rmarkdown v2.10

The following Rmd file contains one chunk using results='asis' and can be rendered as html_document or distill_article.

---
title: "Test chunk option `results='asis'`"
output: 
  rmarkdown::html_document:
    keep_md: TRUE
  distill::distill_article:
    keep_md: TRUE
---
  
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

```{r results='asis'}
cat("Test")
```

1) rmarkdown::html_document
The output from rmarkdown::html_document is as expected where the result is rendered correctly as just Test in the resulting (intermediate) markdown File (I leave out the YAML here):

Test

2) distill::distill_article
Using output distill::distill_article the option results='asis' does lead to a raw markdown output: In the rendered md-File the result of the code chunk is still wrapped in a <div>., s. the markdown file.


<div class="layout-chunk" data-layout="l-body">
Test

</div>

```{.r .distill-force-highlighting-css}
```

Is there a way to achieve raw markdown output from code chunks in distill, not wrapped in a <div>?

Thanks for your time!
Best, G

No I don't think there is. All chunk outputs gets rendered in the intermediate .md file with those div. This is part of the distill format.

Look at the output of

---
title: "Test chunk option `results='asis'`"
output: 
  distill::distill_article:
    keep_md: TRUE
---
  
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

```{r}
1+1
```

```{r results='asis'}
cat("Test")
```

What is the use case that you have needing that ?
Maybe with result='asis' we could not included the div, but this type of change needs to be backed by a problem to solve.

If you have one to share, you can open a feature request on the Github repository

Thank you !