mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-07 23:52:11 -07:00
SPIGOT-6866: Fixed spaces a between comment indicator and actual comment
By: Wolf2323 <gabrielpatrikurban@gmail.com>
This commit is contained in:
@@ -204,7 +204,9 @@ public class YamlConfiguration extends FileConfiguration {
|
||||
if (comment.getCommentType() == CommentType.BLANK_LINE) {
|
||||
lines.add(null);
|
||||
} else {
|
||||
lines.add(comment.getValue());
|
||||
String line = comment.getValue();
|
||||
line = line.startsWith(" ") ? line.substring(1) : line;
|
||||
lines.add(line);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -217,7 +219,9 @@ public class YamlConfiguration extends FileConfiguration {
|
||||
if (comment == null) {
|
||||
lines.add(new CommentLine(null, null, "", CommentType.BLANK_LINE));
|
||||
} else {
|
||||
lines.add(new CommentLine(null, null, comment, commentType));
|
||||
String line = comment;
|
||||
line = line.isEmpty() ? line : " " + line;
|
||||
lines.add(new CommentLine(null, null, line, commentType));
|
||||
}
|
||||
}
|
||||
return lines;
|
||||
|
Reference in New Issue
Block a user