From f659f0349d495915aa50396d47a211ee83641764 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Sat, 6 Mar 2021 18:42:45 +0100 Subject: [PATCH] Fix bad regex --- src/utils/string_utils.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/string_utils.rs b/src/utils/string_utils.rs index 33d1dbb..41fb281 100644 --- a/src/utils/string_utils.rs +++ b/src/utils/string_utils.rs @@ -104,6 +104,6 @@ pub fn check_emoji_code(shortcut: &str) -> bool { /// assert_eq!(check_emoji_code("UUFF00"), false); /// ``` pub fn check_html_color(color: &str) -> bool { - let r = Regex::new(r"^:[A-F0-9]{6}:$").unwrap(); + let r = Regex::new(r"^[A-F0-9]{6}$").unwrap(); r.is_match(color) } \ No newline at end of file