Replace inexistant lightmagenta CSS colour with hotpink

This improves compatibility with clients respecting the CSS
specification.

Thanks PulkoMandy, who found it using libcss in Renga!
This commit is contained in:
Emmanuel Gil Peyrot
2023-10-06 11:04:05 +02:00
parent 049da90ded
commit 2bd91dcf6f
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ static const char* irc_colors_to_css[IRC_NUM_COLORS] = {
"cyan", "cyan",
"lightcyan", "lightcyan",
"lightblue", "lightblue",
"lightmagenta", "hotpink",
"gray", "gray",
"white", "white",
}; };
+1 -1
View File
@@ -41,7 +41,7 @@ TEST_CASE("IRC colors parsing")
CHECK(cleaned_up.empty()); CHECK(cleaned_up.empty());
std::tie(cleaned_up, xhtml) = irc_format_to_xhtmlim("[\x1D13dolphin-emu/dolphin\x1D] 03foo commented on #283 (Add support for the guide button to XInput): 02http://example.com"); std::tie(cleaned_up, xhtml) = irc_format_to_xhtmlim("[\x1D13dolphin-emu/dolphin\x1D] 03foo commented on #283 (Add support for the guide button to XInput): 02http://example.com");
CHECK(xhtml->to_string() == "<body xmlns='http://www.w3.org/1999/xhtml'>[<span style='font-style:italic;'/><span style='font-style:italic;color:lightmagenta;'>dolphin-emu/dolphin</span><span style='color:lightmagenta;'>] </span><span style='color:green;'>foo</span> commented on #283 (Add support for the guide button to XInput): <span style='text-decoration:underline;'/><span style='text-decoration:underline;color:blue;'>http://example.com</span><span style='text-decoration:underline;'/></body>"); CHECK(xhtml->to_string() == "<body xmlns='http://www.w3.org/1999/xhtml'>[<span style='font-style:italic;'/><span style='font-style:italic;color:hotpink;'>dolphin-emu/dolphin</span><span style='color:hotpink;'>] </span><span style='color:green;'>foo</span> commented on #283 (Add support for the guide button to XInput): <span style='text-decoration:underline;'/><span style='text-decoration:underline;color:blue;'>http://example.com</span><span style='text-decoration:underline;'/></body>");
CHECK(cleaned_up == "[dolphin-emu/dolphin] foo commented on #283 (Add support for the guide button to XInput): http://example.com"); CHECK(cleaned_up == "[dolphin-emu/dolphin] foo commented on #283 (Add support for the guide button to XInput): http://example.com");
std::tie(cleaned_up, xhtml) = irc_format_to_xhtmlim("0e46ab by 03Pierre Dindon [090|091|040] 02http://example.net/Ojrh4P media: avoid pop-in effect when loading thumbnails by specifying an explicit size"); std::tie(cleaned_up, xhtml) = irc_format_to_xhtmlim("0e46ab by 03Pierre Dindon [090|091|040] 02http://example.net/Ojrh4P media: avoid pop-in effect when loading thumbnails by specifying an explicit size");