Open coaxial opened 1 year ago
I'm creating a custom snippet for erb tags:
<%= ... %> ... <% end %
~/.snippets_custom.json:
~/.snippets_custom.json
{ "eruby": { "extends": "html", "snippets": { "erb": "<%= | %>\n\t${child}<% end %>" } } }
And when doing div>erb>p, the output is:
div>erb>p
<div> <%= %> <p></p> <% end %> </div>
Note how the <% end %> is indented one level too much, and doesn't match the json file.
<% end %>
json
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.
\n
${child}
...${child}\n<% end %>
I'm creating a custom snippet for erb tags:
~/.snippets_custom.json
:And when doing
div>erb>p
, the output is:Note how the
<% end %>
is indented one level too much, and doesn't match thejson
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.