mirror of
1
Fork 0

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 { func formatLexerName(name string) string {
if name == "fallback" { if name == "fallback" || name == "plaintext" {
return "Plaintext" return "Text"
} }
return util.ToTitleCaseNoLower(name) return util.ToTitleCaseNoLower(name)

View File

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