From 45d9bd306b8d75548f4b6758b35c78ddafcfe59e Mon Sep 17 00:00:00 2001 From: kirbylife Date: Sun, 7 Mar 2021 19:39:03 -0600 Subject: [PATCH] add the contains attribute and the nth child --- src/lib.rs | 39 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 43370e0..7514fa9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,7 @@ use regex::Regex; fn cssifier(xpath: &'static str) -> Option { + // Ultra magic regex to parse XPath selectors let reg = Regex::new(r#"(?P(^id\(["']?(?P\s*[\w/:][-/\w\s,:;.]*)["']?\)|(?P