Skip to content

Commit 1428f85

Browse files
Fix YamlConfig not using double quotes
1 parent f15cf50 commit 1428f85

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

yaml/src/main/java/io/github/almightysatan/jaskl/yaml/YamlConfig.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,9 @@ public ValueRepresenter(DumperOptions options) {
329329

330330
@Override
331331
protected Node representScalar(Tag tag, String value, DumperOptions.ScalarStyle style) {
332-
return super.representScalar(tag, value, style == null && tag == Tag.STR ? DumperOptions.ScalarStyle.DOUBLE_QUOTED : style);
332+
return super.representScalar(tag, value, tag == Tag.STR && (style == null
333+
|| style == DumperOptions.ScalarStyle.PLAIN || style == DumperOptions.ScalarStyle.SINGLE_QUOTED)
334+
? DumperOptions.ScalarStyle.DOUBLE_QUOTED : style);
333335
}
334336
}
335337

0 commit comments

Comments
 (0)