Skip to content

Blocks made with pipes have a leading new line #108

@mig-hub

Description

@mig-hub

Hello,

I just tried the online demo which turns YAML into JSON and I found out that the blocks of text made with a pipe sign end up having a leading return line.

For example:


---
text: |
  hello
  world

Becomes:

{text: "\nhello\nworld"}

As far as I know this is not the behaviour of other parsers I've used.
Not sure which one is the standard.

Thank you,
mig

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions