aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2022-06-02 00:28:24 +0000
committerFuwn <[email protected]>2022-06-02 00:28:24 +0000
commitba98a808f0e0c848b6310195aab91b09db2b69d8 (patch)
tree5ff75649b1cde39e1b8d64a1d041c2cd33874c3d
parentfix(dockerfile): use cargo instead of fleet (diff)
downloadseptember-ba98a808f0e0c848b6310195aab91b09db2b69d8.tar.xz
september-ba98a808f0e0c848b6310195aab91b09db2b69d8.zip
fix(gemini_to_html): replace redundancies
-rw-r--r--src/gemini_to_html.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gemini_to_html.rs b/src/gemini_to_html.rs
index b6dca1e..8adfd52 100644
--- a/src/gemini_to_html.rs
+++ b/src/gemini_to_html.rs
@@ -60,7 +60,7 @@ pub fn gemini_to_html(
if var("PROXY_BY_DEFAULT").unwrap_or_else(|_| "true".to_string())
== "true"
- && to.contains("gemini://")
+ && href.contains("gemini://")
{
if is_proxy
|| href
@@ -104,7 +104,7 @@ pub fn gemini_to_html(
html.push_str(&format!(
"<p><a href=\"{}\">{}</a></p>\n",
href,
- text.unwrap_or(to)
+ text.unwrap_or_else(|| "".to_string())
));
}
Node::Heading {