We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a454dc4 commit 57e8828Copy full SHA for 57e8828
format/yaml/src/main/java/org/spongepowered/configurate/yaml/YamlParserComposer.java
@@ -284,7 +284,9 @@ void applyComments(final ConfigurationNode node) {
284
= (CommentedConfigurationNodeIntermediary<? extends @NonNull Object>) node;
285
if (commented.comment() != null) {
286
collector.insert(0, commented.comment());
287
- collector.insert(commented.comment().length(), '\n');
+ if (collector.charAt(collector.length() - 1) != '\n') {
288
+ collector.insert(commented.comment().length(), '\n');
289
+ }
290
}
291
commented.comment(collector.toString());
292
collector.delete(0, collector.length());
0 commit comments