From b34ae0dcbd726daeecb3dd6094d66d9f9234ec58 Mon Sep 17 00:00:00 2001 From: mappu Date: Mon, 4 May 2020 17:12:09 +1200 Subject: [PATCH] remove legacy "written in" handling These sentences exist in codesite README.txt files, but the codesite2git script removed all the tags from the README.md files in generated Git repositories, so this clause will never be used --- main.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/main.go b/main.go index 7922ad8..4e5b794 100644 --- a/main.go +++ b/main.go @@ -208,17 +208,6 @@ func (this *Application) Repopage(w http.ResponseWriter, r *http.Request, repoNa extraBadgesMd := ` ![](https://img.shields.io/badge/build-success-brightgreen)` extraBadgesMd += ` [![](https://img.shields.io/badge/vcs-git-green?logo=git)](` + repoURL + `)` - // Convert [`Written in LANG` "\n"] to badge - // This was special syntax used by codesite - writtenInPrefix := `Written in ` - for i, line := range lines { - if strings.HasPrefix(line, writtenInPrefix) { - extraBadgesMd += ` ![](https://img.shields.io/badge/written%20in-` + url.QueryEscape(line[len(writtenInPrefix):]) + `-blue)` - lines = append(lines[0:i], lines[i+1:]...) - break - } - } - // Inject more badges to 3rd line; or, create badges on 3rd line if there are none already if len(lines) >= 3 && strings.Contains(lines[2], `shields.io`) { lines[2] += ` ` + extraBadgesMd