mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2024-11-22 13:29:21 +00:00
Fix bad regex
This commit is contained in:
parent
dcf194aa6f
commit
f659f0349d
@ -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)
|
||||
}
|
Loading…
Reference in New Issue
Block a user