Skip to content
New issue

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

Bright background colors (bg_br_*() functions) are not properly closed #484

Closed
rossellhayes opened this issue Jun 17, 2022 · 0 comments · Fixed by #485
Closed

Bright background colors (bg_br_*() functions) are not properly closed #484

rossellhayes opened this issue Jun 17, 2022 · 0 comments · Fixed by #485

Comments

@rossellhayes
Copy link
Contributor

rossellhayes commented Jun 17, 2022

The bg_br_*() family of functions do not properly close themselves:

It looks like this is because the bg_br_*() family of functions end with escape code 39, which restores the default foreground color, rather than escape code 49, which restores the default background color.

str(cli::bg_br_yellow("x"))
#> 'cli_ansi_string' chr "\033[103mx\033[39m"
str(cli::bg_yellow("x"))
#> 'cli_ansi_string' chr "\033[43mx\033[49m"

I'd be happy to submit a PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant