do the regular lists

This commit is contained in:
amtoine 2023-03-11 11:34:49 +01:00
parent 3be1e20c74
commit ad73c94760
No known key found for this signature in database
GPG Key ID: 37AAE9B486CFF1AB

View File

@ -211,14 +211,16 @@ pub fn value_to_string(
} else { } else {
let mut collection = vec![]; let mut collection = vec![];
for val in vals { for val in vals {
collection.push(value_to_string_without_quotes( collection.push(format!(
val, "{}{}",
span, get_true_indentation(depth + 1, indent),
depth + 1, value_to_string_without_quotes(val, span, depth + 1, indent,)?
indent, ));
)?);
} }
Ok(format!("[{}]", collection.join(", "))) Ok(format!(
"[{nl}{}{nl}{idt}]",
collection.join(&format!(", {nl}").to_string())
))
} }
} }
Value::Nothing { .. } => Ok("null".to_string()), Value::Nothing { .. } => Ok("null".to_string()),