This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Description
Prerequisites
Steps to reproduce
$rightText = @(" This is other", "example text used!") -join [Environment]::NewLine
$leftText = @("This is some", "example text.") -join [Environment]::NewLine
compare-text $leftText $rightText -view side | out-string -str | %{$_.replace("`e","``e")}
Expected behavior
the escape sequence should be correct
Actual behavior
The output looks as follows:
`e[0m1 | `e[0mThis is `e[1;9;31msome`e[0m`e[0m `e[0m | `e[0;1;32m `e[0mThis is `e[0;1;32mother`e…`e[0m
`e[0m`e[0m`e[1;9;31m`e[0m`e[0m`e[0m`e[0;1;32m`e[0m`e[0;1;32m`e[0m2 | `e[0mexample text`e[1;9;31m.`e[0m`e[0m | `e[0mexample text`e[0;1;32m…`e[0m
before the ellipsis of the first line of output there is an extraneous "`e" (or perhaps an escape sequence which is incomplete)
Error details
Environment data
Name Value
---- -----
PSVersion 7.3.0
PSEdition Core
GitCommitId 7.3.0
OS Darwin 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:42:11 PST 2023; root:xnu-8792.81.3~2/RELEASE_X86_64
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Version
0.4.0 preview2
Visuals
No response