From 2dea392e407a38dc95b010c4bb08fe5bea81cf0b Mon Sep 17 00:00:00 2001 From: Jonathan Turner Date: Sun, 19 Jul 2020 12:14:40 +1200 Subject: [PATCH] Add hex pretty print to 'to html' (#2217) --- 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 b2ea34384a..90483d8468 100644 --- a/crates/nu-cli/src/commands/to_html.rs +++ b/crates/nu-cli/src/commands/to_html.rs @@ -204,7 +204,11 @@ async fn to_html( output_string.push_str(&base64::encode(&b)); output_string.push_str("\">"); } - _ => {} + _ => { + let output = pretty_hex::pretty_hex(&b); + + output_string.push_str(&output); + } } } _ => {