You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The challenge here is that the parsed Document representation does not retain the exact source positions of each comment, but only their attachment either on or before a value. In other words, there's no option to toggle this behaviour.
On the other hand, a single-line comment before a block collection within another block collection could well have its comment on the key line, as in your inputs, and I'd be quite willing to consider a PR changing the behaviour. The change would probably need to be applied somewhere around here.
Describe the bug
Hello there. First off great library! Thank you for making it.
I'm running into an issue with comments and I'm wondering if there is an option to turn it off.
The issue: It looks like inline comments on keys are being moved
Input yaml
Produces
#nesting level 1
and#nesting level 2 (2 spaces used for indentation)
have movedhere's the diff
To Reproduce
Steps to reproduce the behaviour.
Expected behaviour
keep comments on the same line where the key is.
I think I can work around this with some custom mapping but I was wondering if there was an option to toggle to avoid this in the first place.
Thank you again for the great lib ❤️
The text was updated successfully, but these errors were encountered: