quarto-dev / quarto-dev/quarto-cli
RevealJS infinite loop when slide title matches Mermaid element id case-insensitively
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Bug description
When creating a RevealJS output with a Mermaid diagram, you can craft a situation where the deck mysteriously loops. This happens when you have a Mermaid diagram containing elements with IDs that match (case-insensitively) a slide header.
It's easy to get into this situation without realizing it. You can work around it easily if you're aware of this pitfall, perhaps by prefixing all your mermaid diagram's ID strings.
Steps to reproduce
- Create
index.qmd:
---
title: "Demo: looping slide deck"
subtitle: "💫 Wheee! 💫"
format:
revealjs: default
---
## Foo
```{mermaid}
gantt
Foo :active, magicstring, 2024-01, 2024-02
```
## Magicstring
This header :point_up: is critical. If I change one character, the bug no
longer reproduces. It must match, case-insensitive, the ID of an element in the
Mermaid diagram. Any string will work. Case doesn't matter.
**This slide will never be displayed; instead, the slide deck will loop from
the beginning.**
The content below this point doesn't matter.
# More slides!
---
Something!
quarto render index.qmd- Open
index.html - Try to access the string with the header "Magicstring"
See also: https://github.com/mfisher87/sscce-quarto-slides-loop
Expected behavior
I will be able to access the slide with the header "Magicstring"
Actual behavior
The slide deck starts from the beginning when I attempt to access that slide.
Your environment
- IDE: vim
- OS: Pop!_OS 22
Quarto check output
$ quarto check
Quarto 1.5.56
[✓] 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.56
Path: /opt/quarto/bin
[✓] Checking tools....................OK
TinyTeX: v2023.11
Chromium: (not installed)
[✓] Checking LaTeX....................OK
Using: TinyTex
Path: /home/robatt/.TinyTeX/bin/x86_64-linux
Version: 2023
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.10.14 (Conda)
Path: /home/robatt/.local/share/miniforge3/bin/python
Jupyter: (None)
Jupyter is not available in this Python installation.
Install with conda install jupyter
[✓] Checking R installation...........(None)
Unable to locate an installed version of R.
Install R from https://cloud.r-project.org/
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.
Research direction
Start by rendering the reported index.qmd with quarto render index.qmd and inspect the generated index.html in RevealJS. Reproduce the case-insensitive match between the Magicstring slide header and the Mermaid element ID; done means the slide is reachable without restarting the deck.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100