summaryrefslogtreecommitdiff
path: root/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'repo.go')
-rw-r--r--repo.go7
1 files changed, 1 insertions, 6 deletions
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) {