ruby-beautify icon indicating copy to clipboard operation
ruby-beautify copied to clipboard

Multiline list with commas or operators has wrong indentation level

Open hzulla opened this issue 9 years ago • 2 comments

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!"

hzulla avatar Jan 27 '16 13:01 hzulla

(ruby beautify is used in Sonic Pi. See https://github.com/samaaron/sonic-pi/pull/943 for discussion.)

hzulla avatar Jan 27 '16 13:01 hzulla

I believe this also affects multi-line

x = if (foo &&
  bar) then
    1
  else
    2
  end

ioquatix avatar Mar 20 '17 01:03 ioquatix