mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Only read lines if blob is viewable
This commit is contained in:
@@ -124,7 +124,7 @@ module Linguist
|
||||
#
|
||||
# Returns an Array of lines
|
||||
def lines
|
||||
@lines ||= data ? data.split("\n", -1) : []
|
||||
@lines ||= (viewable? && data) ? data.split("\n", -1) : []
|
||||
end
|
||||
|
||||
# Public: Get number of lines of code
|
||||
|
||||
Reference in New Issue
Block a user