From 839a22c1a389fb2482e9a0cd1f27b208a5318ebf Mon Sep 17 00:00:00 2001 From: Sam Nystrom Date: Fri, 23 Jun 2023 00:37:38 -0400 Subject: remove support for text color with @@ -306,8 +303,6 @@ fn parse_text(in: io::handle) ([]text | io::error | xml::error) = { append(text, true: setunderline); underline = true; }; - case "font" => - append(text, "": setcolor); case => void; }; case let end: xml::elementend => @@ -327,18 +322,9 @@ fn parse_text(in: io::handle) ([]text | io::error | xml::error) = { append(text, false: setunderline); underline = false; }; - case "font" => - if (len(colorstack) > 0) { - append(text, colorstack[len(colorstack) - 1]: setcolor); - delete(colorstack[len(colorstack) - 1]); - }; case => void; }; - case let attr: xml::attribute => - if (attr.0 == "color" && text[len(text) - 1] is setcolor) { - text[len(text) - 1] = strings::dup(attr.1): setcolor; - append(colorstack, strings::dup(attr.1)); - }; + case xml::attribute => void; case let t: xml::text => // Necessary because of raw mode append(text, strings::replace(t, "\n", "\r\n")); @@ -358,10 +344,6 @@ fn print_subtitle(out: io::handle, text: []text) (void | io::error) = { yield if (italic) "\x1b[3m" else "\x1b[23m"; case let underline: setunderline => yield if (underline) "\x1b[4m" else "\x1b[24m"; - case let color: setcolor => - // TODO: implement this - // fmt::fprintf(out, "\x1b[38;2;{};{};{}m", r, g, b)?; - continue; }; io::writeall(out, strings::toutf8(output))?; }; -- cgit v1.2.3