Skip to content

[Feature Request]: Remove yaml_utils.R #393

@averissimo

Description

@averissimo

Feature description

These functions are potentially not necessary and can be replaced with yaml::as.yaml(x, handlers = list(...)) for custom printing.

Benefit:

  • Less code to maintain
  • Standard teal.reporter.rmd_yaml_args that is closer to the actual yaml options
    • toc is not a first level option
# New option format
list(
  author = "NEST",
  title = "Report",
  date = as.character(Sys.Date()),
  output = list(html_document = list(toc = FALSE))
) |> yaml::as.yaml() |> cat()
#> author: NEST
#> title: Report
#> date: '2025-09-02'
#> output:
#>   html_document:
#>     toc: no

Cons:

  • Function is exported, so it needs to be deprecated
  • Added logic to support former logic (toc as first-level option and as dependency of output)

#391 draft PR supports this.

Code of Conduct

  • I agree to follow this project's Code of Conduct.

Contribution Guidelines

  • I agree to follow this project's Contribution Guidelines.

Security Policy

  • I agree to follow this project's Security Policy.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions