diff --git a/lib/linguist/blob_helper.rb b/lib/linguist/blob_helper.rb index de75dbc9..b0a20626 100644 --- a/lib/linguist/blob_helper.rb +++ b/lib/linguist/blob_helper.rb @@ -226,7 +226,7 @@ module Linguist # Returns true when mac format is detected. def mac_format? return if !viewable? - if pos = data.index("\r") + if pos = data[0, 4096].index("\r") data[pos + 1] != ?\n end end