ansi 256 seems to work fine when specified in attr, but not in content.
the empty object for attr fixes an additional related bug, whereby with not attr key, the text background is dim white, and foreground is bright white. (visually, maybe its ansi 256 codes, maybes its bright black bg and white fg, i cant tell, but its certainly not default text.)
With attr key
Without attr key
Reproducible test
import tk from 'terminal-kit';
const term = tk.terminal;
const Text = tk.Text;
const document = term.createDocument();
new Text({
parent: document,
content: `\x1b[38;5;242m\x1b[39;5;173mThis Should Be Orange With Grey Background But is Not.\x1b[0m`,
contentHasMarkup: 'ansi',
attr: {}
});
term.on('key', function (key: string) {
if (key === 'CTRL_C') {
term.grabInput(false);
term.clear();
process.exit();
}
});
ansi 256 seems to work fine when specified in
attr
, but not in content.the empty object for attr fixes an additional related bug, whereby with not attr key, the text background is dim white, and foreground is bright white. (visually, maybe its ansi 256 codes, maybes its bright black bg and white fg, i cant tell, but its certainly not default text.)
With attr key
Without attr key
Reproducible test