feat(code-highlite): added support for Jenkinsfile

This commit is contained in:
RhodeCode Admin 2025-12-15 20:33:41 +01:00
parent 32cd087e14
commit 63639e5bf6

View file

@ -782,8 +782,10 @@ def get_custom_lexer(extension):
from pygments import lexers
# custom override made by RhodeCode
if extension in ["mako"]:
if extension.lower() in ["mako"]:
return lexers.get_lexer_by_name("html+mako")
elif extension.lower() in ["jenkinsfile"]:
return lexers.get_lexer_by_name("groovy")
# check if we didn't define this extension as other lexer
extensions = rhodecode.EXTENSIONS and getattr(rhodecode.EXTENSIONS, "EXTRA_LEXERS", None)