properly unquote lists

This commit is contained in:
ConnorSkees 2020-04-19 22:54:56 -04:00
parent b07b26c871
commit 9d9997432a
2 changed files with 8 additions and 0 deletions

View File

@ -214,6 +214,9 @@ impl Value {
pub fn unquote(self) -> Self {
match self {
Self::Ident(s1, _) => Self::Ident(s1, QuoteKind::None),
Self::List(v, sep, bracket) => {
Self::List(v.into_iter().map(|x| x.unquote()).collect(), sep, bracket)
}
v => v,
}
}

View File

@ -38,3 +38,8 @@ test!(
"a {\n color: #{\"#{'\"'}\"};\n}\n",
"a {\n color: \";\n}\n"
);
test!(
unquotes_space_separated_list,
"a {\n color: #{\"a\" 'b'};\n}\n",
"a {\n color: a b;\n}\n"
);