Skip to content

Commit

Permalink
Fix indentchars wrong usage.
Browse files Browse the repository at this point in the history
  • Loading branch information
nathan130200 committed May 6, 2024
1 parent d81d561 commit 3168e84
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions XmppSharp/Xml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 3168e84

Please sign in to comment.