Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix comment filter #185

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

kyleferguson
Copy link

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

@mattn
Copy link
Owner

mattn commented Jan 23, 2014

div.foo|c should be expand to

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

@kyleferguson
Copy link
Author

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

@kyleferguson
Copy link
Author

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

@mattn
Copy link
Owner

mattn commented Jan 24, 2014

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

Maybe it's a bug?

@kyleferguson
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants