diff options
| author | Fuwn <[email protected]> | 2022-06-02 00:28:24 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2022-06-02 00:28:24 +0000 |
| commit | 32ad1583cb5c7750ad11e8d11f0be36bc7fcbb5f (patch) | |
| tree | 57166b22acf6c137931c40d53c662e615b3e977b /src | |
| parent | fix(dockerfile): use cargo instead of fleet (diff) | |
| download | september-32ad1583cb5c7750ad11e8d11f0be36bc7fcbb5f.tar.xz september-32ad1583cb5c7750ad11e8d11f0be36bc7fcbb5f.zip | |
fix(gemini_to_html): replace redundancies
Diffstat (limited to 'src')
| -rw-r--r-- | src/gemini_to_html.rs | 4 |
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 { |