Skip to content

Commit 7183029

Browse files
committed
StripElementContentWhitespace is affected by #38 as well
1 parent d8af7cc commit 7183029

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

RELEASE_NOTES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## XMLUnit.NET 2.9.3 - /not released, yet/
44

5+
* `Nodes.StripElementContentWhitespace` had the same problem of not
6+
knowning about `XmlWhitespace` that caused
7+
Issue [#38](https://github.com/xmlunit/xmlunit.net/issues/38)
8+
59
## XMLUnit.NET 2.9.2 - /Released 2023-03-16/
610

711
* added `NodeFilters#SatisfiesAll` and `SatifiesAny` methods to make

src/main/net-core/Util/Nodes.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ private static void StripECW(XmlNode n) {
184184
foreach (XmlNode child in n.ChildNodes) {
185185
StripECW(child);
186186
if (!(n is XmlAttribute)
187-
&& (child is XmlText || child is XmlCDataSection)
187+
&& (child is XmlText || child is XmlCDataSection || child is XmlWhitespace)
188188
&& child.Value.Trim().Length == 0) {
189189
toRemove.AddLast(child);
190190
}

0 commit comments

Comments
 (0)