Skip to content

Passing list to write_yaml_metadata_block() writes an extra - #292

@cderv

Description

@cderv

There's a fairly simple underlying bug here. Run interactively, the function inserts an extra hyphen into its output:

Input:

quarto::write_yaml_metadata_block(
     list(
         author = "John Doe",
         date = "2025-03-01"
     )
 )

Output:

[1] "---\n- author: John Doe\n  date: '2025-03-01'\n---\n"
attr(,"class")
[1] "knit_asis"
attr(,"knit_cacheable")
[1] NA

Originally posted by @CarwilB in #291

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions