### Bug description

If I have an R figure section with
```
```{r fig-xyz}
#| fig.cap: "Local Moran's I at $\alpha=0.005$"
plot(1)
```

(the closing back-quotes won't render) it errors with: `ERROR: SyntaxError: Unexpected token a in JSON at position 22` (not pointing to file/line). I would like to actually use that feature: with a single quote and a math equation. If I remove the math $ symbols, things work.
This is with RStudio 2022.07.1 Build 554, quarto command line 1.0.38. Ubuntu 20.04 (or 22.04, don't know).

[xx.qmd.zip](https://github.com/quarto-dev/quarto-cli/files/9498511/xx.qmd.zip)


### 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://yihui.org/issue/#please-format-your-issue-correctly) 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-09-06T15:42:34Z
edzer
enhancement yaml-validation
v1.2
closed
single quote + math equation in fig.cap, unhelpful error message
https://github.com/quarto-dev/quarto-cli/issues/2317