diff options
author | tjpcc <tjp@ctrl-c.club> | 2023-09-17 16:52:47 -0600 |
---|---|---|
committer | tjpcc <tjp@ctrl-c.club> | 2023-09-17 16:52:47 -0600 |
commit | fd79efff7504853ab4b7070ee186f4b7a346d21d (patch) | |
tree | c3890df1ed1d27395251f2f927e02c156a2f3db6 /repo.go | |
parent | a7ce20fee62a52794bf8bf940d0fd1f4134158b1 (diff) |
fix diffs and add diffstats in gopher
Diffstat (limited to 'repo.go')
-rw-r--r-- | repo.go | 7 |
1 files changed, 1 insertions, 6 deletions
@@ -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) { |