yamlfmt
Fails to Parse Block Scalars with Initial Newline
#213
Labels
yaml_v3_problem
A bug in the underlying yaml library. These issues are vastly harder to fix.
yamlfmt
encounters an error when parsing YAML files that contain block scalars (|-
) with an initial newline after the block scalar indicator. This results in a parsing failure with the following error message:The issue occurs when the YAML content is formatted as follows:
However, if the initial newline after the
|-
is removed, the cotent is getting parsed correctly:Expected Behavior
yamlfmt
should correctly parse and format YAML content that includes an initial newline after a block scalar indicator (|-
). As far as I can tell this seems to be supported in YAML.Steps to Reproduce
file.yml
) with the following content:yamlfmt
on the file:The text was updated successfully, but these errors were encountered: