1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-28 09:21:13 -05:00
forgejo/modules/highlight
Gusted aec4a0dd59 [BUG] Make chroma match case-insenstive
- In the case that [go-enry](https://github.com/go-enry/go-enry/)
returned langauge doesn't match a lexer name (Either because its not
available or because it doesn't match Chroma's name), a last effort
attempt is made to use Chroma's matching.
- go-enry already applies `strings.ToLower` onto the filename to avoid
being case-sensitive, add the same code for Chroma's matching. The code
being used doesn't rely on the filename being case senstive for correct
matching.
- Adds unit test.
- Resolves #752

(cherry picked from commit dcc442351d)
2024-10-11 17:35:54 +00:00
..
highlight.go [BUG] Make chroma match case-insenstive 2024-10-11 17:35:54 +00:00
highlight_test.go [BUG] Make chroma match case-insenstive 2024-10-11 17:35:54 +00:00