quarto-dev / quarto-dev/quarto-cli

`eval` and `echo` supports numbers for knitr engine per documentation, but YAML validation fails

Open
#12,178 3 comments 0 reactions 1 assignee View on GitHub

@cderv is already working on this.

Since Feb 28, 2025.

engines-knitr enhancement yaml-validation
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

I did not use eval: -2 (in-chunk YAML syntax) because that gets rejected before rendering.

In file test.qmd
(line 8, columns 10--12) Field "eval" has value -2, which must instead be `true` or `false`
7: ```{r}
8: #| eval: -2
           ~~~
9: if (TRUE) {
✖ The value -2 is of type number.
ℹ The error happened in location eval.

ERROR: Validation of YAML cell metadata failed.
ERROR: Render failed due to invalid YAML.

Originally posted by @fkohrt in #12164

https://github.com/quarto-dev/quarto-cli/blob/e8eefd98f816622a13aba818d404b98c00c8cfb6/src/resources/schema/cell-codeoutput.yml#L17-L35

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.