emmet-vim icon indicating copy to clipboard operation
emmet-vim copied to clipboard

Fix comment filter

Open kyleferguson opened this issue 11 years ago • 5 comments

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 -->

kyleferguson avatar Jan 23 '14 00:01 kyleferguson

div.foo|c should be expand to

<!-- .foo -->
<div class="foo"></div>
<!-- /.foo -->

mattn avatar Jan 23 '14 02:01 mattn

That's not the way it behaves in sublime text. I'm not sure about other editors though.

kyleferguson avatar Jan 23 '14 03:01 kyleferguson

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 -->

kyleferguson avatar Jan 23 '14 03:01 kyleferguson

<div class="foo">
</div>
<!-- /.foo -->

Maybe it's a bug?

mattn avatar Jan 24 '14 02:01 mattn

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.

kyleferguson avatar Jan 24 '14 13:01 kyleferguson