Merge pull request '[FEAT] Use 'Text' instead of 'Plaintext'' (#2833) from eo/forgejo:patch-1 into forgejo

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2833
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
This commit is contained in:
Earl Warren 2024-03-30 22:21:14 +00:00
commit e0421b28bf
2 changed files with 3 additions and 3 deletions

View file

@ -216,8 +216,8 @@ func PlainText(code []byte) []template.HTML {
}
func formatLexerName(name string) string {
if name == "fallback" {
return "Plaintext"
if name == "fallback" || name == "plaintext" {
return "Text"
}
return util.ToTitleCaseNoLower(name)

View file

@ -58,7 +58,7 @@ func TestFile(t *testing.T) {
name: "tags.txt",
code: "<>",
want: lines("&lt;&gt;"),
lexerName: "Plaintext",
lexerName: "Text",
},
{
name: "tags.py",