unexpected
unexpected copied to clipboard
Weird colouring in Windows Powershell
Problem: https://files.gitter.im/unexpectedjs/unexpected/boB2/MinimalReactTest1.PNG
Repro: https://github.com/gertsonderby/magicpen-test
Notably, this bug seems to only occur in Powershell (specifically, the 'GitHub for Windows' Git Shell). Not sure what it would take to replicate elsewhere.
Confirmed as happening (with slightly different colors) in default Powershell (w/o GitHub extensions).
Commenting out node_modules/magicpen/lib/AnsiSerializer.js:131
appears to solve the problem.
We only close the colors once even when we start a standard color wrapped in a 256 color. It would be interesting to try to insert the following on the line after AnsiSerializer.js:131
:
close += ansiStyles[styleName].close;
That had no effect that I could discern. Still a discolored background.