ansi-html
ansi-html copied to clipboard
Doesn't recognize RGB colors supported by newer versions of chalk.
- Example code:
const chalk = require('chalk');
const ansiHtml = require('ansi-html');
const inspect = require('util').inspect;
chalk.enabled = true;
chalk.level = 3;
const c = chalk.hex('#405060')('Hello');
const h = ansiHtml(c);
console.log(inspect(c));
console.log(inspect(h));
- Expected output:
Something like this:
'\\u001b[38;2;64;80;96mHello\\u001b[39m'
'<span style="color:#405060;">Hello</span>'
- Actual output
'\\u001b[38;2;64;80;96mHello\\u001b[39m'
'\\u001b[38;2;64;80;96mHello</span>'
thx, 'll figure it out