### Bug description

Setting the mermaid format to svg will result in text inside some diagram boxes being clipped:

````
---
mermaid-format: svg
---

```{mermaid}
graph
L --- P1
L(library)
P1(dashboard <br/> dplyr 0.8.5)
```
````

![image](https://user-images.githubusercontent.com/12927842/182142569-10bf12f4-0b07-492f-96b0-5769c0c2e2c8.png)

Allowing the same diagram to be rendered in the browser produces the expected output, as does SVG export from the mermaid live editor:

![image](https://user-images.githubusercontent.com/12927842/182142900-659e0375-c3f6-409b-b2c2-e3b7ccf51313.png)


### `quarto check` Output

```bash
❯ quarto check

[✓] Checking Quarto installation......OK
      Version: 1.1.3
      Path: /Users/edavidaja/.local/share/qvm/versions/v1.1.3/bin

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.8.6
      Path: /Users/edavidaja/.pyenv/versions/3.8.6/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.1.2
      Path: /Library/Frameworks/R.framework/Versions/4.1/Resources
      LibPaths:
        - /Users/edavidaja/Library/R/x86_64/4.1/library
        - /Library/Frameworks/R.framework/Versions/4.1/Resources/library
      rmarkdown: 2.14

[✓] Checking Knitr engine render......OK
```

### `quarto tools check` Output

```bash
❯ quarto tools check
[✓] Inspecting tools

Tool         Status            Installed     Latest
chromium     Not installed     ---           869685
tinytex      Not installed     ---           v2022.08
```

### Checklist

- [X] [formatted your issue](https://yihui.org/issue/#please-format-your-issue-correctly) so it is easier for us to read?
- [X] included 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] documented the quarto version you're running, by pasting the output from running `quarto check` in the "Quarto Check Output" text area?
- [X] documented the version of the quarto tools you're running, by providing the output from running `quarto tools check` in the "Quarto Tools Check Output" text area?
- [X] documented the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] documented which operating system you're running? If on Linux, please provide the specific distribution as well.
- [X] upgraded to the latest version, including your versions of R, the RStudio IDE, and relevant R packages?
cscheid
2022-08-01T12:00:37Z
edavidaja
bug needs-discussion mermaid
v1.2
closed
`mermaid-format: svg` results in clipping of diagrams
https://github.com/quarto-dev/quarto-cli/issues/1622