### Bug description

The following minimal working example

``````
---
title: "MWE"
---

```{mermaid}
%%| label: fig-percentage
%%| fig-cap: Flowchart

flowchart LR
  A[Hard edge] --> B(Round edge)
  B --> C{Decision}
  C --> D[Result one]
  C --> E[Result two]
```

```{mermaid}
//| label: fig-slash
//| fig-cap: Flowchart

flowchart LR
  A[Hard edge] --> B(Round edge)
  B --> C{Decision}
  C --> D[Result one]
  C --> E[Result two]
```
``````

produces

![Screenshot 2022-11-08 at 12-31-11 MWE](https://user-images.githubusercontent.com/1506457/200475640-86a170ab-c949-4bfc-9b9e-aa79591ce243.png)

The build/render log is

```
pandoc 
  to: html
  output-file: mermaid.html
  standalone: true
  section-divs: true
  html-math-method: mathjax
  wrap: none
  default-image-extension: png
  
metadata
  document-css: false
  link-citations: true
  date-format: long
  lang: en
  title: MWE
  
Output created: mermaid.html
```

Would be great to give a warning regarding the wrong code block metadata. For example:

```
Warning at line 17: mermaid code block uses %%| instead of //|
Warning at line 18: mermaid code block uses %%| instead of //|
```

### 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.
cscheid
2022-11-08T04:35:54Z
rgaiacs
enhancement
Future
open
Improve validation of mermaid code block
https://github.com/quarto-dev/quarto-cli/issues/3235