Make indent configurable
This commit is contained in:
@@ -17,6 +17,7 @@ public static class SNbt
|
||||
public static readonly SerializerOptions Default = new();
|
||||
|
||||
public SerializationStyle Style { get; init; } = SerializationStyle.Compact;
|
||||
public string Indent { get; init; } = " ";
|
||||
public bool AlwaysQuoteTagNames { get; init; } = false;
|
||||
// public bool AlwaysQuoteStringTags { get; init; } = false;
|
||||
}
|
||||
@@ -101,7 +102,7 @@ public static class SNbt
|
||||
{
|
||||
for (var i = 0u; i < depth; i++)
|
||||
{
|
||||
writer.Write(" ");
|
||||
writer.Write(options.Indent);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user