diff --git a/indexbuilder.go b/indexbuilder.go index 67773c6d7..6a7b5ea1a 100644 --- a/indexbuilder.go +++ b/indexbuilder.go @@ -397,12 +397,7 @@ func (b *IndexBuilder) addSymbols(symbols []*Symbol) { func DetermineLanguageIfUnknown(doc *Document) { if doc.Language == "" { - c := doc.Content - // classifier is faster on small files without losing much accuracy - if len(c) > 2048 { - c = c[:2048] - } - doc.Language = enry.GetLanguage(doc.Name, c) + doc.Language = enry.GetLanguage(doc.Name, doc.Content) } }