[Issue 4069] std.xml.Document.pretty saves empty elements with spaces and line breaks
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Apr 5 10:13:54 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4069
Rainer Schuetze <r.sagitario at gmx.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch, wrong-code
--- Comment #1 from Rainer Schuetze <r.sagitario at gmx.de> 2010-04-05 10:13:53 PDT ---
Here's a patch that switches to the short form of an empty element:
Index: xml.d
===================================================================
--- xml.d (revision 1476)
+++ xml.d (working copy)
@@ -887,7 +887,7 @@
return buffer;
}
- override bool isEmptyXML() { return false; } /// Returns false always
+ override bool isEmptyXML() { return items.length == 0; }
}
}
The resulting output is:
doc: '<root> <elem /></root>'
elem: ''
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list