fusesource / jansi

Jansi is a small java library that allows you to use ANSI escape sequences to format your console output which works even on windows.
http://fusesource.github.io/jansi/
Apache License 2.0
1.12k stars 140 forks source link

Handle SGRs with multiple options #189

Closed tszmytka closed 3 years ago

tszmytka commented 3 years ago

Currently jansi doesn't handle the sequence ESC[0;38m. This PR fixes that and adds a test.

A similar approach has been implemented in Jenkins ansicolor-plugin for some time, where the issue has been brought up by a user in a bug ticket.

I am not entirely sure what that sequence is supposed to do (haven't found it in any documentation) but using it in shell doesn't render any special characters/effects so I guess jansi should behave the same.

tszmytka commented 3 years ago

@gnodet Could I ask for a review whenever you have a free moment?

gnodet commented 3 years ago

@tszmytka the patch looks good to me. The ansi sequence does not have any meaning, as it's missing the parameters for the 38 command, but ignoring it sounds good to me. Please add the correct header and I'll merge it.