loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request 'feat: highlight Gradle Kotlin as Kotlin' (#6153) from gusted/forgejo-kotlin-gradle into forgejo

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6153
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Reviewed-by: Otto <otto@codeberg.org>

Otto 8208c9b2 4df855f3

+8 -1
+2 -1
modules/highlight/highlight.go
··· 137 137 // For the case where Enry recognizes the language, but doesn't use the naming 138 138 // that Chroma expects. 139 139 var normalizeEnryToChroma = map[string]string{ 140 - "F#": "FSharp", 140 + "F#": "FSharp", 141 + "Gradle Kotlin DSL": "Kotlin", 141 142 } 142 143 143 144 // File returns a slice of chroma syntax highlighted HTML lines of code and the matched lexer name
+6
modules/highlight/highlight_test.go
··· 121 121 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">&lt;</span><span class="kt">uint32</span><span class="o">&gt;</span> <span class="o">=</span>`), 122 122 lexerName: "FSharp", 123 123 }, 124 + { 125 + name: "test.gradle.kts", 126 + code: "@file:Suppress(\"UnstableApiUsage\")", 127 + want: lines("<span class=\"nd\">@file</span><span class=\"p\">:</span><span class=\"n\">Suppress</span><span class=\"p\">(</span><span class=\"s2\">&#34;</span><span class=\"s2\">UnstableApiUsage</span><span class=\"s2\">&#34;</span><span class=\"p\">)</span>"), 128 + lexerName: "Kotlin", 129 + }, 124 130 } 125 131 126 132 for _, tt := range tests {