remove panic on malformed bracketed list
This commit is contained in:
parent
9c2d1200f7
commit
5c8e88d16b
@ -259,7 +259,7 @@ pub(crate) fn read_until_closing_square_brace(
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
'\\' => {
|
'\\' => {
|
||||||
t.push(toks.next().unwrap());
|
t.push(tok);
|
||||||
t.push(match toks.next() {
|
t.push(match toks.next() {
|
||||||
Some(tok) => tok,
|
Some(tok) => tok,
|
||||||
None => continue,
|
None => continue,
|
||||||
|
@ -245,4 +245,11 @@ error!(
|
|||||||
"a {foo: {bar: red", "Error: Expected identifier."
|
"a {foo: {bar: red", "Error: Expected identifier."
|
||||||
);
|
);
|
||||||
error!(toplevel_nullbyte, "\u{0}", "Error: expected selector.");
|
error!(toplevel_nullbyte, "\u{0}", "Error: expected selector.");
|
||||||
error!(double_escaped_bang_at_toplevel, "\\!\\!", "Error: expected \"{\".");
|
error!(
|
||||||
|
double_escaped_bang_at_toplevel,
|
||||||
|
"\\!\\!", "Error: expected \"{\"."
|
||||||
|
);
|
||||||
|
error!(
|
||||||
|
nothing_after_escape_inside_brackets,
|
||||||
|
"a { color: [\\", "Error: expected \"]\"."
|
||||||
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user