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:
parent
ea8bc6822d
commit
a3d1cacda6
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue