### Bug description

I believe you can put R commands into chunk paramters, this is useful but does give issues when you miss out a space. E.g.
````
---
title: "test"
---

```{r}
#| warning: false
#| eval:false
```
````

Which gives the error:

processing file: test.rmarkdown
Error in yaml::yaml.load(yaml, eval.expr = TRUE) : 
  Scanner error: while scanning a simple key at line 2, column 1 could not find expected ':' at line 3, column 1
Calls: .main ... parse_block -> partition_yaml_options -> <Anonymous>
Execution halted

I presume that this is because the eval:false line is being interpreted as R rather than YAML, but the error message isn't helpful and had me messing with the top YAML as it didn't mention when code chunk it was referring to.

Strangely, dropping the warning line fixes things:

````
---
title: "test"
---

```{r}
#| eval:false
```
````

RStudio: 2022.02.3 Build 492
Windows

### 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, self-contained, and reproducible example?
- [ ] documented the quarto version you're running, by providing the output produced by `quarto check` in a terminal in your 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.
- [X] upgraded to the latest version, including your versions of R, the RStudio IDE, and relevant R packages?
cscheid
2022-06-20T22:17:28Z
plukethep
bug yaml-validation
Future
open
YAML parameters being interpreted as R and giving unhelpful error messages
https://github.com/quarto-dev/quarto-cli/issues/1189