Skip to content

Commit

Permalink
binary files are returned as OtherLanguage by GetLanguage
Browse files Browse the repository at this point in the history
  • Loading branch information
mcarmonaa committed Jul 4, 2017
1 parent 9de4d35 commit 06a50dc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions common.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 06a50dc

Please sign in to comment.