diff --git a/crates/nu-command/src/formats/to/html.rs b/crates/nu-command/src/formats/to/html.rs index a36d135693..9a363e4ac8 100644 --- a/crates/nu-command/src/formats/to/html.rs +++ b/crates/nu-command/src/formats/to/html.rs @@ -118,21 +118,21 @@ impl Command for ToHtml { description: "Outputs an HTML string representing the contents of this table", example: "[[foo bar]; [1 2]] | to html", result: Some(Value::test_string( - r#"
foobar
12
"#, + r#"
foobar
12
"#, )), }, Example { description: "Optionally, only output the html for the content itself", example: "[[foo bar]; [1 2]] | to html --partial", result: Some(Value::test_string( - r#"
foobar
12
"#, + r#"
foobar
12
"#, )), }, Example { description: "Optionally, output the string with a dark background", example: "[[foo bar]; [1 2]] | to html --dark", result: Some(Value::test_string( - r#"
foobar
12
"#, + r#"
foobar
12
"#, )), }, ] @@ -360,13 +360,13 @@ fn html_table(table: Vec, headers: Vec, config: &Config) -> Strin output_string.push_str(""); - output_string.push_str(""); + output_string.push_str(""); for header in &headers { output_string.push_str(""); } - output_string.push_str(""); + output_string.push_str(""); for row in table { if let Value::Record { span, .. } = row { @@ -383,7 +383,7 @@ fn html_table(table: Vec, headers: Vec, config: &Config) -> Strin output_string.push_str(""); } } - output_string.push_str("
"); output_string.push_str(&htmlescape::encode_minimal(header)); output_string.push_str("
"); + output_string.push_str(""); output_string } diff --git a/crates/nu-command/tests/format_conversions/html.rs b/crates/nu-command/tests/format_conversions/html.rs index 5e36b3d0ef..9319b94426 100644 --- a/crates/nu-command/tests/format_conversions/html.rs +++ b/crates/nu-command/tests/format_conversions/html.rs @@ -41,7 +41,7 @@ fn out_html_table() { assert_eq!( actual.out, - r"
name
darren
" + r"
name
darren
" ); }