-
-
Notifications
You must be signed in to change notification settings - Fork 372
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
Add support for condtional comment #146
Conversation
bd63335
to
f595a03
Compare
Now the parser support conditional comment + The parser will fire openCondtionalComment when he pase some thing like <!--[if IE]> and an closeConditionalCommenti for <![endif]-->. + The html between the two tags is parsed as usual way
f595a03
to
259006e
Compare
I really don't know if I want this feature. On the one hand, it's outdated technology and won't be used on modern pages, on the other hand, I had a case where I wanted this recently and just went with a hack. Anyway, just to get started, this should definitely be enabled by an option (HTML5 should remain the default). A link to some documentation from Microsoft to ensure all cases are covered would be nice as well. |
Hi , thx for the quick reply.
I agree with you .. the html conditional comment is a crap and are no
yes, i will do it
MSDN https://msdn.microsoft.com/en-us/library/ms537512(v=vs.85).aspx I added also this case (it's not documented in MSDN ... love Microsoft :) )
|
in some cases we got: <!--[if gt IE 8]><!--> <link rel="stylesheet" media="screen,... /> ... <!--<![endif]--> PLease notice that the "<!-->" is parsed as a TEXT, considering the HTML5, the "<!-->" is not a regular comment.
baea21d
to
0e18877
Compare
Not a feature that is part of today's web anymore, closing this. |
MSO comments, like the one in @zimski's reply above, are still used (and necessary) in HTML emails. Would have been a very useful feature for email developers. |
Now the parser support conditional comment