-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
IE conditional HTML comments don't play well with the rest of the document #91
Comments
Using index.html from jsbeautifier.org as a test, the following misformatting occurs in conditional html comments: Input:
Output:
|
I created a Grunt.js plugin to beautify HTML, https://github.com/jonschlinkert/grunt-prettify, we've also noticed this issue. The problem, IMHO, is that since the output formatting for conditional comments looks so bad AND since it's at the very top of the page, it's the very first thing you see when you look at a "beautified" page. So this is a deterrent from using this at all for beautification. |
I think the real solution would be to kill that HTML boilerplate with the crazy conditional tags. I don't know anyone who actually does that in production. It should be moderately fixable though. |
Lol yeah, true enough. However:
I'm thinking this still needs to be solved. |
Sure. Please feel free to submit a fix. 😄 |
feel free to fix your own software |
👍 Your kind words and encouragement have moved me. |
lol thanks! much appreciated. |
using the style_html function with a document that starts with:
the entire indentation of the document is thrown off because of the IE conditional comments at the beginning of the file ...
tried using the unformatted option
['!--[if lt IE 7]', '!--[if IE 7]', '!--[if IE 8]', '!--[if gt IE 8]', '![endif]--', '!--']
but it breaks the entire styling.The text was updated successfully, but these errors were encountered: