mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Bit of docs
This commit is contained in:
@@ -123,6 +123,7 @@ module Linguist
|
|||||||
elsif (result = find_by_shebang(data)) && !result.empty?
|
elsif (result = find_by_shebang(data)) && !result.empty?
|
||||||
result.first
|
result.first
|
||||||
elsif classified = Classifier.classify(Samples::DATA, data, possible_languages.map(&:name)).first
|
elsif classified = Classifier.classify(Samples::DATA, data, possible_languages.map(&:name)).first
|
||||||
|
# Return the actual Language object based of the string language name (i.e., first element of `#classify`)
|
||||||
Language[classified[0]]
|
Language[classified[0]]
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user