emmet-vim
emmet-vim copied to clipboard
Fix comment filter
When comment filter enabled, the comment was being added to the begging and the end. ex:
<!-- .class-one --><div class="class-one">
</div>
<!-- .class-one -->
Only need the one comment at the end. That also doesnt need to be on a new line. Same line as the ending tag. So it becomes
<div class="class-one">
</div><!-- .class-one -->
div.foo|c should be expand to
<!-- .foo -->
<div class="foo"></div>
<!-- /.foo -->
That's not the way it behaves in sublime text. I'm not sure about other editors though.
Tried it on jsfiddle, jsbin, and ice editor as well and they did have the ending comment on a new line. but no comment at the beginning. like so:
<div class="foo">
</div>
<!-- /.foo -->
and Sublime renders as
<div class="foo"></div> <!-- .foo -->
<div class="foo">
</div>
<!-- /.foo -->
Maybe it's a bug?
I wonder what it would take to implement templates for filters. Like a pre-filter and post-filter template, that way the specific output could be fine tuned.