Custom snippet for erb doesn't indent end tag properly
coaxial opened this issue · comments
Rock commented
I'm creating a custom snippet for erb tags:
<%= ... %>
...
<% end %
~/.snippets_custom.json
:
{
"eruby": {
"extends": "html",
"snippets": {
"erb": "<%= | %>\n\t${child}<% end %>"
}
}
}
And when doing div>erb>p
, the output is:
<div>
<%= %>
<p></p>
<% end %>
</div>
Note how the <% end %>
is indented one level too much, and doesn't match the json
file.
If I add \n
after ${child}
, so ...${child}\n<% end %>
, then the indent is correct but there is obviously an extra, unneeded line before the end tag.