Skip to content

Conversation

tig
Copy link
Collaborator

@tig tig commented Jun 3, 2022

This PR Fixes #131

Previous to PowerShell 7.1, it would have been uncommon for a cmdlet to receive input decorated with ANSI escape sequences. But support for ANSI was added in 7.1 (see PowerShell/PowerShell#13071).

This PR adds a single line of code, a RegEx, to strip ANSI escape sequences from the input text.

This PR is a draft because

a) A regex is probably not the most robust way to strip ANSI. Apparently PS has a built-in capability (StringDecorated) but that is internal.
b) Pulling in all of Regex is overkill probably
c) I'm not 100% certain that TypeGetter.cs is the right place to do the stripping.

Comments appreciated.

tig and others added 30 commits March 11, 2020 15:55
@tig tig closed this Jul 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Out-ConsoleGridView doesn't handle ANSI escape sequences correctly

1 participant