pub fn check_selectors<'a>(val: &'a str, config: &Config) -> Vec<ParseError<'a>>Expand description
Return the list of errors encountered when parsing a list of selectors
ยงExample
use encre_css::{Config, error::{ParseError, ParseErrorKind}, utils::check_selectors};
let value = "bg text-red hover:a lg: focus:() dark:(md:,shadow-8xl) bar:text-black md:foo:flex";
assert_eq!(check_selectors(value, &Config::default()), vec![
ParseError { span: 0..2, kind: ParseErrorKind::UnknownPlugin("bg") },
ParseError { span: 3..11, kind: ParseErrorKind::UnknownPlugin("text-red") },
ParseError { span: 12..19, kind: ParseErrorKind::UnknownPlugin("hover:a") },
ParseError { span: 20..23, kind: ParseErrorKind::VariantsWithoutModifier("lg:") },
ParseError { span: 24..32, kind: ParseErrorKind::VariantsWithoutModifier("focus:()") },
ParseError { span: 39..42, kind: ParseErrorKind::VariantsWithoutModifier("md:") },
ParseError { span: 43..53, kind: ParseErrorKind::UnknownPlugin("shadow-8xl") },
ParseError { span: 55..69, kind: ParseErrorKind::UnknownVariant("bar", "bar:text-black") },
ParseError { span: 70..81, kind: ParseErrorKind::UnknownVariant("foo", "md:foo:flex") }
]);