wrong indenting on erb/rhtml files

<div>
..<%- if true -%>
....true
..|  
</div>

in the above example, pipe (|) indicates my cursor position, and I have a shortcut / live template (r + tab) to create the <%- -%>
whenever I use the shortcut to create closing end

<div>
..<%- if true -%>
....true
....<%- end -%>
</div>



it always end up that way, with the end indented incorrectly. is this just my configuration or some known bug?
FYI, I'm using 4.0.2
0
1 comment
Avatar
Permanently deleted user

I kinda get around this problem by defining another live template for end that creates <%- end -%>, instead of creating <%- -%> and type "end" manually. That seems to keep the indentation correctly.

0

Please sign in to leave a comment.