- LineType::Link => format!("<div><a href=\"{}\">{}</a></div>\n", get_link_address(line), get_link_content(line)),
+ LineType::Link => {
+ let url = get_link_address(line);
+ if url.starts_with("gemini:") {
+ format!("<div><a href=\"{}\">{}</a></div>\n", url, get_link_content(line))
+ } else {
+ format!("<div><a href=\"{}\">{}</a></div>\n", url.replace(".gmi", ".html"), get_link_content(line))
+ }
+ },