mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Allow disambiguate to return an Array
This commit is contained in:
@@ -18,9 +18,8 @@ module Linguist
|
||||
data = blob.data
|
||||
|
||||
@heuristics.each do |heuristic|
|
||||
if heuristic.matches?(languages)
|
||||
language = heuristic.call(data)
|
||||
return [language] if language
|
||||
if heuristic.matches?(languages) && result = heuristic.call(data)
|
||||
return Array(result)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user