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

Nested placeholder remains in output #46

Open
bra-fsn opened this issue Dec 10, 2020 · 0 comments
Open

Nested placeholder remains in output #46

bra-fsn opened this issue Dec 10, 2020 · 0 comments

Comments

@bra-fsn
Copy link

bra-fsn commented Dec 10, 2020

Describe the bug
We use colorful for coloring output for scripts started from Jenkins (using the https://github.com/jenkinsci/ansicolor-plugin plugin).
I'm not sure whether this is a bug or lack of support or both, but the effect is the following:
this line
logging.info(f"{colorful.bold_snow2(step.__name__)} starting")
produces the following ASCII output:
ESC[38;5;33m11:03:05ESC[0m ESC[38;5;68mINFOESC[0m ESC[38;5;75mworker_factory/mem:0B/473M/utime:0:ESC[0m ESC[38;5;253mESC[1mESC[38;5;231mDropNaESC[22mESC[39mESC[26m startingESC[0m
which is displayed in Jenkins output as (and you can see the output is truncated, instead of starting, there's sta:
image

It can be seen that an extra [26m (proportional spacing) is left, which can't be displayed (not supported?) by the Jenkins plugin. In the terminal this looks good.
After looking into colorful's code, I'm not sure if it's not a bug (the [26m is there is mark nested borders, but it's left there).

Environment and Version

  • OS (incl. terminal and shell used): ubuntu:bionic docker image
  • Python Version: 3.6.9
  • colorful Version: the screenshot is with 0.4.2, but in the terminal I've tried with 0.5.4 which seems to produce the same output.

To Reproduce
https://gist.github.com/bra-fsn/5f875a29bf043ae74748f2f9b2dbac81

Expected behavior
I'm not sure, but I guess that [26m shouldn't be there.

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

No branches or pull requests

1 participant