Skip to content

Commit

Permalink
Fixes apache#29429, fix yaml lineBreak on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
RaigorJiang committed Dec 18, 2023
1 parent 56a2581 commit 426d8c1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ public static String marshal(final Object value) {
DumperOptions dumperOptions = new DumperOptions();
dumperOptions.setLineBreak(DumperOptions.LineBreak.getPlatformLineBreak());
if (value instanceof Collection) {
return new Yaml(new ShardingSphereYamlRepresenter(dumperOptions)).dumpAs(value, null, DumperOptions.FlowStyle.BLOCK);
return new Yaml(new ShardingSphereYamlRepresenter(dumperOptions), dumperOptions).dumpAs(value, null, DumperOptions.FlowStyle.BLOCK);
}
return new Yaml(new ShardingSphereYamlRepresenter(dumperOptions)).dumpAsMap(value);
return new Yaml(new ShardingSphereYamlRepresenter(dumperOptions), dumperOptions).dumpAsMap(value);
}
}

0 comments on commit 426d8c1

Please sign in to comment.