diff options
author | Earl Warren <earl-warren@noreply.codeberg.org> | 2024-03-30 23:21:14 +0100 |
---|---|---|
committer | Earl Warren <earl-warren@noreply.codeberg.org> | 2024-03-30 23:21:14 +0100 |
commit | e0421b28bf0dfc87cb42ddc4e39112dd913fa029 (patch) | |
tree | 3a534fc323737e160308a47650fc7a3d618795ad /modules | |
parent | Merge pull request 'Fix accessibility and translatability of repo explore cou... (diff) | |
parent | Fix (diff) | |
download | forgejo-e0421b28bf0dfc87cb42ddc4e39112dd913fa029.tar.xz forgejo-e0421b28bf0dfc87cb42ddc4e39112dd913fa029.zip |
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>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/highlight/highlight.go | 4 | ||||
-rw-r--r-- | modules/highlight/highlight_test.go | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/modules/highlight/highlight.go b/modules/highlight/highlight.go index d7ab3f7afd..4ee47b7a13 100644 --- a/modules/highlight/highlight.go +++ b/modules/highlight/highlight.go @@ -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) diff --git a/modules/highlight/highlight_test.go b/modules/highlight/highlight_test.go index 659688bd0f..dd15b97847 100644 --- a/modules/highlight/highlight_test.go +++ b/modules/highlight/highlight_test.go @@ -58,7 +58,7 @@ func TestFile(t *testing.T) { name: "tags.txt", code: "<>", want: lines("<>"), - lexerName: "Plaintext", + lexerName: "Text", }, { name: "tags.py", |