pomsky-lang / pomsky

A new, portable, regular expression language
https://pomsky-lang.org
Apache License 2.0
1.28k stars 19 forks source link

JSON includes ANSI codes when run from a terminal #70

Closed Aloso closed 11 months ago

Aloso commented 1 year ago

Describe the bug

When pomsky is run with --json from the terminal, the visual field in each diagnostic contains ANSI codes.

To Reproduce

pomsky --json "[.]"

Expected behavior

With the --json flag, the output should be the same everywhere, and not depend on whether it was invoked from a terminal.