seattlerb / ruby_parser

ruby_parser is a ruby parser written in pure ruby. It outputs s-expressions which can be manipulated and converted back to ruby via the ruby2ruby gem.
http://www.zenspider.com/projects/ruby_parser.html
475 stars 102 forks source link

Fix dedenting when heredoc has only empty line and interpolation #332

Closed mvz closed 2 years ago

mvz commented 2 years ago

This fixes a bug for squiggly heredocs that consist of an empty line followed only by lines starting with interpolation. For those cases, the initial string literal for the :dstr node would be "0" instead of the correct "\n".

zenspider commented 2 years ago

Nice catch! Done. Should ship soonish.