aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRyan Tomayko <rtomayko@gmail.com>2012-09-10 01:56:08 -0700
committerRyan Tomayko <rtomayko@gmail.com>2012-09-10 01:56:08 -0700
commit887a050db9a0c945d06af86ca550d18f46cf176a (patch)
tree2d3414289cd984ef468968f20f083d2b02345588 /lib
parentbda895eaae1b06943daf006631f3ffb584d3dab9 (diff)
Only search the first 4K chars for \rmac-format
Diffstat (limited to 'lib')
-rw-r--r--lib/linguist/blob_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/linguist/blob_helper.rb b/lib/linguist/blob_helper.rb
index de75dbc..b0a2062 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