diff --git a/src/BymlLibrary/Yaml/YamlEmitter.cs b/src/BymlLibrary/Yaml/YamlEmitter.cs index d9db27e..144415a 100644 --- a/src/BymlLibrary/Yaml/YamlEmitter.cs +++ b/src/BymlLibrary/Yaml/YamlEmitter.cs @@ -97,6 +97,10 @@ public void EmitNode(in ImmutableByml byml, in ImmutableByml root) public unsafe void EmitString(Span str) { + if (str.IsEmpty) { + Builder.Append("''"); + } + if (str.ContainsAny(SpecialChars)) { Builder.Append('\''); Builder.Append(str.ToManaged());