diff --git a/README.md b/README.md index b46cd3d..2e0ac83 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,6 @@ cssifier("//a/b[contains(text(), 'hello')]") ``` ### Known issues -[ ] invalid XPath selectors panic +[ ] invalid XPath return empty String Contributors are welcome :). diff --git a/src/lib.rs b/src/lib.rs index 3f2fb7b..708fd65 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -97,5 +97,6 @@ mod tests { cssifier("//a/b[contains(text(), 'hello')]").unwrap(), "a b:contains(hello)" ); + assert_eq!(cssifier("*random shit//*").unwrap(), ""); } }