diff --git a/src/value/ops.rs b/src/value/ops.rs index c33d023..0fbc94a 100644 --- a/src/value/ops.rs +++ b/src/value/ops.rs @@ -77,16 +77,7 @@ impl Add for Value { } Self::UnaryOp(..) | Self::Paren(..) => (self.eval()? + other)?, Self::Ident(s1, quotes1) => match other { - Self::Ident(s2, quotes2) => { - let quotes = match (quotes1, quotes2) { - (QuoteKind::Double, _) - | (QuoteKind::Single, _) - | (_, QuoteKind::Double) - | (_, QuoteKind::Single) => QuoteKind::Double, - _ => QuoteKind::None, - }; - Value::Ident(format!("{}{}", s1, s2), quotes) - } + Self::Ident(s2, _) => Value::Ident(format!("{}{}", s1, s2), quotes1.normalize()), Self::Important | Self::True | Self::False | Self::Dimension(..) => { Value::Ident(format!("{}{}", s1, other), quotes1.normalize()) } diff --git a/tests/addition.rs b/tests/addition.rs index 84a4cf5..22dcbfc 100644 --- a/tests/addition.rs +++ b/tests/addition.rs @@ -54,13 +54,11 @@ test!( "a {\n color: \"foobar\";\n}\n" ); test!( - #[ignore] unquoted_plus_dblquoted, "a {\n color: foo + \"bar\";\n}\n", "a {\n color: foobar;\n}\n" ); test!( - #[ignore] unquoted_plus_sglquoted, "a {\n color: foo + 'bar';\n}\n", "a {\n color: foobar;\n}\n"