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
This commit is contained in:
mappu 2020-05-04 17:12:09 +12:00
parent a892dbb5b2
commit b34ae0dcbd
1 changed files with 0 additions and 11 deletions

11
main.go
View File

@ -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