From d029582a8292222e4e1df36d28dceac7ecc5fd72 Mon Sep 17 00:00:00 2001 From: ryan-0324 <77452312+ryan-0324@users.noreply.github.com> Date: Thu, 25 Jul 2024 05:05:53 -0400 Subject: [PATCH] fix(FakeProfileThemes): correct profile theme colors regex --- src/plugins/fakeProfileThemes/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/fakeProfileThemes/index.tsx b/src/plugins/fakeProfileThemes/index.tsx index b85f8af44..c66fde87a 100644 --- a/src/plugins/fakeProfileThemes/index.tsx +++ b/src/plugins/fakeProfileThemes/index.tsx @@ -43,8 +43,8 @@ function encode(primary: number, accent: number) { // Courtesy of Cynthia. function decode(bio: string): ProfileThemeColors | null { - // /[#([0-9A-Fa-f]{0,6}),#([0-9A-Fa-f]{0,6})]/u - const match = bio.match(/\u{E005B}\u{E0023}([\u{E0030}-\u{E0039}\u{E0041}-\u{E0046}\u{E0061}-\u{E0066}]{0,6})\u{E002C}\u{E0023}([\u{E0030}-\u{E0039}\u{E0041}-\u{E0046}\u{E0061}-\u{E0066}]{0,6})\u{E005D}/u); + // /[#([0-9A-Fa-f]{1,6}),#([0-9A-Fa-f]{1,6})]/u + const match = bio.match(/\u{E005B}\u{E0023}([\u{E0030}-\u{E0039}\u{E0041}-\u{E0046}\u{E0061}-\u{E0066}]{1,6})\u{E002C}\u{E0023}([\u{E0030}-\u{E0039}\u{E0041}-\u{E0046}\u{E0061}-\u{E0066}]{1,6})\u{E005D}/u); if (match) { const [, primary, accent] = match;