Skip to content
This repository has been archived by the owner on Oct 17, 2020. It is now read-only.

Inline comments cause loss of properties #8

Open
kevin-smets opened this issue May 14, 2016 · 1 comment
Open

Inline comments cause loss of properties #8

kevin-smets opened this issue May 14, 2016 · 1 comment

Comments

@kevin-smets
Copy link
Owner

kevin-smets commented May 14, 2016

Oriniginally submitted by @asgoth - the sanitise step is too eager. Using comments after a property causes the property to disappear, e.g.

path:
  to:
    some: "value" # some explanation what this does
    other: "value"

Results in

{
  path: {
    to: {
      other: "value"
    }
  }
}

Property some is gone.

Workaround: Keep your comments on a dedicated line

@bgotink
Copy link
Contributor

bgotink commented May 15, 2016

Note how YAML handles inline comments:

test:
  - this 1 is a # comment
  - this 2 is a #comment
  - this 3 is no# comment
  - this 4 is not a \# comment

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants