mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Ensure lang is skipped on any binary file
This commit is contained in:
@@ -302,7 +302,7 @@ module Linguist
|
||||
if defined?(@data) && @data.is_a?(String)
|
||||
data = @data
|
||||
else
|
||||
data = lambda { binary_mime_type? ? "" : self.data }
|
||||
data = lambda { (binary_mime_type? || binary?) ? "" : self.data }
|
||||
end
|
||||
|
||||
@language = Language.detect(name.to_s, data, mode)
|
||||
|
||||
Reference in New Issue
Block a user