Replies: 2 comments 2 replies
-
This is intended behaviour. The "comment for value 1" gets assigned to the collection as a whole (not sure, but adding an empty row before it may have an effect), while "comment for value 2" ends up included in the value of the YAML does not specify how comments are attached, and as you see here, there isn't always just one way to attach a comment. You're welcome to suggest changes in the logic for comment attachment, but you'll probably need to submit a PR yourself. Be warned, though, the heuristics on this can get a bit hairy as it's pretty much all corner cases. |
Beta Was this translation helpful? Give feedback.
-
note: if i use # comment 1
create:
# comment for value 1
value1: # comment for value 2
value2: |
Beta Was this translation helpful? Give feedback.
-
Hello, i'm trying to extract comments for each value in such a YAML :
When i do
I get
the
create
has the correctcommentBefore
butvalue1
andvalue2
donc have suchcommentBefore
Not sure if this is intended behaviour or if theres a way to get the
commentBefore
on each value ?Beta Was this translation helpful? Give feedback.
All reactions