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

Whitespace within conditional comments is being collapsed #15

Closed
devinus opened this issue Feb 8, 2016 · 6 comments
Closed

Whitespace within conditional comments is being collapsed #15

devinus opened this issue Feb 8, 2016 · 6 comments

Comments

@devinus
Copy link

devinus commented Feb 8, 2016

No description provided.

@devinus
Copy link
Author

devinus commented Feb 8, 2016

Actually, this seems like good behavior. But I do need a way to not strip some HTML comments. Using triple dash HTML comments has some prior art in Pandoc.

E.g.

<!--- do not strip or
collapse
whitespace -->

I'll do a PR for this.

@maltsev
Copy link
Member

maltsev commented Feb 8, 2016

I don't think this is a good behavior. The module collapseWhitespace shouldn't treat comments at all. And the module removeComments should either remove the comment or keep it unalterable.

I agree with you about the prior comments and triple dash syntax. It'd awesome if you'll do a PR for that.

@devinus
Copy link
Author

devinus commented Feb 8, 2016

Well, things inside conditional comments are usually (always?) HTML, so it would be nice to minify that too.

@maltsev
Copy link
Member

maltsev commented Feb 8, 2016

Ah, I'm sorry. I was talking about comments in general. Yes, you're right. But I think it'll be better to have a separate module for that, which will parse HTML inside the conditional comment and minify it with the appropriate modules (collapseWhitespaces, minifyCss, minifyJs, etc).

@maltsev
Copy link
Member

maltsev commented Feb 8, 2016

@SukkaW
Copy link
Contributor

SukkaW commented Nov 25, 2020

Since both #16 and #17 has been fixed, IMHO it is ok to close the issue now.

@maltsev maltsev closed this as completed Nov 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants