♻️ Simple & Efficient Gemini-to-HTTP Proxy fuwn.net
proxy gemini-protocol protocol gemini http rust
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(html): empty alt text behaviour

Fuwn 45025ee0 361ade63

+11 -5
+1 -1
Cargo.lock
··· 1839 1839 1840 1840 [[package]] 1841 1841 name = "september" 1842 - version = "0.2.22" 1842 + version = "0.2.23" 1843 1843 dependencies = [ 1844 1844 "actix-web", 1845 1845 "anyhow",
+10 -4
src/html.rs
··· 4 4 Some(format!( 5 5 "gemini://{}{}{}", 6 6 url.domain()?, 7 - { if href.starts_with('/') { "" } else { "/" } }, 7 + { 8 + if href.starts_with('/') { 9 + "" 10 + } else { 11 + "/" 12 + } 13 + }, 8 14 href 9 15 )) 10 16 } ··· 153 159 html.push_str(&format!( 154 160 "<p><a href=\"{}\">{}</a> <i>Embedded below</i></p>\n", 155 161 href, 156 - safe(&text.clone().unwrap_or_default()), 162 + safe(&text.clone().unwrap_or_else(|| to.clone())), 157 163 )); 158 164 } 159 165 160 166 html.push_str(&format!( 161 167 "<p><img src=\"{}\" alt=\"{}\" /></p>\n", 162 168 safe(&href), 163 - safe(&text.clone().unwrap_or_default()) 169 + safe(&text.clone().unwrap_or_else(|| to.clone())), 164 170 )); 165 171 166 172 continue; ··· 173 179 html.push_str(&format!( 174 180 "<a href=\"{}\">{}</a>", 175 181 href, 176 - safe(&text.clone().unwrap_or_default()), 182 + safe(&text.clone().unwrap_or_else(|| to.clone())), 177 183 )); 178 184 } 179 185 Node::Heading { level, text } => {