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

Open
#9,185 1 comment 0 reactions 1 assignee View on GitHub

@cderv is already working on this.

Since Mar 25, 2024.

Assessment

This issue has not been assessed yet.

Description

engines-knitr enhancement
---
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.

Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from quarto-dev/quarto-cli

All issues in quarto-dev/quarto-cli

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.