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

Integration test for YAML parsing and dash to dot conversion #88

Merged
merged 1 commit into from
Aug 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions 125-dash-options.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: Using dash options in YAML options header
---

In Quarto, it is recommended to use YAML options format with dash in option name instead of dot. In knitr 1.44, any chunk option with dash will be transformed to its dot counterpart. This is because knitr is responsible for engine option parsing in Quarto.

This document checks that YAML options are parsed correctly and that dash option are correctly converted when provided in YAML.

```{r}
#| eval: true
#| echo: false
#| out-width: 850
#| sql-max-print: 1000
#| fig-cap: caption
#| fig-dpi: 750
#| fig-format: svg
knitr::opts_current$get(c("echo","out.width", "sql.max.print", "fig.cap", "dpi", "dev"))
```

29 changes: 29 additions & 0 deletions 125-dash-options.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
title: Using dash options in YAML options header
---

In Quarto, it is recommended to use YAML options format with dash in option name instead of dot. In knitr 1.44, any chunk option with dash will be transformed to its dot counterpart. This is because knitr is responsible for engine option parsing in Quarto.

This document checks that YAML options are parsed correctly and that dash option are correctly converted when provided in YAML.


```
## $echo
## [1] FALSE
##
## $out.width
## [1] 850
##
## $sql.max.print
## [1] 1000
##
## $fig.cap
## [1] "caption"
##
## $dpi
## [1] 750
##
## $dev
## [1] "svg"
```