Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-12-25 18:40:05 +01:00
Only dump with comments if using YAMLFormat.EXTENDED
Dieser Commit ist enthalten in:
Ursprung
71fc98ba1c
Commit
49678720c6
@ -75,6 +75,7 @@ public class YAMLProcessor extends YAMLNode {
|
|||||||
/*
|
/*
|
||||||
* Map from property key to comment. Comment may have multiple lines that are newline-separated.
|
* Map from property key to comment. Comment may have multiple lines that are newline-separated.
|
||||||
* Comments support based on ZerothAngel's AnnotatedYAMLConfiguration
|
* Comments support based on ZerothAngel's AnnotatedYAMLConfiguration
|
||||||
|
* Comments are only supported with YAMLFormat.EXTENDED
|
||||||
*/
|
*/
|
||||||
private final Map<String, String> comments = new HashMap<String, String>();
|
private final Map<String, String> comments = new HashMap<String, String>();
|
||||||
|
|
||||||
@ -183,7 +184,7 @@ public class YAMLProcessor extends YAMLNode {
|
|||||||
writer.append(header);
|
writer.append(header);
|
||||||
writer.append(LINE_BREAK);
|
writer.append(LINE_BREAK);
|
||||||
}
|
}
|
||||||
if (comments.size() == 0) {
|
if (comments.size() == 0 || format != YAMLFormat.EXTENDED) {
|
||||||
yaml.dump(root, writer);
|
yaml.dump(root, writer);
|
||||||
} else {
|
} else {
|
||||||
// Iterate over each root-level property and dump
|
// Iterate over each root-level property and dump
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren