From 76d8b138ce23687c6372b34ee71e52f2b057469f Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Fri, 1 Nov 2024 13:16:24 +0100 Subject: Fix 'proxied' being added to all labels by gemtext_function --- http/handlers/templates/functions/gemtext.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'http/handlers/templates/functions') diff --git a/http/handlers/templates/functions/gemtext.go b/http/handlers/templates/functions/gemtext.go index bc7a31f..45ded45 100644 --- a/http/handlers/templates/functions/gemtext.go +++ b/http/handlers/templates/functions/gemtext.go @@ -75,10 +75,11 @@ func (g *Gemtext) funcGemtext(input any) (gemtext.HTML, error) { translator.RenderLink = func(w io.Writer, urlStr, label string) error { if u, err := url.Parse(urlStr); err == nil && u.Scheme == "gemini" { urlStr = g.GatewayURL + u.Host + u.Path + label += " (proxied)" } _, err := fmt.Fprintf( - w, "

%s (proxied)

\n", urlStr, label, + w, "

%s

\n", urlStr, label, ) return err } -- cgit v1.2.3