quarto-dev / quarto-dev/quarto-cli
Mermaid errors in tabset panel using R Code Cell with DiagrammeR
@cscheid is already working on this.
Since Jun 6, 2024.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Bug description
Mermaid errors occur in tabset panels other than the first panel as reported in #5145. Behaviour is different with a R Code Cell to run Mermaid with DiagrammeR package: node labels are missing, edges are partially broken (no arrow heads, 2nd edge from decision is broken)
Steps to reproduce
---
title: "Mermaid in R Code Cell inside a panel tabset"
format: html
---
::: {.panel-tabset}
## first Panel Mermaid in R Code Cell
```{r}
#| echo: false
install.packages("DiagrammeR", repos="http://cran.us.r-project.org", quiet = TRUE)
suppressWarnings(library("DiagrammeR"))
## Mermaid
DiagrammeR::mermaid("
graph TD
B{decision}
D[do A]
S[do B]
B-->|yes|D
B-->|no|S
S---D
")
```
## second Panel Mermaid in R Code Cell
```{r}
#| echo: false
## Mermaid
DiagrammeR::mermaid("
graph TD
B{decision}
D[do A]
S[do B]
B-->|yes|D
B-->|no|S
S---D
")
```
:::
Expected behavior
Render Mermaid Diagramm as in first panel
Actual behavior
node labels are missing, edges are partially broken (no arrow heads, 2nd edge from decision is broken)
Your environment
System 1
Microsoft Windows 10 Enterprise, Version 10.0.19045 Build 19045
VS Code 1.85.1
System 2
Microsoft Windows 11 Home, Version 10.0.22.631 Build 22631
VS Code 1.89.1
Quarto check output
System 1
Quarto 1.4.551
[>] Checking versions of quarto binary dependencies...
Pandoc version 3.1.11: OK
Dart Sass version 1.69.5: OK
Deno version 1.37.2: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
Version: 1.4.551
Path: C:\Users\USER\AppData\Local\Programs\Quarto\bin
CodePage: 1252
[>] Checking tools....................OK
TinyTeX: v2024.02
Chromium: (not installed)
[>] Checking LaTeX....................OK
Using: TinyTex
Path: C:\Users\USER\AppData\Roaming\TinyTeX\bin\windows\
Version: 2023
[>] Checking basic markdown render....OK
[>] Checking Python 3 installation....OK
Version: 3.12.1
Path: C:/Users/USER/AppData/Local/Programs/Python/Python312/python.exe
Jupyter: 5.7.1
Kernels: python3
[>] Checking Jupyter engine render....OK
[>] Checking R installation...........OK
Version: 4.3.2
Path: C:/PROGRA~1/R/R-43~1.2
LibPaths:
- C:/Program Files/R/R-4.3.2/library
knitr: 1.45
rmarkdown: 2.25
[>] Checking Knitr engine render......OK
System 2
Quarto 1.4.554
[>] Checking versions of quarto binary dependencies...
Pandoc version 3.1.11: OK
Dart Sass version 1.69.5: OK
Deno version 1.37.2: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
Version: 1.4.554
Path: C:\Users\USER\AppData\Local\Programs\Quarto\bin
CodePage: 1252
[>] Checking tools....................OK
TinyTeX: (not installed)
Chromium: (not installed)
[>] Checking LaTeX....................OK
Tex: (not detected)
[>] Checking basic markdown render....OK
[>] Checking Python 3 installation....(None)
Unable to locate an installed version of Python 3.
Install Python 3 from https://www.python.org/downloads/
[>] Checking R installation...........OK
Version: 4.4.0
Path: C:/PROGRA~1/R/R-44~1.0
LibPaths:
- C:/Users/USER/AppData/Local/R/win-library/4.4
- C:/Program Files/R/R-4.4.0/library
knitr: 1.46
rmarkdown: 2.26
[>] Checking Knitr engine render......OK
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.