mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-06-19 06:33:06 -03:00
binary files are returned as OtherLanguage by GetLanguage
This commit is contained in:
@ -116,6 +116,10 @@ func GetLanguageBySpecificClassifier(content []byte, candidates []string, classi
|
||||
// GetLanguages applies a sequence of strategies based on the given filename and content
|
||||
// to find out the most probably languages to return.
|
||||
func GetLanguages(filename string, content []byte) []string {
|
||||
if IsBinary(content) {
|
||||
return nil
|
||||
}
|
||||
|
||||
var languages []string
|
||||
candidates := []string{}
|
||||
for _, strategy := range DefaultStrategies {
|
||||
|
Reference in New Issue
Block a user