diff --git a/PwshSpectreConsole/private/Write-AnsiConsole.ps1 b/PwshSpectreConsole/private/Write-AnsiConsole.ps1 index eb7f1fd9..0c328984 100644 --- a/PwshSpectreConsole/private/Write-AnsiConsole.ps1 +++ b/PwshSpectreConsole/private/Write-AnsiConsole.ps1 @@ -19,7 +19,6 @@ function Write-AnsiConsole { [Parameter(Mandatory)] [RenderableTransformationAttribute()] [object] $RenderableObject, - [switch] $Newline, [switch] $CustomItemFormatter ) @@ -33,11 +32,7 @@ function Write-AnsiConsole { $script:SpectreConsole.Write($RenderableObject) $output = $script:SpectreConsoleWriter.ToString() - if (!$Newline) { - $output.ToString().TrimEnd() - } else { - $output.ToString() - } - + $output.ToString().TrimEnd() + $null = $script:SpectreConsoleWriter.GetStringBuilder().Clear() } \ No newline at end of file