Skip to content

Commit

Permalink
Always trimend()
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaunLawrie committed Aug 18, 2024
1 parent e57d8b1 commit 96bd285
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions PwshSpectreConsole/private/Write-AnsiConsole.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ function Write-AnsiConsole {
[Parameter(Mandatory)]
[RenderableTransformationAttribute()]
[object] $RenderableObject,
[switch] $Newline,
[switch] $CustomItemFormatter
)

Expand All @@ -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()
}

0 comments on commit 96bd285

Please sign in to comment.