Skip to content

YAML list state (trailing commas) seeps into next parsed object #943

@alamar

Description

@alamar

Suppose you have a YAML file with multiple consequitive objects going like

object1:
  - !Object1 {
    list: [
      'of',
      'items'
     ] # , may go after this
   } # , may go after this

!Object2 {
  ...
}

The problem is, if a comma goes after the closing square bracket (or curly bracket?), then Object2 is going to be a part of object1 list. If it is absent, in our code base Object2 will be read as next object, but in the test that I will provid it crashes as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions