We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Input
al9�999999999999999999999dkfjjal`kj]fakY{djfjfla{djflkd
Output
thread 'main' panicked at 'assertion failed: `(left == right)` left: `[Ident("al9"), Delim('\u{19}'), Dimension { has_sign: false, value: 1000000000000000000000.0, int_value: Some(2147483647), unit: "dkfjjal" }, Delim('`'), Ident("kj"), CloseSquareBracket, Ident("fakY"), CurlyBracketBlock]`, right: `[Ident("al9"), Delim('\u{19}'), Dimension { has_sign: false, value: 1000000000000000000000.0, int_value: None, unit: "dkfjjal" }, Delim('`'), Ident("kj"), CloseSquareBracket, Ident("fakY"), CurlyBracketBlock]`', css-vrf.rs:44:5
Expect
left & right should be the same?
code
use cssparser::{Parser, ParserInput, ToCss, Token}; // let data = input // parse `data` into tokens let str1 = match std::str::from_utf8(data) { Ok(d) => d, Err(..) => return, }; let tokens1: Vec<Token> = { let mut parser_input = ParserInput::new(str1); let mut parser = Parser::new(&mut parser_input); let mut tokens = vec![]; while let Ok(token) = parser.next_including_whitespace_and_comments() { tokens.push(token.clone()) } tokens }; // dump the tokens into a string and parse again into tokens let str2 = tokens1 .iter() .map(|t| t.to_css_string()) .collect::<String>(); let tokens2: Vec<Token> = { let mut parser_input = ParserInput::new(&str2); let mut parser = Parser::new(&mut parser_input); let mut tokens = vec![]; while let Ok(token) = parser.next_including_whitespace_and_comments() { tokens.push(token.clone()) } tokens }; assert_eq!(tokens1, tokens2);
The text was updated successfully, but these errors were encountered:
Related to #165
Sorry, something went wrong.
Dupe of #165 indeed.
No branches or pull requests
Input
al9�999999999999999999999dkfjjal`kj]fakY{djfjfla{djflkd
Output
Expect
left & right should be the same?
code
The text was updated successfully, but these errors were encountered: