Skip to content

yamlfix squashes spaces in block strings #231

Open
@wrouesnel

Description

@wrouesnel

Description

When files contain block strings, yamlfix will squash white space and change the string.

Current behavior

Given the file:

# original.yml
---
key: |
  # This is a value #
  #      X          #

yamlfix original.yml results in:

---
key: |-
  # This is a value  #
  #      X  #

Desired behavior

Strings in block quotes should remain semantically equivalent, or ideally not be modified at all. As it is, white space is removed.

Environment

------------------------------------------------------------------
     yamlfix: 1.9.0
     Python: 3.10.6
     Platform: Linux-5.15.0-27-generic-x86_64-with-glibc2.35
------------------------------------------------------------------

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions