mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Decrease indent when "else", "rescue", "ensure", "when", or "in" come
This commit is contained in:
parent
1cbc4f9876
commit
0b57f9b25d
1 changed files with 2 additions and 0 deletions
|
@ -350,6 +350,8 @@ class RubyLex
|
|||
unless t[3].allbits?(Ripper::EXPR_LABEL)
|
||||
spaces_of_nest.push(spaces_at_line_head)
|
||||
end
|
||||
when 'else', 'rescue', 'ensure', 'when', 'in'
|
||||
corresponding_token_depth = spaces_of_nest.last
|
||||
when 'end'
|
||||
if is_first_printable_of_line
|
||||
corresponding_token_depth = spaces_of_nest.pop
|
||||
|
|
Loading…
Add table
Reference in a new issue