Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Only search the first 4K chars for \r

  • Loading branch information...
commit 887a050db9a0c945d06af86ca550d18f46cf176a 1 parent bda895e
@rtomayko rtomayko authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/linguist/blob_helper.rb
View
2  lib/linguist/blob_helper.rb
@@ -226,7 +226,7 @@ def line_split_character
# 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
Please sign in to comment.
Something went wrong with that request. Please try again.