ttacon / chalk

Intuitive package for prettifying terminal/console output. http://godoc.org/github.com/ttacon/chalk
MIT License
450 stars 21 forks source link

Possible issue with unicode width (Style() vs Color()) #2

Open ttacon opened 9 years ago

ttacon commented 9 years ago
chalk.Green.NewStyle().Style("✗")

does not give the same output as:

chalk.Green.Color("✗")
theodesp commented 6 years ago

Hey, actually this is expected as when you create a new Style you initialize a background color of 0 which translates to \e[40m which is black.

So for the 2 cases the output will be: ✗

and

✗

Respectively.

Do you still want a fix to ignore the background property if it's not set?