Kill mac_format check, buggy

This commit is contained in:
Joshua Peek
2013-06-09 21:02:11 -05:00
parent 9c1d6e154c
commit d907ab9940

View File

@@ -247,25 +247,6 @@ module Linguist
end end
end end
# Character used to split lines. This is almost always "\n" except when Mac
# Format is detected in which case it's "\r".
#
# Returns a split pattern string.
def line_split_character
@line_split_character ||= (mac_format?? "\r" : "\n")
end
# Private: Is the data in ** Mac Format **. This format uses \r (0x0d) characters
# for line ends and does not include a \n (0x0a).
#
# Returns true when mac format is detected.
def mac_format?
return if !viewable?
if pos = data[0, 4096].index("\r")
data[pos + 1] != ?\n
end
end
# Public: Get number of lines of code # Public: Get number of lines of code
# #
# Requires Blob#data # Requires Blob#data