mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-16 20:00:03 +02:00
fix: normalize guessed languages from enry
- In the case that Enry correctly recognized the language, but returns
the language name in a way that isn't recognized by enry. Although
overkill I've added a map such that new entries should be easier to add.
- Resolves #6077
- Added unit test
(cherry picked from commit 7aeb1ba1d5
)
This commit is contained in:
parent
a494510972
commit
c5f37b6cd8
2 changed files with 15 additions and 0 deletions
|
@ -115,6 +115,12 @@ c=2
|
|||
want: lines(""),
|
||||
lexerName: "ObjectPascal",
|
||||
},
|
||||
{
|
||||
name: "test.fs",
|
||||
code: "module Crypt = let generateCryptTable: array<uint32> =",
|
||||
want: lines(`<span class="k">module</span> <span class="nn">Crypt</span> <span class="o">=</span> <span class="k">let</span> <span class="nv">generateCryptTable</span><span class="o">:</span> <span class="n">array</span><span class="o"><</span><span class="kt">uint32</span><span class="o">></span> <span class="o">=</span>`),
|
||||
lexerName: "FSharp",
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue