mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Merge pull request #301 from andyli/binary
Do not detect language if it is a binary file.
This commit is contained in:
@@ -291,7 +291,7 @@ module Linguist
|
|||||||
data = lambda { (binary_mime_type? || binary?) ? "" : self.data }
|
data = lambda { (binary_mime_type? || binary?) ? "" : self.data }
|
||||||
end
|
end
|
||||||
|
|
||||||
@language = Language.detect(name.to_s, data, mode)
|
@language = binary? ? nil : Language.detect(name.to_s, data, mode)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Internal: Get the lexer of the blob.
|
# Internal: Get the lexer of the blob.
|
||||||
|
|||||||
Reference in New Issue
Block a user