Skip to content

Comments before document start get misplaced #122

@felixfontein

Description

@felixfontein

When decoding

# foo
---
key: value

to a yaml.Node, the result is a single document which contains the comment attached to the non-empty map.

I prepared a fix for this in go-yaml/yaml some time ago (it's already 4.5 years: go-yaml/yaml#690). I can re-do the PR here if there's interest in contributions, or feel free to salvage that PR yourself if you want :)

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