1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2024-11-26 15:29:21 +00:00

Fix bad regex

This commit is contained in:
Pierre HUBERT 2021-03-06 18:42:45 +01:00
parent dcf194aa6f
commit f659f0349d

View File

@ -104,6 +104,6 @@ pub fn check_emoji_code(shortcut: &str) -> bool {
/// assert_eq!(check_emoji_code("UUFF00"), false); /// assert_eq!(check_emoji_code("UUFF00"), false);
/// ``` /// ```
pub fn check_html_color(color: &str) -> bool { 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) r.is_match(color)
} }