mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-07 05:39:32 +02:00
fix: recognize linguist language aliases (#39135)
Co-authored-by: loveulvu <ax9inl@google.com>
This commit is contained in:
1 parent
e21c37703e
commit
3005efa88d
2 files changed
+15
No files matched your search
@@ -114,6 +114,10 @@ func GetLanguageStats(ctx context.Context, repo *git.Repository, commitID string
|
||||
if hasLanguage := attrs.GetLanguage(); hasLanguage.Value() != "" {
|
||||
language := hasLanguage.Value()
|
||||
|
||||
if canonicalLanguage, ok := enry.GetLanguageByAlias(language); ok {
|
||||
language = canonicalLanguage
|
||||
}
|
||||
|
||||
// group languages, such as Pug -> HTML; SCSS -> CSS
|
||||
group := enry.GetLanguageGroup(language)
|
||||
if len(group) != 0 {
|
||||
|
||||
Reference in new issue
Block a user