mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-11 04:11:18 +01:00
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:
commit
e0421b28bf
2 changed files with 3 additions and 3 deletions
|
@ -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)
|
||||||
|
|
|
@ -58,7 +58,7 @@ func TestFile(t *testing.T) {
|
||||||
name: "tags.txt",
|
name: "tags.txt",
|
||||||
code: "<>",
|
code: "<>",
|
||||||
want: lines("<>"),
|
want: lines("<>"),
|
||||||
lexerName: "Plaintext",
|
lexerName: "Text",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "tags.py",
|
name: "tags.py",
|
||||||
|
|
Loading…
Reference in a new issue