Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PowerShell Session Multiline Wrong Highlighting #2262

Closed
iansedano opened this issue Oct 26, 2022 · 3 comments · Fixed by #2263
Closed

PowerShell Session Multiline Wrong Highlighting #2262

iansedano opened this issue Oct 26, 2022 · 3 comments · Fixed by #2263

Comments

@iansedano
Copy link

It seems that using the "PowerShell Session" highlighter won't pick up multiline constructs, and renders anything after the first line as output.

For instance:

PS> python -m doctest `
> -o DONT_ACCEPT_TRUE_FOR_1 `
> -o ELLIPSIS options.txt

Renders like this in https://pygments.org/demo/

image

I initially thought it might be the backtick as the line continuation character, but it seems that any multiline construct is not picked up properly, for example:

PS>  $Params = @{
>     Height = 50
>     Width  = 50
>     Depth  = 50
>     Name   = 'My Widget'
>     ID     = '10dbe43f-0269-48b8-96cb-447a755add55'
> }

image

Or

PS>  ls |
> grep "python"

image


On my command line emulator (Windows Terminal), it looks something like this with PowerShell Core:

image

On the old Windows PowerShell, with conhost.exe, it looks like this:

image

@birkenfeld
Copy link
Member

Thanks for the report, can you check if the PR fixes it for you?

@iansedano
Copy link
Author

Thanks for the super fast response! That fixes it for us!

@birkenfeld
Copy link
Member

Thanks!

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 a pull request may close this issue.

2 participants