-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DUX-3004]: handle evil clients that send ANSI escapes after NL
Wew. That was a bug. The reproducer is here: https://github.com/rampion/ghciwatch-bug-demo After tracing `consume_str`, I found out that the cause of our problems is that hspec includes the NL in their coloured output before resetting colour. https://github.com/hspec/hspec/blob/fb9916f07e580f2572220d381e1886e765df95b7/hspec-core/src/Test/Hspec/Core/Formatters/Internal.hs#L297-L306 That means that it is a pain in the ass to parse, since it shoves random ANSI escapes onto the next line. The easiest, and probably most correct, solution to this is to just eat ANSI escapes while looking for markers.
- Loading branch information
Showing
2 changed files
with
164 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters