Hello. While printing cucumber ast::table I've got this:
| [0m[32m search[0m[0m[0m[0m |[0m[0m [0m[32m aoeuaoeuaoeu[0m[0m[0m[0m |[0m[0m
instead of colorized
| search | aoeuaoeuaoeu |
I'm not sure if this is bug of pry or cucumber. Let me know, please.
@kalys, what's the value of params.inspect? it looks like the problem could be that there are colour codes in the params that we don't support very well.
 pry(#<Cucumber::Rails::World>)> params.inspect
=> "\n | \e[32m author\e[0m\e[0m |\e[0m \e[32m 123\e[0m\e[0m |\e[0m\n"
This line of code in Cucumber https://github.com/cucumber/cucumber/blob/master/lib/cucumber/ast/table.rb#L445 is causing the ANSI colour code output.
This is not really a bug in Cucumber, but because Cucumber overrides to_s to display coloured output we are seeing that.
Maybe create an issue in Cucumber asking to not use to_s and switch to something like "output_string" or something more sensible?
Don't recolorize output with ANSI escapes [Fixes #751]