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 yaml roundtripping filewrite/fileformat steps do not preserve comments in the source yaml on the outfile.
the ruamel in/out is correct, but the context.get_formatted_iterable doesn't deal with the special cases necessary to bring across the comment info also. . .
it'll likely need something like this:
if isinstance(n, ruamel.yaml.comments.CommentedMap):
for k in n:
d[k] = update(d[k], n[k]) if k in d else n[k]
if k in n.ca._items and n.ca._items[k][2] and \
n.ca._items[k][2].value.strip():
d.ca._items[k] = n.ca._items[k] # copy non-empty comment
else:
d = n
return d```
with similar for Lists.
The text was updated successfully, but these errors were encountered:
the yaml roundtripping filewrite/fileformat steps do not preserve comments in the source yaml on the outfile.
the ruamel in/out is correct, but the context.get_formatted_iterable doesn't deal with the special cases necessary to bring across the comment info also. . .
it'll likely need something like this:
The text was updated successfully, but these errors were encountered: