1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Decrease indent at "elsif" too

This commit is contained in:
Nobuyoshi Nakada 2019-06-26 08:43:08 +09:00
parent ea8bc6822d
commit a3d1cacda6
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -332,7 +332,7 @@ class RubyLex
unless t[3].allbits?(Ripper::EXPR_LABEL)
depth_difference += 1
end
when 'else', 'rescue', 'ensure', 'when', 'in'
when 'else', 'elsif', 'rescue', 'ensure', 'when', 'in'
depth_difference += 1
end
end
@ -377,7 +377,7 @@ class RubyLex
unless t[3].allbits?(Ripper::EXPR_LABEL)
spaces_of_nest.push(spaces_at_line_head)
end
when 'else', 'rescue', 'ensure', 'when', 'in'
when 'else', 'elsif', 'rescue', 'ensure', 'when', 'in'
corresponding_token_depth = spaces_of_nest.last
when 'end'
if is_first_printable_of_line