We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undecorate does not recognize nested colors/styles.
require 'pastel' require 'strscan' pastel = ::Pastel.new pastel.new.undecorate(pastel.bold('FIRST' + pastel.blue('SECOND') + 'THIRD'))[1] # {:foreground=>:blue, :text=>"SECOND"} pastel.new.undecorate(pastel.on_yellow('FIRST' + pastel.blue('SECOND') + 'THIRD'))[1] # {:foreground=>:blue, :text=>"SECOND"} pastel.new.undecorate(pastel.on_yellow('FIRST' + pastel.bold('SECOND') + 'THIRD'))[1] # {:style=>:bold, :text=>"SECOND"}
The nested part ('SECOND') does not not retain the wrapping color/style.
'SECOND'
Expected the undecorate to recognize the nested valid styles.
Ubuntu 18.04.3 LTS
ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-linux]
FROM ruby:2.6.5
The text was updated successfully, but these errors were encountered:
446f7a1
nice, thanks!
Sorry, something went wrong.
Released v0.8.0. Next, I'll update all the tty gems that rely on pastel and relax their version restrictions.
v0.8.0
tty
pastel
No branches or pull requests
Describe the problem
Undecorate does not recognize nested colors/styles.
Steps to reproduce the problem
Actual behaviour
The nested part (
'SECOND'
) does not not retain the wrapping color/style.Expected behaviour
Expected the undecorate to recognize the nested valid styles.
Describe your environment
Ubuntu 18.04.3 LTS
ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-linux]
(in docker,FROM ruby:2.6.5
)The text was updated successfully, but these errors were encountered: