From 3168e8446c1a364ee42d4d14a299d4cf70f0d58f Mon Sep 17 00:00:00 2001 From: Nathan Ferreira <14365254+nathan130200@users.noreply.github.com> Date: Mon, 6 May 2024 08:17:16 -0300 Subject: [PATCH] Fix indentchars wrong usage. --- XmppSharp/Xml.cs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/XmppSharp/Xml.cs b/XmppSharp/Xml.cs index 171d4bc..6528e21 100644 --- a/XmppSharp/Xml.cs +++ b/XmppSharp/Xml.cs @@ -40,18 +40,10 @@ internal static XmlWriter CreateWriter(StringBuilder output, in XmlFormatting fo { Require.NotNull(output); - string indentChars = string.Empty; - - if (formatting.IndentSize > 0) - { - for (int i = 0; i < formatting.IndentSize; i++) - indentChars += formatting.IndentChars; - } - var settings = new XmlWriterSettings { Indent = formatting.IndentSize > 0, - IndentChars = indentChars, + IndentChars = formatting.IndentChars, DoNotEscapeUriAttributes = formatting.DoNotEscapeUriAttributes, WriteEndDocumentOnClose = formatting.WriteEndDocumentOnClose, NewLineHandling = formatting.NewLineHandling,