quarto-dev / quarto-dev/quarto-cli
Incorrect "format" YAML value and maybe other fields only shows the first of many possible values
Open
@cscheid is already working on this.
Since Sep 27, 2023.
bug
enhancement
yaml-validation
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Bug description
This is originally at https://github.com/rstudio/rstudio/issues/11871
Error for the format field (and possibly others) in YAML only shows one possible value and states that it's the only possible value.
Steps to reproduce
- Create a Quarto document with the following bad YAML content and save it.
---
title: "Untitled"
editor: sss
format: markdow
---
- View in source or visual mode.
- Hover over the error icon next to the
editorfield. (This example uses source mode, but it's the same in visual mode.)- The info message identifies both possible values,
sourceandvisual.
- The info message identifies both possible values,
- Hover over the error icon next to the
formatfield. (This example uses visual mode, but it's the same in source mode.)- Only one item is identified as a possible value,
asciidoc, even though there are dozens of possibilities. - The item shown is always the first one alphabetically,
asciidoc, even though there are several possible legitimate values beginning withmarkdo, such asmarkdown,markdown_github, and others.
- Only one item is identified as a possible value,
Expected behavior
Either
- All possible values should be shown.
- This would probably look awful for something with a whole bunch of possible values—as is the case with the
formatfield—so the error should probably not mention the possible values. (They're available with autocompletion.)
Actual behavior
Error for the format field (and possibly others) in YAML only shows one possible value and states that it's the only possible value.
Your environment
RStudio Edition : Desktop
RStudio Version : 2022.11.0-daily+153 and 2023.09.0+463
OS Version : MacOS 13 and MacOS 14
R Version : 4.2.1 and 4.3.1
Quarto check output
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.1.1: OK
Dart Sass version 1.55.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.3.433
Path: /Applications/RStudio-2023.09.0-463.app/Contents/Resources/app/quarto/bin
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.11.4
Path: /usr/local/opt/python@3.11/bin/python3.11
Jupyter: (None)
Jupyter is not available in this Python installation.
Install with python3 -m pip install jupyter
[✓] Checking R installation...........OK
Version: 4.3.1
Path: /Library/Frameworks/R.framework/Resources
LibPaths:
- /Users/ronblum/Library/R/x86_64/4.3/library
- /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library
knitr: 1.44
rmarkdown: 2.25
[✓] Checking Knitr engine render......OK
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.