better heuristics when no space between colon and style
This commit is contained in:
parent
de6b823440
commit
bd426b9fab
@ -546,7 +546,11 @@ pub(crate) fn eat_expr<I: Iterator<Item = Token>>(
|
|||||||
return Ok(Some(Expr::VariableDecl(name, Box::new(val))));
|
return Ok(Some(Expr::VariableDecl(name, Box::new(val))));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
todo!()
|
values.push(tok);
|
||||||
|
// HACK: we add the name back in, but lose the position information
|
||||||
|
// potentially requires refactoring heuristics for
|
||||||
|
// no space between colon and style value
|
||||||
|
values.extend(name.chars().map(|c| Token::new(Pos::new(), c)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
'/' => {
|
'/' => {
|
||||||
|
@ -105,3 +105,8 @@ test!(
|
|||||||
values_after_important,
|
values_after_important,
|
||||||
"a {\n color: foo bar !important hux baz;\n}\n"
|
"a {\n color: foo bar !important hux baz;\n}\n"
|
||||||
);
|
);
|
||||||
|
test!(
|
||||||
|
no_space_between_colon_and_style_variable,
|
||||||
|
"$base-color: #036;\na {\n color:lighten($base-color, 5%);\n}",
|
||||||
|
"a {\n color: #004080;\n}\n"
|
||||||
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user