medikoo/cli-color

nested brightness shouldn't be preserved

tmx976 opened this issue · 3 comments

adding the last two line to your sample code basic.js

console.log('Styled text can be nested:');
console.log(clc.red('red ' + clc.blue('blue') + ' red'));
console.log(clc.red('red ' + clc.blueBright('blue') + ' red bright')+clc.yellow(' bright?'));
console.log(clc.redBright('red ') + ' bright?');

In the third line, the "red bright" piece of string appear red bright, but it shouldn't.. IMHO
the yellow one appear just yellow, as it should be.

Also the last default part of last line appear not bright, as it should be.

Seems that brihtness isn't cleared in close sequence when nested.

I'm using (and I have to use) the standard windows cmd

image

@tmx976 Which version of Node.js you're using. We had similar problem a longer while ago, and it was in fact Node.js bug -> nodejs/node-v0.x-archive#4019

Looks as duplicate of #4 but let's confirm on your Node.js version

I'm closing it due to lack of test case that can confirm the issue