Skip to content

Empty line after empty tagged value at end of map in sequence is mis-assigned #717

Description

@Pachat-Kas

Describe the bug
I am dealing with an issue where custom tags with a blank like leads to nonsense yaml being produced.

- type: entity
  components:
  - type: InstantAction
    event: !type:CritSuccumbEvent

-------------------------
- type: entity
  components:
  - type: InstantAction
    event:
                                                   <--- these two \n are the issue
      !type:CritSuccumbEvent 

To Reproduce
I made a little test script to show the behavior, the expectation would be that input and output are the same.
https://gist.github.com/Pachat-Kas/c3816a67a3f21703e882ef9f5862bb07

Expected behaviour
The test script should produce the same intput as the output.

Versions:

  • Environment: [node v23.9.0]
  • yaml: [2.9.0]

Additional context
I found some similar looking issues but on closer inspection they weren't related.

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions