calc: forgot hexToAnsi returns raw
This commit is contained in:
parent
7932b4af5d
commit
ad73884564
1 changed files with 1 additions and 1 deletions
|
|
@ -41,7 +41,7 @@ function htmlToAnsi(str) {
|
|||
for (const part of tree) {
|
||||
if (part.span) {
|
||||
const color = hexToAnsi(part[":@"].$style.replace("color:", ""));
|
||||
out += `${color}${part.span[0]["#text"]}\x1b[0m`;
|
||||
out += `\x1b[${color}m${part.span[0]["#text"]}\x1b[0m`;
|
||||
} else {
|
||||
out += part["#text"];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue