serg472 / htmlcompressor

HTML Compressor and Minifier, can be used standalone and as a Java library
Apache License 2.0
40 stars 14 forks source link

Html commentc like "<!--//-->" #9

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi.

Sometimes I using html comment to get w3c valid constuction like:

<someTag><!--//--></someTag>

But if I remove all html comments I get validator error.

Is it possible add some rule for this?

Thanks.

Original issue reported on code.google.com by lexius.j...@gmail.com on 19 Feb 2010 at 8:19

GoogleCodeExporter commented 9 years ago
Do you suggest not removing <!--//--> constructions? I don't think it is a good 
idea,
it is not something html compressor is expected to do imo. Can you please 
provide
exact code sample that will not be validated without a comment? 
By the way IE conditional comments are preserved, so something like <!--[--> 
should
be enough to keep the comment.

Original comment by serg472@gmail.com on 19 Feb 2010 at 8:40

GoogleCodeExporter commented 9 years ago

Original comment by serg472@gmail.com on 31 Mar 2010 at 12:34

GoogleCodeExporter commented 9 years ago
Custom preservation rules were added in 0.9.2, so now you can make those 
comments preserved.

Original comment by serg472@gmail.com on 28 Aug 2010 at 2:27