From 4f43b7338b956e7850927ba452492fe1b4f33238 Mon Sep 17 00:00:00 2001 From: Leo Heitmann Ruiz Date: Tue, 26 Mar 2024 22:01:53 +0100 Subject: [PATCH 1/3] "Plaintext" => "Text" --- modules/highlight/highlight.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/highlight/highlight.go b/modules/highlight/highlight.go index d7ab3f7afd..8fa2de6daf 100644 --- a/modules/highlight/highlight.go +++ b/modules/highlight/highlight.go @@ -217,7 +217,7 @@ func PlainText(code []byte) []template.HTML { func formatLexerName(name string) string { if name == "fallback" { - return "Plaintext" + return "Text" } return util.ToTitleCaseNoLower(name) From c340e020786b1451c1693853fc3c42102729a10a Mon Sep 17 00:00:00 2001 From: Leo Heitmann Ruiz Date: Tue, 26 Mar 2024 22:25:34 +0100 Subject: [PATCH 2/3] "Plaintext" => "Text" --- modules/highlight/highlight_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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", From afcff0eebdd8ce07434b2a6f4147a7e5a079aa46 Mon Sep 17 00:00:00 2001 From: Leo Heitmann Ruiz Date: Sat, 30 Mar 2024 15:23:48 +0100 Subject: [PATCH 3/3] Fix --- modules/highlight/highlight.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/highlight/highlight.go b/modules/highlight/highlight.go index 8fa2de6daf..4ee47b7a13 100644 --- a/modules/highlight/highlight.go +++ b/modules/highlight/highlight.go @@ -216,7 +216,7 @@ func PlainText(code []byte) []template.HTML { } func formatLexerName(name string) string { - if name == "fallback" { + if name == "fallback" || name == "plaintext" { return "Text" }