diff --git a/Core.psm1 b/Core.psm1 index eb279b8..ee02913 100644 --- a/Core.psm1 +++ b/Core.psm1 @@ -2765,15 +2765,15 @@ function Update-XmlFormatting { ) process { - $Xml = $Xml -replace "`r`n", "`n" - $Xml = $Xml -replace '<([^\s/>]+)([^>]*)\s/>' , '<$1$2/>' - $Xml = ($Xml -split "`n") | + $Xml = ($Xml -split "`r?`n") | Where-Object { $_.Trim().Length -gt 0 } | ForEach-Object { $_ } | Out-String + $Xml = $Xml -replace "`r`n", "`n" + return $Xml.Trim() } }