Incorrect bar size when color is used in the title
Arnaud73 opened this issue · comments
Color can be used for the bar, but if being used in the title, then the bar size is shorter.
E.g.:
const progress = new ProgressBar({
total: 10,
complete: green('='),
incomplete: yellow('-'),
display: `:completed/:total :title [:bar] :percent`,
});
let completed = 0;
for (const file of Array.from({ length: 10 }, (value, index) => index)) {
progress.render(completed++, {
title: `${yellow("file")} • ${blue("en!)} → ${blue("es")}`,
});
}
If the color used in the title are removed, then the bar is displayed correctly.
Thanks, I just tested, and it works flawlessly!