all repos — flounder @ 0bb7042433e0c2425c08c56cb9abf71c8cbf796d

A small site builder for the Gemini protocol

Fix warning kinda

Need to fix this with a regex
alex wennerberg alex@alexwennerberg.com
Thu, 04 Feb 2021 19:23:50 -0800
commit

0bb7042433e0c2425c08c56cb9abf71c8cbf796d

parent

fbd4cd275edc8abf859876a108e9a2d1abee19f6

1 files changed, 2 insertions(+), 2 deletions(-)

jump to
M utils.goutils.go

@@ -22,8 +22,8 @@ scanner := bufio.NewScanner(r)

result := []string{} for scanner.Scan() { text := scanner.Text() - // TODO use actual parser. this could be a little wonky - if strings.HasPrefix(text, "=>") && strings.Contains(text, c.Host) && (strings.Contains(text, "gemini://") || strings.Contains(text, "https://")) { + // TODO use actual parser + if strings.HasPrefix(text, "=>") && strings.Contains(text, "."+c.Host) && (strings.Contains(text, "gemini://") || strings.Contains(text, "https://")) { result = append(result, text) } }