Skip to content

[knitr] asis_output() has not the same effect as output: asis #9185

Open
@cderv

Description

@cderv
---
title: "Test"
format: 
  typst:
    keep-typ: true
    keep-md: true
---

```{r}
knitr::asis_output("`#set page(flipped: true)`{=typst}")
```

This will lead to the intermediate markdown

---
title: "Test"
format: 
  typst:
    keep-typ: true
    keep-md: true
---


::: {.cell}

```{.r .cell-code}
knitr::asis_output("`#set page(flipped: true)`{=typst}")
```

::: {.cell-output-display}
`#set page(flipped: true)`{=typst}
:::
:::

No output div are removed - nor :::{.cell} or the .cell-output-display one.

Using #| output: asis does removed it.

I do think this is a knitr* issue because options$results = "asis" is only set for LaTeX output.

This is related to #9184 as even if this is fixed in knitr, #9184 will remain.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions