### Bug description

With quarto version 1.2.335, I tried to use `keep-yaml` to preserve the yaml frontmatter in quarto outputs. This does not work for markdown formats such as `gfm` and `commonmark`. 

``` r
frontmatter <- paste0(readLines("frontmatter"), collapse = "\n")
cat(frontmatter)
#> ---
#> title: hello world
#> author: jane doe
#> draft: true
#> format:
#>   gfm:
#>     keep-yaml: true
#> ---
file.create("test.qmd")
#> [1] TRUE
cat(frontmatter, file = "test.qmd")
quarto::quarto_render("test.qmd")
#> [1mpandoc [22m
#>   to: >-
#>     commonmark+autolink_bare_uris+emoji+footnotes+gfm_auto_identifiers+pipe_tables+strikeout+task_lists+tex_math_dollars
#>   output-file: test.md
#>   standalone: true
#>   default-image-extension: png
#>   
#> [1mmetadata[22m
#>   title: hello world
#>   author: jane doe
#>   draft: true
#>   keep-yaml: true
#>   
#> Output created: test.md
readLines("test.md")
#> [1] "hello world"      "================" "jane doe"         ""
```

<sup>Created on 2023-02-03 with [reprex v2.0.2](https://reprex.tidyverse.org)</sup>


### 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.
cderv
2023-02-03T19:34:34Z
qiushiyan
documentation
v1.4
open
`keep-yaml` not working for markdown formats
https://github.com/quarto-dev/quarto-cli/issues/4210