properly emit separator in join when both are under 2 length
This commit is contained in:
parent
dbf699a991
commit
a9230b7877
@ -162,9 +162,7 @@ pub(crate) fn register(f: &mut HashMap<String, Builtin>) {
|
||||
) {
|
||||
Value::Ident(s, ..) => match s.as_str() {
|
||||
"auto" => {
|
||||
if list1.len() < 2 && list2.len() < 2 {
|
||||
ListSeparator::Space
|
||||
} else if list1.is_empty() {
|
||||
if list1.is_empty() {
|
||||
sep2
|
||||
} else {
|
||||
sep1
|
||||
|
@ -212,6 +212,11 @@ test!(
|
||||
"a {\n color: join((), (a, b, c));\n}\n",
|
||||
"a {\n color: a, b, c;\n}\n"
|
||||
);
|
||||
test!(
|
||||
join_single_comma_both,
|
||||
"a {\n color: join((a,), (b,));\n}\n",
|
||||
"a {\n color: a, b;\n}\n"
|
||||
);
|
||||
test!(bracketed_ident, "a {\n color: [a];\n}\n");
|
||||
test!(bracketed_space_list, "a {\n color: [a b];\n}\n");
|
||||
test!(bracketed_comma_list, "a {\n color: [a, b];\n}\n");
|
||||
|
Loading…
x
Reference in New Issue
Block a user