### Bug description

Desired outcome is to add a title or Figure label and/or figure caption to a mermaid diagram in a qmd file.

Quarto documentation shows figure labeling for graphviz dot, but same syntax does not work with mermaid. 
https://quarto.org/docs/authoring/diagrams.html#figures

The outcome of this mermaid issues has support for adding title support to yaml frontmatter. However this does not appear to work with qmd output in Rstudio (get a syntax error).
https://github.com/mermaid-js/mermaid/pull/3706

Mac OS Ventura 13.2.1, M1 Pro chip
Rstudio Version 2023.030.0+386

```
quarto check
[✓] Checking Quarto installation......OK      Version: 1.2.335      Path: /Users/hk/Applications/RStudio.app/Contents/Resources/app/quarto/bin
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK      Version: 3.9.6      Path: /Applications/Xcode.app/Contents/Developer/usr/bin/python3      Jupyter: (None)      Jupyter is not available in this Python installation.      Install with python3 -m pip install jupyter
[✓] Checking R installation...........OK      Version: 4.2.1      Path: /Library/Frameworks/R.framework/Resources      LibPaths:        - /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library      rmarkdown: 2.16
[✓] Checking Knitr engine render......OK
```

Attached qmd file (renamed .txt in order to upload through github)
[MermaidTitle.qmd.txt](https://github.com/quarto-dev/quarto-cli/files/11069292/MermaidTitle.qmd.txt)


### Checklist

- [X] Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [X] Please [format your issue](https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us) so it is easier for us to read the bug report.
- [X] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] Please document the operating system you're running. If on Linux, please provide the specific distribution.
- [X] Please provide the output of `quarto check` so we know which version of quarto and its dependencies you're running.
2023-03-25T15:38:27Z
devdiva
closed
Mermaid diagram title frontmatter support
https://github.com/quarto-dev/quarto-cli/issues/4963