correctly parse idents starting with interpolation
This commit is contained in:
parent
4b15b27119
commit
374e9f9eb4
@ -722,11 +722,8 @@ impl Value {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
'#' => {
|
'#' => {
|
||||||
if let Ok(s) = eat_ident(toks, scope, super_selector) {
|
if let Ok(s) = Self::ident(toks, scope, super_selector) {
|
||||||
IntermediateValue::Value(Spanned {
|
s
|
||||||
node: Value::Ident(s.node, QuoteKind::None),
|
|
||||||
span: s.span,
|
|
||||||
})
|
|
||||||
} else {
|
} else {
|
||||||
IntermediateValue::Value(match parse_hex(toks, scope, super_selector, span) {
|
IntermediateValue::Value(match parse_hex(toks, scope, super_selector, span) {
|
||||||
Ok(v) => v,
|
Ok(v) => v,
|
||||||
|
@ -68,3 +68,8 @@ test!(
|
|||||||
"a {\n color: \"#{\\\"\\'}\";\n}\n",
|
"a {\n color: \"#{\\\"\\'}\";\n}\n",
|
||||||
"a {\n color: \"\\\\\\\"\\\\'\";\n}\n"
|
"a {\n color: \"\\\\\\\"\\\\'\";\n}\n"
|
||||||
);
|
);
|
||||||
|
test!(
|
||||||
|
interpolated_plain_css_fn,
|
||||||
|
"$f: foo;\na {\n color: #{$f}(a, 1+2, c);\n}\n",
|
||||||
|
"a {\n color: foo(a, 3, c);\n}\n"
|
||||||
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user