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:
parent
a892dbb5b2
commit
b34ae0dcbd
11
main.go
11
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/build-success-brightgreen)`
|
||||||
extraBadgesMd += ` [![](https://img.shields.io/badge/vcs-git-green?logo=git)](` + repoURL + `)`
|
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
|
// 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`) {
|
if len(lines) >= 3 && strings.Contains(lines[2], `shields.io`) {
|
||||||
lines[2] += ` ` + extraBadgesMd
|
lines[2] += ` ` + extraBadgesMd
|
||||||
|
Loading…
Reference in New Issue
Block a user