Escape code not stripped maybe?
ryuheechul opened this issue · 4 comments
Describe the bug
Escape code not stripped
To Reproduce
Steps to reproduce the behavior:
- Open a typescript file containing '1+1'
- Run the command ':SnipRun'
- See error escape code contained as below
1+1 <- ^[[33m2^[[39m
Expected behavior
I expect no escaped code like this in virtual text, 1+1 <- 2
instead
Environment:
- Neovim: v0.8.3
- OS/distribution: macOS 13.2.1 22D68 arm64
- SnipRun: https://github.com/michaelb/sniprun/releases/tag/v1.2.10
Additional context
- my Neovim config regarding sniprun: ryuheechul/dotfiles@52a90a6
- GitHub code search with
escape
in this repo: https://github.com/search?q=repo%3Amichaelb%2Fsniprun%20escape&type=code
Hey, thanks for the bug report
So I assume you're in REPL mode ?
I probably forgot to pass options to the actual REPL to tell it not to color its stdout
Looking into this this weekend
Fix shouldn't be long, and I'll be putting out a new version (v1.2.11) soon
Meanwhile, you can export the environnement variable NO_COLOR=1
which is respected by deno to no output ANSI color codes in its REPL (used directly by sniprun)
Sorry for the delayed response, yes it was for the deno REPL. Just verified that the fix works like a charm, thanks a lot!