### Bug description

This bug is essentially #1141 but applied to citations in captions when using footnote citation styles. This Markdown doesn't work:

```md
---
csl: oxford-university-press-note.csl
---
![A schematic diagram of known types of viroid-like agents. This figure was published in [@Lee2021a].](figures/viroid-like-schematic.png)
```

The error message also parallels #1141:

```
compilation failed- error
Argument of \caption@ydblarg has an extra }.
<inserted text>
                \par
l.324 ...1093/nar/gkab974}{10.1093/nar/gkab974}.}}
```

### Checklist

- [X] upgraded to the [latest nightly quarto version](https://github.com/quarto-dev/quarto-cli/releases)?
- [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 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.
dragonstyle
2022-08-24T22:54:16Z
Benjamin-Lee
bug
v1.2
closed
Footnote-style citation in figure caption crashed PDF render
https://github.com/quarto-dev/quarto-cli/issues/2112