From 3be1e20c74303418b3f632b83622bdf1aba68e1f Mon Sep 17 00:00:00 2001 From: amtoine Date: Sat, 11 Mar 2023 11:34:38 +0100 Subject: [PATCH] compute the newline and the indentation of the current depth --- crates/nu-command/src/formats/to/nuon.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/nu-command/src/formats/to/nuon.rs b/crates/nu-command/src/formats/to/nuon.rs index dcb9e34b88..f70e17b22b 100644 --- a/crates/nu-command/src/formats/to/nuon.rs +++ b/crates/nu-command/src/formats/to/nuon.rs @@ -100,6 +100,9 @@ pub fn value_to_string( depth: usize, indent: &Option, ) -> Result { + let nl = get_true_newline(indent); + let idt = get_true_indentation(depth, indent); + match v { Value::Binary { val, .. } => { let mut s = String::with_capacity(2 * val.len());