Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Yaml] Multiline line return #18784

Copy link
Copy link
Closed
Closed
Copy link
@theofidry

Description

@theofidry
Issue body actions

If you have a YAML file with the following content:

username: |
    Bob

The parsed result will be:

[
  "username" => "Bob\n"
]

Which is expected. If you use instead:

username: |-
    Bob

The result will be:

[
  "username" => "Bob"
]

Up to that point, no problem. Now if I have:

User:
    foo:
        username: |
            Bob
    bar:
        username: |
            Bob
        group: ~

I would expect:

[
  "User" => [
    "foo" => [
      "username" => "Bob\n"
    ],
    "bar" => [
      "username" => "Bob\n",
      "group" => null,
    ],
  ]
]

But instead, of having "Bob\n" for "foo", I get "Bob" instead.

I'm not sure if it's the expected behaviour, but looks odd to me. Bug reproduced here. Tested on the the version v3.0.6.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.