Skip to content

Commit

Permalink
Kill mac_format check, buggy
Browse files Browse the repository at this point in the history
  • Loading branch information
josh committed Jun 10, 2013
1 parent 9c1d6e1 commit d907ab9
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions lib/linguist/blob_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -247,25 +247,6 @@ def lines
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
#
# Requires Blob#data
Expand Down

0 comments on commit d907ab9

Please sign in to comment.