### Bug description

The following code seems as if it should work, but it crashes the compile by creating this in the class option for the tex source: `xcolor=\{dvipsnames\}`:
```
---
title: test
format:
  beamer:
    classoption:
      - "xcolor={dvipsnames}"
---
# Here is a slide
   
Here is \textcolor{ForestGreen}{forestgreen}
```
This is the fix from [tex.stackexchange](https://tex.stackexchange.com/questions/685310/how-to-color-specific-text-using-beamer-format-in-quarto):
```
---
title: test
format:
  beamer:
    classoption:
      - '`xcolor={dvipsnames}`{=latex}'
---
# Here is a slide
   
Here is \textcolor{ForestGreen}{forestgreen}
```
The first example works if you remove braces, but as pointed out by the person who provided the solution, sometimes you need braces, though not here. The syntax for the fix is unnatural and will (IMO) cause much wailing and gnashing of teeth.

Tested with quarto 1.4.37 on Ubuntu 22.04.
[quartoissue.zip](https://github.com/quarto-dev/quarto-cli/files/11447344/quartoissue.zip)
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.2: OK
      Dart Sass version 1.55.0: OK
      Deno version 1.33.1: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.4.37
      Path: /opt/quarto/bin

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

[✓] Checking Python 3 installation....OK
      Version: 3.10.6
      Path: /usr/bin/python3
      Jupyter: 4.9.1
      Kernels: ir, python2, python3

(|) Checking Jupyter engine render....[IPKernelApp] WARNING | debugpy_stream undefined, debugging will not be enabled
[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........OK
      Version: 4.3.0
      Path: /usr/lib/R
      LibPaths:
        - /data/rmcd/R/x86_64-pc-linux-gnu-library/4.3
        - /usr/local/lib/R/site-library
        - /usr/lib/R/site-library
        - /usr/lib/R/library
      knitr: 1.42
      rmarkdown: 2.21

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


### 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-05-11T01:44:23Z
rmcd1024
closed
Beamer classoption crashes compile if there are braces
https://github.com/quarto-dev/quarto-cli/issues/5493