- 
                Notifications
    
You must be signed in to change notification settings  - Fork 387
 
Labels
bugSomething isn't workingSomething isn't workingchromiumdiagrams-mermaidMermaid diagramsMermaid diagrams
Milestone
Description
Bug description
Quarto will not render two or more Mermaid diagrams to a PDF
Works to HTML
Using Quarto 1.5.57 which had a fix for this problem identified August 2024.
Steps to reproduce
Ran the following qmd file  using quarto render filename
which fails if more than one Mermaid file is included in qmd source
---
title: "Mermaid Test Diagrams"
date: last-modified
format: 
  pdf:
    documentclass: scrreprt
    papersize: letter
    monofontoptions: 
       - Scale=0.75
   
---
------------------------------------------------------------------------
# Mermaid Diagrams - Rendering Multiple Diagrams 
## Simple Flowchart
```{mermaid}
flowchart LR
   A-->B
```
### Notes
Renders correctly if only one diagram
### Second Mermaid Diagram
If a second Mermaid diagram if included Quarto does not render either diagram.
```{mermaid}
flowchart LR
   Y-->Z
```
### Notes 
The above does not render: After a long period times out with message:
```
error: Top-level await promise never resolved
    await mainRunner(async (args)=>{
    ^
    at <anonymous> (file:///Applications/quarto/bin/quarto.js:118235:5)
```
Expected behavior
Not consciously changed anything - should render two simple Mermaid flowcharts
Actual behavior
In the past this worked after upgrading to Quarto 1.5.57
now errors with
error: Top-level await promise never resolved
    await mainRunner(async (args)=>{
    ^
    at <anonymous> (file:///Applications/quarto/bin/quarto.js:118235:5)
Your environment
Mac 
Chip Apple M1 Pro
Memory 32 GB
Startup disk Macintosh HD
Serial number W2LXJONWRR
macOS Sonoma 14.6.1
Quarto check output
quarto check
Quarto 1.5.57
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.2.0: OK
      Dart Sass version 1.70.0: OK
      Deno version 1.41.0: OK
      Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.5.57
      Path: /Applications/quarto/bin
[✓] Checking tools....................OK
      TinyTeX: v2024.07.03
      Chromium: 869685
[✓] Checking LaTeX....................OK
      Using: TinyTex
      Path: /Users/davidbanham/Library/TinyTeX/bin/universal-darwin
      Version: 2024
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
      Version: 3.11.4 (Conda)
      Path: /Users/davidbanham/anaconda3/bin/python
      Jupyter: 5.3.0
      Kernels: python3
[✓] Checking Jupyter engine render....OK
[✓] Checking R installation...........OK
      Version: 4.4.0
      Path: /Library/Frameworks/R.framework/Resources
      LibPaths:
        - /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library
      knitr: 1.46
      rmarkdown: 2.27
[✓] Checking Knitr engine render......OK
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingchromiumdiagrams-mermaidMermaid diagramsMermaid diagrams