Skip to content

Commit

Permalink
fix(format/yaml): Re-serialize complex keys properly
Browse files Browse the repository at this point in the history
  • Loading branch information
zml2008 committed Oct 15, 2023
1 parent 618f113 commit 3cdcc04
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public Node representData(final Object nodeObject) {
for (Map.Entry<Object, ? extends ConfigurationNode> ent : node.childrenMap().entrySet()) {
// SnakeYAML supports both key and value comments. Add the comments on the key
final Node value = represent(ent.getValue());
final Node key = represent(String.valueOf(ent.getKey()));
final Node key = represent(ent.getKey());
key.setBlockComments(value.getBlockComments());
value.setBlockComments(Collections.emptyList());

Expand Down

0 comments on commit 3cdcc04

Please sign in to comment.