Quarto Revealjs - Mermaid diagrams don't show after R code chunks, pictures

When making Quarto HTML text documents, Mermaid diagrams work as expected. When making Quarto Revealjs presentations, Mermaid diagrams also work as expected; however, downstream of the first instance of a code block or an image, Mermaid diagrams stop showing.

I have Quarto version 1.0.37.
R version 4.2.0
Platform aarch64-apple-darwin20 (64-bit)
RStudio 2022.07.1+554 "Spotted Wakerobin" Release for macOS

Reprex:

---
title: "Untitled"
format: revealjs
editor: visual
---

## Quarto

Works

```{mermaid}
flowchart LR
  A[Hard edge] --> B(Round edge)
  B --> C{Decision}
  C --> D[Result one]
  C --> E[Result two]
```

## Some code here

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

## Doesn't work anymore

```{mermaid}
flowchart LR
  A[Hard edge] --> B(Round edge)
  B --> C{Decision}
  C --> D[Result one]
  C --> E[Result two]
```

Unfortunately this is a known issue yet to be fixed

Sorry for the inconvenience.

Workaround is to set view-distance and mobile-view-distance so that it includes the slide with the last mermaid diagram.

Follow the issue to track when we'll fix this

1 Like

Thank you for your quick answer! Great to know you all are on it :slight_smile:

2 Likes

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.