Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cderv opened this issue Feb 28, 2025 · 1 comment
Assignees
Labels
enhancement New feature or request knitr yaml-validation Issues with YAML validation and autocompletion in quarto

Comments

@cderv
Copy link
Collaborator

cderv commented Feb 28, 2025

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

- name: echo
tags:
contexts: [document-execute]
execute-only: true
schema:
anyOf:
- boolean
- enum: [fenced]
errorDescription: "be `true`, `false`, or `fenced`"
description:
short: Include cell source code in rendered output.
long: |
Include cell source code in rendered output.
- `true` (default in most formats): include source code in output
- `false` (default in presentation formats like `beamer`, `revealjs`, and `pptx`): do not include source code in output
- `fenced`: in addition to echoing, include the cell delimiter as part of the output.
- `[...]`: A list of positive or negative line numbers to selectively include or exclude lines
(explicit inclusion/excusion of lines is available only when using the knitr engine)

@cderv cderv added knitr yaml-validation Issues with YAML validation and autocompletion in quarto labels Feb 28, 2025
@cderv cderv self-assigned this Feb 28, 2025
@cderv
Copy link
Collaborator Author

cderv commented Feb 28, 2025

This is related to problem with warning: NA too

@mcanouil mcanouil added the enhancement New feature or request label Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request knitr yaml-validation Issues with YAML validation and autocompletion in quarto
Projects
None yet
Development

No branches or pull requests

2 participants