From eca8d2a1fa4bbaac6a5438a11bfee932b254a053 Mon Sep 17 00:00:00 2001 From: Bruno Schmidt Date: Mon, 9 Jan 2023 02:00:05 -0300 Subject: [PATCH] fix: Allow anycase Hex for Color, instead of lowercase only --- src/sh.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sh.rs b/src/sh.rs index 41f42e7..0db3ee2 100644 --- a/src/sh.rs +++ b/src/sh.rs @@ -3,7 +3,7 @@ use regex::Regex; lazy_static! { // global regex constant - static ref HEX: Regex = Regex::new(r"^[a-f\d]{6}$").unwrap(); + static ref HEX: Regex = Regex::new(r"^[a-fA-F\d]{6}$").unwrap(); } fn code(color: &str, prefix: &str, light_prefix: &str) -> Option {