From fd79efff7504853ab4b7070ee186f4b7a346d21d Mon Sep 17 00:00:00 2001 From: tjpcc Date: Sun, 17 Sep 2023 16:52:47 -0600 Subject: fix diffs and add diffstats in gopher --- repo.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'repo.go') diff --git a/repo.go b/repo.go index 938bcc9..0805913 100644 --- a/repo.go +++ b/repo.go @@ -216,12 +216,7 @@ func (r Readme) GeminiEscapedContents() string { } func (r Readme) GopherEscapedContents(selector, host, port string) string { - trailer := "\t"+selector+"\t"+host+"\t"+port+"\r\n" - lines := strings.Split(r.RawContents, "\n") - for i := range lines { - lines[i] = "i"+strings.TrimRight(strings.ReplaceAll(lines[i], "\t", " "), "\r\n") + trailer - } - return strings.Join(lines, "") + return gopherRawtext(selector, host, port, r.RawContents) } func (r *Repository) Readme(ctx context.Context, ref string) (*Readme, error) { -- cgit v1.2.3