diff --git a/modules/highlight/highlight.go b/modules/highlight/highlight.go index 243aa2b566..c0bc33a3c6 100644 --- a/modules/highlight/highlight.go +++ b/modules/highlight/highlight.go @@ -137,7 +137,8 @@ func CodeFromLexer(lexer chroma.Lexer, code string) template.HTML { // For the case where Enry recognizes the language, but doesn't use the naming // that Chroma expects. var normalizeEnryToChroma = map[string]string{ - "F#": "FSharp", + "F#": "FSharp", + "Gradle Kotlin DSL": "Kotlin", } // File returns a slice of chroma syntax highlighted HTML lines of code and the matched lexer name diff --git a/modules/highlight/highlight_test.go b/modules/highlight/highlight_test.go index 0127854c8e..effc71ace7 100644 --- a/modules/highlight/highlight_test.go +++ b/modules/highlight/highlight_test.go @@ -121,6 +121,12 @@ c=2 want: lines(`module Crypt = let generateCryptTable: array<uint32> =`), lexerName: "FSharp", }, + { + name: "test.gradle.kts", + code: "@file:Suppress(\"UnstableApiUsage\")", + want: lines("@file:Suppress("UnstableApiUsage")"), + lexerName: "Kotlin", + }, } for _, tt := range tests {