From 76ccff80f919c33f4b0ac57b9341616bea612593 Mon Sep 17 00:00:00 2001 From: Emi Simpson Date: Fri, 6 Dec 2019 16:14:48 -0500 Subject: [PATCH] Fixed failure of regex to match @imports --- src/utils.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.rs b/src/utils.rs index 12b0d14..34e23b5 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -36,7 +36,7 @@ use url::{ParseError, Url}; /// Malformed CSS could lead to an invalid URL being present. It is therefor /// recomended that the URL is manually validated. const CSS_URL_REGEX_STR: &str = - r###"(?:(?P@import)|(?Psrc\s*:)\s+)?url\((?P['"]?(?P[^"'\)]+)['"]?)\)"###; + r###"(?:(?:(?P@import)|(?Psrc\s*:))\s+)?url\((?P['"]?(?P[^"'\)]+)['"]?)\)"###; lazy_static! { static ref HAS_PROTOCOL: Regex = Regex::new(r"^[a-z0-9]+:").unwrap();