mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Decrease nesting level when closing token comes at a non-first token of line
This commit is contained in:
parent
28eeaed8a9
commit
ba17127e99
1 changed files with 2 additions and 0 deletions
|
@ -366,6 +366,7 @@ class RubyLex
|
||||||
if is_first_printable_of_line
|
if is_first_printable_of_line
|
||||||
corresponding_token_depth = spaces_of_nest.pop
|
corresponding_token_depth = spaces_of_nest.pop
|
||||||
else
|
else
|
||||||
|
spaces_of_nest.pop
|
||||||
corresponding_token_depth = nil
|
corresponding_token_depth = nil
|
||||||
end
|
end
|
||||||
when :on_kw
|
when :on_kw
|
||||||
|
@ -383,6 +384,7 @@ class RubyLex
|
||||||
if is_first_printable_of_line
|
if is_first_printable_of_line
|
||||||
corresponding_token_depth = spaces_of_nest.pop
|
corresponding_token_depth = spaces_of_nest.pop
|
||||||
else
|
else
|
||||||
|
spaces_of_nest.pop
|
||||||
corresponding_token_depth = nil
|
corresponding_token_depth = nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue