Skip to main content

Quarto 1 diagram cell is not run

markdown
Quarto 2 does not run Quarto 1 brace-form mermaid and dot cells; a plain mermaid or dot fence draws the diagram.

Q-2-58 — Quarto 1 diagram cell is not run

Quarto 2 does not run {mermaid} or {dot} cells. The block renders as a code block, not a diagram.

What this means

Quarto 1 draws diagrams from executable cells, written with braces:

```{mermaid} and ```{dot}. Quarto 2 draws diagrams from the plain fences ```mermaid and ```dot. A brace-form cell is left as a code block, so the reader sees the diagram’s source instead of the diagram.

How to fix

For Mermaid, drop the braces. The diagram body and its %%| options need no other change:

```mermaid
flowchart LR
  A[Draft] --> B[Review]
```

For Graphviz ({dot}), drop the braces in the same way. The diagram body and its //| options need no other change:

```dot
digraph G {
  Draft -> Review
}
```

Graphviz diagrams are drawn in the html and revealjs formats. In other formats a dot block is still shown as its source.

If an engine handles the brace form, this warning does not apply to the cells it claims. If you still see it, or want it gone, turn it off in _quarto.yml or the document’s front matter:

diagnostics:
  Q-2-58:
    level: off
    reason: "our engine renders {dot} cells"

Example

Bad input (Quarto 1 idiom):

```{mermaid}
flowchart LR
  A[Draft] --> B[Review]
```

Corrected:

```mermaid
flowchart LR
  A[Draft] --> B[Review]
```