ruby-beautify
ruby-beautify copied to clipboard
Multiline list with commas or operators has wrong indentation level
I think this is somewhat related to #24 :
The gem does this:
puts "Hi there " +
"Whatever " +
"yay!"
puts "Hi there ",
"Whatever ",
"yay!"
Expected result:
puts "Hi there " +
"Whatever " +
"yay!"
puts "Hi there ",
"Whatever ",
"yay!"
(ruby beautify is used in Sonic Pi. See https://github.com/samaaron/sonic-pi/pull/943 for discussion.)
I believe this also affects multi-line
x = if (foo &&
bar) then
1
else
2
end