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
In case of a map with multiple items, the first item comments are associated to the map node itself.
Single maps items, or other multiple maps items comments are not affected.
Here, in a single item map, foo node is a single ast.MappingValueNode and correctly get its comments:
map_single:
# foo single commentfoo: bar
In this multiple items maps, map node is a ast.MappingNode, and get the comments of its first item. This first item comments are therefore empty, whereas the second item comments are correctly set:
map_multiple:
# foo multiple commentfoo: bar# bar multiple commentbar: baz
In case of a map with multiple items, the first item comments are associated to the map node itself.
Single maps items, or other multiple maps items comments are not affected.
Here, in a single item map,
foo
node is a singleast.MappingValueNode
and correctly get its comments:In this multiple items maps,
map
node is aast.MappingNode
, and get the comments of its first item. This first item comments are therefore empty, whereas the second item comments are correctly set:See this playground: https://go.dev/play/p/HpPFOrJkVwF
(this could be more or less related to #310)
The text was updated successfully, but these errors were encountered: