Skip to content

Preserve inline comments on inline lists #443

Closed
@saeedseyfi

Description

@saeedseyfi

Describe the bug
Inline comments are removed from inline lists.

To Reproduce

const input = 'key1: [value1, value2] # comment';
const parsed = yaml.parseDocument(input);
const result = parsed.toString();

expect(result).toContain("# comment");

Expected behaviour
Comments should be preserved.

Versions:

  • Environment: Chrome Version 110.0.5481.100 (Official Build) (arm64)
  • yaml: 2.2.1

Additional context
Edit JS Playground (forked)

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