aboutsummaryrefslogtreecommitdiff
path: root/src/html.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/html.rs')
-rw-r--r--src/html.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/html.rs b/src/html.rs
index 64ec6ae..933ce8e 100644
--- a/src/html.rs
+++ b/src/html.rs
@@ -103,6 +103,12 @@ pub fn from_gemini(
let mut href = to.to_string();
let mut surface = false;
+ if href.starts_with("./") || href.starts_with("../") {
+ if let Ok(url) = url.join(&href) {
+ href = url.to_string();
+ }
+ }
+
if href.contains("://") && !href.starts_with("gemini://") {
surface = true;
} else if !href.contains("://") && href.contains(':') {