Fix language mapping in the Source Viewer
What does this MR do and why?
We use Rouge to detect a language of a file, and then we map the language to a Highlight.js language definition. In some cases it seems like Rouge starts the language with an uppercase (Python
vs python
) which will break our Rouge -> HLJS
language mapping. This fixes the language mapping in the Source Viewer by converting the language to lowercase during mapping.
Screenshots or screen recordings
How to set up and validate locally
Open a source file from the repository files browser
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Jacques Erasmus