Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MergeYaml does not process multiline scalar value blocks properly when multiline block is located in a subkey #4728

Merged
merged 6 commits into from
Nov 28, 2024

Conversation

jevanlingen
Copy link
Contributor

@jevanlingen jevanlingen commented Nov 28, 2024

What's changed?

Improve formatting of multiline scalar values.

What's your motivation?

Since

multiline scalar value blocks should work now, but it did not work properly when the key of the scalar is located deeper in the tree like:

deep:
  object:
    script: |
       #!/bin/bash
       echo "hello"

Secondly, there was no support for values with different levels of indentation, which is valid in Yaml is as well:

script: |
  #!/bin/bash
         echo "hello"

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've read and applied the recipe conventions and best practices
  • I've used the IntelliJ IDEA auto-formatter on affected files

@jevanlingen jevanlingen self-assigned this Nov 28, 2024
@jevanlingen jevanlingen marked this pull request as ready for review November 28, 2024 12:19
Copy link
Contributor

@timtebeek timtebeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great to see this quickly fixed.

@timtebeek timtebeek added the bug Something isn't working label Nov 28, 2024
@timtebeek timtebeek merged commit d2c0087 into main Nov 28, 2024
2 checks passed
@timtebeek timtebeek deleted the merge-yaml-multiline-block-more-fixes branch November 28, 2024 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants