misc.color: forgot the multiline flag

This commit is contained in:
Cynthia Foxwell 2024-07-31 21:48:05 -06:00
parent f85e8c0215
commit 3d06d43131

View file

@ -645,7 +645,7 @@ color.callback = async function (msg, line, args, {truerandom}) {
}
if (!color.isValid) {
const colornamesHex = colornamesRaw.match(new RegExp(`^([0-9a-f]{6}),${line},`, "i"))?.[1];
const colornamesHex = colornamesRaw.match(new RegExp(`^([0-9a-f]{6}),${line},`, "im"))?.[1];
if (colornamesHex) {
color = tinycolor(colornamesHex);
} else {
@ -701,7 +701,7 @@ color.callback = async function (msg, line, args, {truerandom}) {
});
}
const colornamesName = colornamesRaw.match(new RegExp(`^${color.toHex()},([^,]+?),`, "i"))?.[1];
const colornamesName = colornamesRaw.match(new RegExp(`^${color.toHex()},([^,]+?),`, "im"))?.[1];
if (colornamesName) {
fields.push({name: "\u200b", value: `**[colornames](https://colornames.org/) Name**\n${colornamesName}`});
}