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
476 stars 100 forks source link

Fix heredoc dedenting in the presence of empty lines #322

Closed mvz closed 3 years ago

mvz commented 3 years ago

This fixes parsing of squiggly heredocs when some lines are blank. Such lines should not count toward the whitespace width.

E.g.,

<<~FOO
  bar

  baz
FOO

This should be parsed as `"bar\n\nbaz\n".

zenspider commented 3 years ago

oops! good find. Thank you

zenspider commented 3 years ago

Perfect! Good find and thank you! Applied.

Big release coming soonish