fables-tales / rubyfmt

Ruby Autoformatter!
MIT License
1.07k stars 50 forks source link

Fix special case when formatting paren-wrapped MLhs #419

Open reese opened 1 year ago

reese commented 1 year ago

Closes #416

MLhs nodes have a special case for rest params which was previously incorrectly trying to emit soft indents outside of a breakable. We could have just made mlhs nodes breakables, but the parser interface for mlhs specifically is pretty awkward, so in this particular case I opted to leave it as-is and instead correctly pass the right special-case enum when inside of a multiassign.

(Reviewing this with hiding whitespace changes makes this a bit clearer)