mirror of
https://github.com/nushell/nushell.git
synced 2025-06-06 10:06:49 +02:00
do the regular lists
This commit is contained in:
parent
3be1e20c74
commit
ad73c94760
@ -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()),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user