Skip to content

Commit

Permalink
2009-01-20 Atsushi Enomoto <atsushi@ximian.com>
Browse files Browse the repository at this point in the history
	* XDocument.cs : fix wrong indentation handling.


svn path=/trunk/mcs/; revision=123850
  • Loading branch information
atsushieno committed Jan 20, 2009
1 parent c3c74a2 commit cadf848
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 4 additions & 0 deletions mcs/class/System.Xml.Linq/System.Xml.Linq/ChangeLog
@@ -1,3 +1,7 @@
2009-01-20 Atsushi Enomoto <atsushi@ximian.com>

* XDocument.cs : fix wrong indentation handling.

2008-11-19 Jb Evain <jbevain@novell.com>

* XNodeReader: build on NET_2_1.
Expand Down
8 changes: 2 additions & 6 deletions mcs/class/System.Xml.Linq/System.Xml.Linq/XDocument.cs
Expand Up @@ -200,13 +200,9 @@ public void Save (TextWriter tw)
public void Save (TextWriter tw, SaveOptions options)
{
XmlWriterSettings s = new XmlWriterSettings ();
if ((options & SaveOptions.DisableFormatting) == 0) {
// hacky!
if ((options & SaveOptions.DisableFormatting) == SaveOptions.None)
s.Indent = true;
s.IndentChars = String.Empty;
s.NewLineChars = String.Empty;
}
using (XmlWriter w = XmlWriter.Create (tw)) {
using (XmlWriter w = XmlWriter.Create (tw, s)) {
Save (w);
}
}
Expand Down

0 comments on commit cadf848

Please sign in to comment.