ruby-formatter/rufo

rufo breaks `=begin =end` comment block in erb file

Opened this issue · 1 comments

When using this kind of comment block, =begin and =end must be at start of the lines.

<%
=begin

This is a comment.

=end
%>

But rufo moves the positions and it seems to break the code.

<% =begin
  
  This is a comment.
  
  =end %>

I simply removed the comment from the template file to fix the issue.
Is it better to avoid using this type of comment?

rufo -v
rufo 0.16.2
kzkn commented

Thanks for the report.
Breaking valid application codes can be called as a bug of rufo.
But rufo doesn't support the style currently. So I think your workaround is simple and good.

Welcome pullreq for the bugfix 😃