Skip to content

Commit

Permalink
[scip-kotlin] Use the correct linguist language alias for Kotlin
Browse files Browse the repository at this point in the history
The GitHub-embedded syntax highlighting for markdown uses `linguist` to
detect which language to use. For Kotlin there's no alias `kt` so syntax
highlighting doesn't work. Use 'kotlin' to correctly pick up the
language of the signature blocks.

c.f. https://github.com/github-linguist/linguist/blob/master/lib/linguist/languages.yml#L3660
https://github.com/github-linguist/linguist/blob/master/lib/linguist/languages.yml#L3660
  • Loading branch information
donsbot committed Jul 25, 2024
1 parent 69300ae commit c19a4c6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ class SemanticdbTextDocumentBuilder(
is DeclarationDescriptorWithSource -> descriptor.findKDocString() ?: ""
else -> ""
}
message = "```kt\n$signature\n```${stripKDocAsterisks(kdoc)}"
message = "```kotlin\n$signature\n```${stripKDocAsterisks(kdoc)}"
}

// Returns the kdoc string with all leading and trailing "/*" tokens removed. Naive
Expand Down

0 comments on commit c19a4c6

Please sign in to comment.