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