diff --git a/crates/nu-cli/src/commands/to_html.rs b/crates/nu-cli/src/commands/to_html.rs
index d18cb0024e..d7d70de3c9 100644
--- a/crates/nu-cli/src/commands/to_html.rs
+++ b/crates/nu-cli/src/commands/to_html.rs
@@ -60,7 +60,7 @@ fn to_html(args: CommandArgs, registry: &CommandRegistry) -> Result {
let extension = f.split('.').last().map(String::from);
match extension {
- Some(s) if ["png", "jpg", "bmp", "gif", "tiff"].contains(&s.as_str()) => {
+ Some(s) if ["png", "jpg", "bmp", "gif", "tiff", "jpeg"].contains(&s.as_str()) => {
output_string.push_str("
Result {}
}
}
+ UntaggedValue::Primitive(Primitive::String(ref b)) => {
+ // This might be a bit much, but it's fun :)
+ match row.tag.anchor {
+ Some(AnchorLocation::Url(f)) |
+ Some(AnchorLocation::File(f)) => {
+ let extension = f.split('.').last().map(String::from);
+ match extension {
+ Some(s) if s == "svg" => {
+ output_string.push_str("
");
+ continue;
+ }
+ _ => {}
+ }
+ }
+ _ => {}
+ }
+ output_string.push_str(&(htmlescape::encode_minimal(&format_leaf(&row.value).plain_string(100_000)).replace("\n", "
")));
+ }
UntaggedValue::Row(row) => {
output_string.push_str("");
for header in &headers {