From 0c43a4d04b239ae42a983c2259490ef2e344997b Mon Sep 17 00:00:00 2001 From: Jonathan Turner Date: Sun, 19 Jul 2020 10:12:17 +1200 Subject: [PATCH] Add hex pretty print to 'to html' (#2216) --- crates/nu-cli/src/commands/to_html.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/nu-cli/src/commands/to_html.rs b/crates/nu-cli/src/commands/to_html.rs index 525e2162e0..b2ea34384a 100644 --- a/crates/nu-cli/src/commands/to_html.rs +++ b/crates/nu-cli/src/commands/to_html.rs @@ -207,7 +207,11 @@ async fn to_html( _ => {} } } - _ => {} + _ => { + let output = pretty_hex::pretty_hex(&b); + + output_string.push_str(&output); + } } } UntaggedValue::Primitive(Primitive::String(ref b)) => {