From 5114ac1a157717b042876d3e73c47cd758fe0cfb Mon Sep 17 00:00:00 2001 From: sloumdrone Date: Wed, 18 Sep 2019 22:03:19 -0700 Subject: [PATCH] Updates gophermap rendering to support gemini urls as h URL:... style links --- gopher/gopher.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gopher/gopher.go b/gopher/gopher.go index dbf0d49..3b15440 100644 --- a/gopher/gopher.go +++ b/gopher/gopher.go @@ -171,7 +171,7 @@ func buildLink(host, port, gtype, resource string) string { case "h": u, tf := isWebLink(resource) if tf { - if len(u) > 4 && string(u[:4]) == "http" { + if strings.Index(u, "://") > 0 { return u } else { return fmt.Sprintf("http://%s", u)