calc: forgot hexToAnsi returns raw

This commit is contained in:
Cynthia Foxwell 2026-08-13 17:39:18 -06:00
commit ad73884564
Signed by: Cynosphere
SSH key fingerprint: SHA256:H3SM8ufP/uxqLwKSH7xY89TDnbR9uOHzjLoBr0tlajk

View file

@ -41,7 +41,7 @@ function htmlToAnsi(str) {
for (const part of tree) { for (const part of tree) {
if (part.span) { if (part.span) {
const color = hexToAnsi(part[":@"].$style.replace("color:", "")); 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 { } else {
out += part["#text"]; out += part["#text"];
} }