Skip to content

YAML 1.2 spec: Example 8.2. Block Indentation Indicator #253

@asomov

Description

@asomov

When I try to parse example 8.2 at http://www.yaml.org/spec/1.2/spec.html#Block
I got:

[ 'detected\n',
  '\n\n# detected\n',
  '\n explicit\n',
  '\n\t\ndetected\n' ]

But according to the canonical form last two lines must not get a leading '\n':

%YAML 1.2

---
!!seq [
  !!str "detected\n",
  !!str "\n\n# detected\n",
  !!str "·explicit\n",
  !!str "\t·detected\n",
]

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