handle edge case in parsing of units ending with hypen followed by whitespace
This commit is contained in:
parent
637dc39544
commit
a8141d2488
@ -32,9 +32,9 @@ fn ident_body_no_interpolation<I: Iterator<Item = Token>>(
|
|||||||
if second.kind == '.' || second.kind.is_ascii_digit() {
|
if second.kind == '.' || second.kind.is_ascii_digit() {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
toks.next();
|
toks.next();
|
||||||
text.push('-');
|
text.push('-');
|
||||||
text.push(toks.next().unwrap().kind);
|
|
||||||
} else if is_name(tok.kind) {
|
} else if is_name(tok.kind) {
|
||||||
text.push(toks.next().unwrap().kind);
|
text.push(toks.next().unwrap().kind);
|
||||||
} else if tok.kind == '\\' {
|
} else if tok.kind == '\\' {
|
||||||
|
@ -209,3 +209,8 @@ test!(
|
|||||||
"a {\n color: 1/**/-/**/1;\n}\n",
|
"a {\n color: 1/**/-/**/1;\n}\n",
|
||||||
"a {\n color: 0;\n}\n"
|
"a {\n color: 0;\n}\n"
|
||||||
);
|
);
|
||||||
|
test!(
|
||||||
|
no_space_after_first_unit_and_second_float,
|
||||||
|
"a {\n color: 1em- 0.0em;\n}\n",
|
||||||
|
"a {\n color: 1em- 0em;\n}\n"
|
||||||
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user