Skip to content

Commit

Permalink
Increase max length of trimmed lines to 120 characters
Browse files Browse the repository at this point in the history
  • Loading branch information
Sija committed Jan 23, 2021
1 parent 2734806 commit bfbb4f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ameba/formatter/util.cr
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module Ameba::Formatter
message.try &.gsub(/\x1b[^m]*m/, "").presence
end

def trim(str, max_length = 100, placeholder = " ...")
def trim(str, max_length = 120, placeholder = " ...")
if str.size > max_length
str = str[0, max_length - placeholder.size - 1] + placeholder
end
Expand All @@ -30,7 +30,7 @@ module Ameba::Formatter
{pre_context, post_context}
end

def affected_code(source, location, end_location = nil, context_lines = 0, max_length = 100, placeholder = " ...", prompt = "> ")
def affected_code(source, location, end_location = nil, context_lines = 0, max_length = 120, placeholder = " ...", prompt = "> ")
lines = source.lines
lineno, column =
location.line_number, location.column_number
Expand Down

0 comments on commit bfbb4f9

Please sign in to comment.