about summary refs log tree commit diff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/src/mf2.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/templates/src/mf2.rs b/templates/src/mf2.rs
index 550adfc..643db15 100644
--- a/templates/src/mf2.rs
+++ b/templates/src/mf2.rs
@@ -60,6 +60,7 @@ markup::define! {
                         a."u-like-of"[href=likeof["properties"]["url"][0].as_str().unwrap()] {
                             @likeof["properties"]["name"][0]
                             .as_str()
+                            .and_then(|s| if s.trim().is_empty() { None } else { Some(s) })
                             .unwrap_or_else(|| likeof["properties"]["url"][0].as_str().unwrap())
                         }
                     }
@@ -77,6 +78,7 @@ markup::define! {
                         a."u-bookmark-of"[href=bookmarkof["properties"]["url"][0].as_str().unwrap()] {
                             @bookmarkof["properties"]["name"][0]
                                 .as_str()
+                                .and_then(|s| if s.trim().is_empty() { None } else { Some(s) })
                                 .unwrap_or_else(|| bookmarkof["properties"]["url"][0].as_str().unwrap())
                         }
                     }